Generate Curated
POST
/api/v1/codegen/curated
const url = 'https://example.com/api/v1/codegen/curated';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"flow_name":"example","resource_id":"example","type":"curated","source_table":"example","source_tables":["example"],"target_name":"example","sequence_column":"example","trigger_type":"batch","schedule":{"cron":"example","timezone":"UTC"},"target_schema":{"description":"example","columns":[{"name":"example","type":"example","description":"","pk":false,"not_null":false,"pii":false,"glossary_terms":["example"]}],"foreign_keys":[{"column":"example","parent_table":"example","parent_column":"example"}]},"cluster_by":["example"],"cluster_by_auto":true,"table_properties":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/codegen/curated \ --header 'Content-Type: application/json' \ --data '{ "flow_name": "example", "resource_id": "example", "type": "curated", "source_table": "example", "source_tables": [ "example" ], "target_name": "example", "sequence_column": "example", "trigger_type": "batch", "schedule": { "cron": "example", "timezone": "UTC" }, "target_schema": { "description": "example", "columns": [ { "name": "example", "type": "example", "description": "", "pk": false, "not_null": false, "pii": false, "glossary_terms": [ "example" ] } ], "foreign_keys": [ { "column": "example", "parent_table": "example", "parent_column": "example" } ] }, "cluster_by": [ "example" ], "cluster_by_auto": true, "table_properties": { "additionalProperty": "example" } }'Generate all artifacts for a Curated layer pipeline.
Args: flow_input: Curated pipeline configuration x_environment_id: Environment ID from header (optional)
Returns: - DLT pipeline code with inline schema definition - Job YAML - Documentation - Merged bundle
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CuratedFlowInput
Input model for Curated layer code generation.
object
flow_name
required
Flow Name
string
type
Type
string
source_tables
Any of:
Array<string>
null
target_name
required
Target Name
string
trigger_type
required
Trigger Type
string
schedule
Any of:
ScheduleConfig
Schedule configuration for jobs.
object
cron
required
Cron
string
timezone
Timezone
string
null
target_schema
required
TableSchema
Table schema definition.
object
description
required
Description
string
columns
required
foreign_keys
Foreign Keys
Array<object>
ForeignKeyForeign key definition.
object
column
required
Column
string
parent_table
required
Parent Table
string
parent_column
required
Parent Column
string
cluster_by
Any of:
Array<string>
null
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
CodegenResponse
Standard response for all codegen endpoints.
object
status
Status
string
artifacts
required
errors
Errors
Array<string>
Example
{ "status": "success", "artifacts": [ { "encode_artifacts": false } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}