Skip to content

Generate Projection

POST
/api/v1/codegen/projection
curl --request POST \
--url https://example.com/api/v1/codegen/projection \
--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 all artifacts for a Projection (Silver → Gold mapping).

Args: projection_input: Projection configuration x_environment_id: Environment ID from header (optional)

Returns: - DLT materialized view or SQL projection - Job YAML - Mapping documentation - Merged bundle

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

Successful Response

Media typeapplication/json
CodegenResponse

Standard response for all codegen endpoints.

object
status
Status
string
default: success
Allowed values: success error
artifacts
required
Artifacts
Array<object>
ArtifactOutput

Standard artifact output format.

object
path
required
Path
string
content
required
Content
string
file_type
Any of:
string
encode_artifacts
Encode Artifacts
boolean
metadata
Any of:
object
key
additional properties
any
errors
Errors
Array<string>
Example
{
"status": "success",
"artifacts": [
{
"encode_artifacts": false
}
]
}

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"
}
]
}