curl --request POST \
--url https://partner.peaka.studio/api/v1/data/projects/{projectId}/catalogs/{catalogId}/parametricTables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromSchema": "public",
"fromTable": "customers",
"toSchema": "public",
"toTable": "xyz_customers",
"paramValues": [
{
"key": "_q_account",
"value": "acme-corp"
}
]
}
'{
"fromSchema": "public",
"fromTable": "products",
"toSchema": "analytics",
"toTable": "param_products",
"paramValues": [
{
"key": "country",
"value": "US"
},
{
"key": "year",
"value": 2024
}
]
}{
"fromSchema": "<string>",
"fromTable": "<string>",
"toSchema": "<string>",
"toTable": "<string>",
"paramValues": [
{
"key": "<string>",
"value": {}
}
]
}Create Parametric Table
Creates a new Parametric Table under the specified catalog. A Parametric Table binds specific query parameter values to a source table from a REST catalog, producing a new named table (e.g., xyz_customers) that can be queried directly without supplying those parameters at query time. For example, if the source table customers requires a _q_account parameter, you can create a Parametric Table that fixes this value and exposes the result as a standalone table.
Date and timestamp parameters also accept relative-date macros, re-evaluated on every query, so a table saved as “this week’s sales” always returns the current week. Grammar: @<anchor>[(+|-)<n><unit>]
- Anchors:
@today,@yesterday,@now(current instant),@sow/@eow(week, Monday start),@som/@eom(month),@soq/@eoq(quarter),@soy/@eoy(year) - Units:
dday,wweek,Mmonth,qquarter,yyear,hhour,mminute (lowercasemis minute, uppercaseMis month) - Offsets can be chained:
@today-7d,@som-1M,@now-24h - Whitelisted Trino date expressions (e.g.
date_trunc('month', current_date)) are accepted as well
curl --request POST \
--url https://partner.peaka.studio/api/v1/data/projects/{projectId}/catalogs/{catalogId}/parametricTables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromSchema": "public",
"fromTable": "customers",
"toSchema": "public",
"toTable": "xyz_customers",
"paramValues": [
{
"key": "_q_account",
"value": "acme-corp"
}
]
}
'{
"fromSchema": "public",
"fromTable": "products",
"toSchema": "analytics",
"toTable": "param_products",
"paramValues": [
{
"key": "country",
"value": "US"
},
{
"key": "year",
"value": 2024
}
]
}{
"fromSchema": "<string>",
"fromTable": "<string>",
"toSchema": "<string>",
"toTable": "<string>",
"paramValues": [
{
"key": "<string>",
"value": {}
}
]
}

Authorizations
Use the Authorization header with the value 'Bearer ' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication
Body
Parametric Table definition