Skip to content

Create Dynamic Table

POST
/api/v1/pipelines/dynamic-tables
curl --request POST \
--url https://example.com/api/v1/pipelines/dynamic-tables \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "database": "example", "schema": "example", "warehouse": "example", "target_lag": "DOWNSTREAM", "refresh_mode": "AUTO", "initialize": "ON_CREATE", "query": "example", "comment": "example", "copy_grants": false }'

Create a new dynamic table.

Args: request: Dynamic table creation parameters

Returns: DynamicTableOperationResponse with operation result

Raises: HTTPException: If table creation fails

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

Request model for creating a dynamic table.

object
name
required
Name

Dynamic table name

string
database
required
Database

Database name

string
schema
required
Schema

Schema name

string
warehouse
required
Warehouse

Warehouse for refresh operations

string
target_lag
Target Lag

Target lag (e.g., ‘1 minute’, ‘5 hours’, ‘DOWNSTREAM’)

string
default: DOWNSTREAM
refresh_mode
RefreshMode

Refresh mode (AUTO, FULL, INCREMENTAL)

string
default: AUTO
Allowed values: AUTO FULL INCREMENTAL
initialize
InitializeBehavior

Initialize behavior (ON_CREATE, ON_SCHEDULE)

string
default: ON_CREATE
Allowed values: ON_CREATE ON_SCHEDULE
query
required
Query

SELECT query that defines the table

string
comment
Any of:
string
copy_grants
Copy Grants

Copy grants from source tables

boolean

Successful Response

Media typeapplication/json
DynamicTableOperationResponse

Response model for dynamic table operations.

object
table_name
required
Table Name

Dynamic table name

string
operation
required
Operation

Operation performed (create, alter, delete, refresh)

string
success
required
Success

Whether operation was successful

boolean
message
required
Message

Operation result message

string
Examplegenerated
{
"table_name": "example",
"operation": "example",
"success": true,
"message": "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"
}
]
}