Generate Projection Files
POST
/api/v1/codegen/projection/files
const url = 'https://example.com/api/v1/codegen/projection/files';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"projection_name":"example","resource_id":"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"},"use_dlt":false,"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/projection/files \ --header 'Content-Type: application/json' \ --data '{ "projection_name": "example", "resource_id": "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" }, "use_dlt": false, "cluster_by": [ "example" ], "cluster_by_auto": true, "table_properties": { "additionalProperty": "example" } }'Generate Projection artifacts and return as multipart/form-data.
Mirrors /codegen/consumption/files behavior for projections.
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 jobs.
object
cron
required
Cron
string
timezone
Timezone
string
null
use_dlt
Use Dlt
boolean
cluster_by
Any of:
Array<string>
null
Responses
Section titled “Responses”Multiple files as multipart response
Examplegenerated
exampleValidation 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" } ]}