Importing a dbt Metric
Import a metric already defined in a dbt semantic layer into PowerMetrics.
GET /direct_connections— find a connection to import from. dbt connections and data-warehouse/Cube connections are listed together; a dbt connection is the one whosedataBaseTypeis"dbt"(as opposed to its siblingscubeand the various warehouse types).GET /direct_connections/:connectionId/metrics— list the metrics the dbt project defines. Each entry is a candidate metric spec, not yet created.POST /metrics— post one of those specs back unchanged. The read-onlyproperties.sl*/supportedPeriodicitiesentries it carries are ignored rather than rejected, so there is nothing to strip first (see the Metrics guide for the field-by-field detail).
{
"name": "Total Revenue",
"description": "Sum of order revenue",
"sourceType": "DBT",
"sourceId": "conn_dbt_1",
"fieldId": "total_revenue",
"timeRefId": "metric_time",
"properties": { "numberFormat": "NUMERIC", "dataShape": "TRANSACTIONAL" },
"dimensions": [{ "name": "Region", "fieldId": "customer__region" }]
}Updated 6 days ago
Did this page help you?