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", "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.

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

Input model for Projection code generation.

object
projection_name
required
Projection Name
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 scheduled none
schedule
Any of:
ScheduleConfig

Schedule configuration for tasks.

object
cron
required
Cron
string
timezone
Timezone
string
default: UTC
cluster_by
Any of:
Array<string>
table_properties
Any of:
object
key
additional properties
string
warehouse
Any of:
string
requested_by
required
Requested By
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
is_base64
Is Base64
boolean
metadata
Any of:
object
key
additional properties
any
errors
Errors
Array<string>
Example
{
"status": "success",
"artifacts": [
{
"is_base64": 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"
}
]
}