latestOpenAPI 3.0.02026-08-137192110.1 KB
75294f591cc2
Transforms
Create transform
Create a new transform. Provide sql_template with {{weldTag}} references. Set publish=true to immediately materialize in the data warehouse. With publish=true and materialization "table", cron_expression puts the transform on its own materialization schedule.
post/transforms
Request body
Example request
{
"name": "marketing_attribution",
"folder_path": "analytics/marketing",
"sql_template": "SELECT * FROM {{raw.stripe.payments}} WHERE created_at > CURRENT_DATE - 30",
"materialization": "view",
"documentation": "Calculates marketing attribution from ad spend and conversions.",
"cron_expression": "0 6 * * *"
}Response
The transform has been successfully created.
Example response
{
"id": "OoORhGXUVjsqFG",
"name": "marketing_attribution",
"folder_path": "analytics/marketing",
"status": "published",
"materialization": "view",
"sql_template": "SELECT * FROM {{raw.stripe.payments}} WHERE created_at > CURRENT_DATE - 30",
"parameters": [
{
"weld_tag": "raw.stripe.payments",
"type": "raw_view",
"dw_item_id": "stripe_schema.payments"
}
],
"documentation": "Calculates marketing attribution.",
"materialization_status": "completed",
"materialization_error": "Column \"foo\" not found in table \"bar\".",
"orchestration_workflow_id": "3LIw2FdxoByya9",
"cron_expression": "0 6 * * *",
"created_at": "2020-01-01T00:00:00.000Z",
"updated_at": "2020-01-01T00:00:00.000Z"
}