Sample a dataset and redact the sample
Samples the dataset, then has Narrative’s privacy model mark which columns of that sample hold personal data and how each should be masked. Both steps run as one workflow.
The response is that workflow and the id of its run. Check the run with
GET /workflows/{workflow_id}/runs; when it completes, read the model’s decisions with
GET /datasets/{dataset_id}/redaction and the masked rows with
GET /datasets/{dataset_id}/sample/redacted. If the run fails, no redaction is stored and
GET /datasets/{dataset_id}/redaction answers 404, as it does for any dataset without one. A run
that samples successfully and then fails to redact keeps the sample.
Each call creates its own workflow.
POST /datasets/{dataset_id}/request-sample samples without redacting and returns a job instead.
Two differences beyond the redaction step: this endpoint refuses a company over its credit limit
with a 403, and an invalid sample query fails the run rather than this request.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for a dataset.
Body
Optional settings for the sample step
The compute pool to run the sample job on. If not specified, defaults to the dataset's configured compute pool, then to the data plane's default compute pool.
Response
The created workflow, and the id of the run started for it.
Unique identifier for a workflow.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
The name of the workflow, extracted from the specification.
"my-etl-workflow"
The workflow specification in YAML format.
"document:\n dsl: '1.0.0'\n namespace: test\n name: test-workflow\n version: '1.0.0'\n do:\n - createView:\n call: CreateMaterializedViewIfNotExists\n with:\n nql: \"CREATE MATERIALIZED VIEW workflow_output_dataset AS SELECT track_id FROM company_data.workflow_input_dataset\"\n - refreshView:\n call: RefreshMaterializedView\n with:\n datasetName: workflow_output_dataset\n - insertData:\n call: ExecuteDml\n with:\n nql: \"INSERT INTO company_data.workflow_input_dataset (track_id) VALUES ('test')\n"
The data plane this workflow is associated with.
"d1e2f3a4-b5c6-7890-abcd-ef1234567890"
The company that owns this workflow.
100
ISO-8601 timestamp of when the workflow was created.
"2025-01-15T10:30:00Z"
The ID of the user who created this workflow.
20
ISO-8601 timestamp of when the workflow was last updated.
"2025-01-15T10:30:00Z"
The current status of the workflow.
active, archived "active"
Tags that describe the workflow.
ISO-8601 timestamp of when the workflow was archived, or null if active.
null
The run ID if the workflow was triggered immediately upon creation.
"b7e3f1a2-4c5d-6e7f-8a9b-0c1d2e3f4a5b"

