Create Dynamic Table
POST
/api/v1/pipelines/dynamic-tables
const url = 'https://example.com/api/v1/pipelines/dynamic-tables';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","database":"example","schema":"example","warehouse":"example","target_lag":"DOWNSTREAM","refresh_mode":"AUTO","initialize":"ON_CREATE","query":"example","comment":"example","copy_grants":false}'};
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/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
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”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
refresh_mode
RefreshMode
Refresh mode (AUTO, FULL, INCREMENTAL)
string
initialize
InitializeBehavior
Initialize behavior (ON_CREATE, ON_SCHEDULE)
string
query
required
Query
SELECT query that defines the table
string
copy_grants
Copy Grants
Copy grants from source tables
boolean
Responses
Section titled “Responses”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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}