Generate Projection
POST
/api/v1/codegen/projection
const url = 'https://example.com/api/v1/codegen/projection';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"projection_name":"example","source_table":"example","source_tables":["example"],"target_table":"example","mappings":[{"source":"example","target":"example","description":"","transformation":"example"}],"sql":"example","trigger_type":"on_table_update","schedule":{"cron":"example","timezone":"UTC"},"cluster_by":["example"],"table_properties":{"additionalProperty":"example"},"warehouse":"example","requested_by":"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/projection \ --header 'Content-Type: application/json' \ --data '{ "projection_name": "example", "source_table": "example", "source_tables": [ "example" ], "target_table": "example", "mappings": [ { "source": "example", "target": "example", "description": "", "transformation": "example" } ], "sql": "example", "trigger_type": "on_table_update", "schedule": { "cron": "example", "timezone": "UTC" }, "cluster_by": [ "example" ], "table_properties": { "additionalProperty": "example" }, "warehouse": "example", "requested_by": "example" }'Generate Projection artifacts.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ProjectionFlowInput
Input model for Projection code generation.
object
projection_name
required
Projection Name
string
source_tables
Any of:
Array<string>
null
target_table
required
Target Table
string
mappings
trigger_type
Trigger Type
string
schedule
Any of:
ScheduleConfig
Schedule configuration for tasks.
object
cron
required
Cron
string
timezone
Timezone
string
null
cluster_by
Any of:
Array<string>
null
requested_by
required
Requested By
string
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": [ { "is_base64": 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" } ]}