Skip to content

Generate Projection Files

POST
/api/v1/codegen/projection/files
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.

X-Environment-Id
Any of:
string
Media typeapplication/json
ProjectionFlowInput

Input model for Projection code generation.

object
projection_name
required
Projection Name
string
resource_id
Any of:
string
source_table
Any of:
string
source_tables
Any of:
Array<string>
target_table
required
Target Table
string
mappings
Mappings
Array<object>
ColumnMapping

Column-level mapping for projections.

object
source
required
Source
string
target
required
Target
string
description
Any of:
string
transformation
Any of:
string
sql
Any of:
string
trigger_type
Trigger Type
string
default: on_table_update
Allowed values: on_table_update batch none
schedule
Any of:
ScheduleConfig

Schedule configuration for jobs.

object
cron
required
Cron
string
timezone
Timezone
string
default: UTC
use_dlt
Use Dlt
boolean
cluster_by
Any of:
Array<string>
cluster_by_auto
Any of:
boolean
table_properties
Any of:
object
key
additional properties
string

Multiple files as multipart response

Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}