diff --git a/core-spec/v1/schemas/common/query.yaml b/core-spec/v1/schemas/common/query.yaml index c42666f..621a0d1 100644 --- a/core-spec/v1/schemas/common/query.yaml +++ b/core-spec/v1/schemas/common/query.yaml @@ -543,9 +543,18 @@ $defs: native: type: string template-tags: - type: object - additionalProperties: - $ref: "#/$defs/template_tag" + description: > + Template tag definitions. The current format is a list of template + tags (order-preserving). The legacy map + format (tag name -> tag) is also accepted. + type: [array, object] + if: { type: array } + then: + items: + $ref: "#/$defs/template_tag" + else: + additionalProperties: + $ref: "#/$defs/template_tag" template_tag: type: object diff --git a/core-spec/v1/spec.md b/core-spec/v1/spec.md index 3dec209..0ca1bf8 100644 --- a/core-spec/v1/spec.md +++ b/core-spec/v1/spec.md @@ -1296,12 +1296,12 @@ database: Sample Database stages: - "lib/type": mbql.stage/native native: SELECT * FROM PRODUCTS - template-tags: {} + template-tags: [] ``` ### Template Tags -Template tags are placeholders in native SQL queries (`{{tag_name}}`) that become interactive filters or dynamic references. They are defined in the `template-tags` map, where each key must match the tag's `name` property. +Template tags are placeholders in native SQL queries (`{{tag_name}}`) that become interactive filters or dynamic references. They are defined in the `template-tags` list, where each tag's `name` must be unique within the list. #### Common Properties @@ -1310,7 +1310,7 @@ All template tags share these properties: | Property | Type | Required | Description | |----------|------|----------|-------------| | `type` | string | Yes | Tag type: `text`, `number`, `date`, `boolean`, `dimension`, `temporal-unit`, `card`, `snippet`, `table` | -| `name` | string | Yes | Tag name — must match the key in `template-tags` and the `{{name}}` in the SQL | +| `name` | string | Yes | Tag name — must match the `{{name}}` in the SQL and be unique within `template-tags` | | `id` | string | Yes | UUID identifier | | `display-name` | string | Yes | Label shown in the UI | @@ -1329,8 +1329,7 @@ A string variable. Metabase wraps the value in single quotes in the compiled SQL native: query: "SELECT * FROM PRODUCTS WHERE CATEGORY = {{category}}" template-tags: - category: - type: text + - type: text name: category id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Category @@ -1355,8 +1354,7 @@ A numeric variable. The value is inserted as-is (no quoting). native: query: "SELECT * FROM PRODUCTS WHERE PRICE > {{min_price}}" template-tags: - min_price: - type: number + - type: number name: min_price id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Minimum Price @@ -1380,8 +1378,7 @@ A date variable. The value is wrapped in single quotes. native: query: "SELECT * FROM ORDERS WHERE CREATED_AT > {{after_date}}" template-tags: - after_date: - type: date + - type: date name: after_date id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: After Date @@ -1405,8 +1402,7 @@ A boolean variable. Metabase replaces the tag with `1 = 1` (true) or `1 <> 1` (f native: query: "SELECT * FROM PRODUCTS WHERE {{is_active}}" template-tags: - is_active: - type: boolean + - type: boolean name: is_active id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Is Active @@ -1436,8 +1432,7 @@ When no value is provided, the entire `WHERE {{tag}}` clause is omitted (the que native: query: "SELECT * FROM PRODUCTS WHERE {{category_filter}}" template-tags: - category_filter: - type: dimension + - type: dimension name: category_filter id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Category @@ -1474,8 +1469,7 @@ Without `alias` — Metabase uses the column name from `dimension` (`CREATED_AT` native: query: "SELECT {{created_at}} AS created_at, COUNT(*) FROM ORDERS GROUP BY {{created_at}}" template-tags: - created_at: - type: temporal-unit + - type: temporal-unit name: created_at id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Created At @@ -1497,8 +1491,7 @@ With `alias` — when the query uses a table alias (`o`), set `alias` so the gen native: query: "SELECT {{created_at}} AS created_at, COUNT(*) FROM ORDERS o GROUP BY {{created_at}}" template-tags: - created_at: - type: temporal-unit + - type: temporal-unit name: created_at id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Created At @@ -1531,8 +1524,7 @@ Note: `default` and `required` are not applicable for card tags. native: query: "SELECT * FROM {{#42-products_question}} WHERE PRICE > 50" template-tags: - "#42-products_question": - type: card + - type: card name: "#42-products_question" id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Products Question @@ -1563,8 +1555,7 @@ Note: `default` and `required` are not applicable for snippet tags. native: query: "SELECT * FROM ORDERS WHERE {{snippet: Active Order Filter}}" template-tags: - "snippet: Active Order Filter": - type: snippet + - type: snippet name: "snippet: Active Order Filter" id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: "Snippet: Active Order Filter" @@ -1593,8 +1584,7 @@ Reference a table dynamically. The user selects a table from a dropdown and Meta native: query: "SELECT * FROM {{source_table}}" template-tags: - source_table: - type: table + - type: table name: source_table id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 display-name: Source Table diff --git a/examples/v1/collections/main/dashboards/click_behaviors.yaml b/examples/v1/collections/main/dashboards/click_behaviors.yaml index 14f12cc..beecb64 100644 --- a/examples/v1/collections/main/dashboards/click_behaviors.yaml +++ b/examples/v1/collections/main/dashboards/click_behaviors.yaml @@ -22,7 +22,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - null diff --git a/examples/v1/collections/main/dashboards/inline_parameters.yaml b/examples/v1/collections/main/dashboards/inline_parameters.yaml index 4379fcf..72aea15 100644 --- a/examples/v1/collections/main/dashboards/inline_parameters.yaml +++ b/examples/v1/collections/main/dashboards/inline_parameters.yaml @@ -70,7 +70,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - null @@ -80,7 +80,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - null diff --git a/examples/v1/collections/main/dashboards/series_and_mappings.yaml b/examples/v1/collections/main/dashboards/series_and_mappings.yaml index 8ced13e..c0dd3b2 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings.yaml @@ -28,7 +28,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - null @@ -38,7 +38,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - null diff --git a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_avg_order.yaml b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_avg_order.yaml index 9a30ecf..68d7eab 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_avg_order.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_avg_order.yaml @@ -12,7 +12,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - avg @@ -20,14 +20,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_cumulative.yaml b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_cumulative.yaml index 11bfaaf..8b4eb5a 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_cumulative.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_cumulative.yaml @@ -12,7 +12,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - cum-count @@ -21,7 +21,7 @@ dataset_query: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_orders.yaml b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_orders.yaml index 0af54db..c3c253b 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_orders.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_orders.yaml @@ -12,7 +12,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count @@ -21,7 +21,7 @@ dataset_query: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_revenue.yaml b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_revenue.yaml index 0da1c84..e62e6c4 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings/monthly_revenue.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings/monthly_revenue.yaml @@ -12,7 +12,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -20,14 +20,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/dashboards/series_and_mappings/native_orders.yaml b/examples/v1/collections/main/dashboards/series_and_mappings/native_orders.yaml index c253cd8..21cbb85 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings/native_orders.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings/native_orders.yaml @@ -11,6 +11,7 @@ dataset_query: stages: - "lib/type": mbql.stage/native native: "SELECT * FROM ORDERS WHERE TOTAL > {{min_total}}" + # legacy map format for template-tags (current format is a list) template-tags: min_total: type: number diff --git a/examples/v1/collections/main/dashboards/series_and_mappings/total_revenue_scalar.yaml b/examples/v1/collections/main/dashboards/series_and_mappings/total_revenue_scalar.yaml index e1a66d1..9875fc6 100644 --- a/examples/v1/collections/main/dashboards/series_and_mappings/total_revenue_scalar.yaml +++ b/examples/v1/collections/main/dashboards/series_and_mappings/total_revenue_scalar.yaml @@ -13,7 +13,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -21,7 +21,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL visualization_settings: {} diff --git a/examples/v1/collections/main/dashboards/tabbed_dashboard.yaml b/examples/v1/collections/main/dashboards/tabbed_dashboard.yaml index 4b202c4..d3f8b93 100644 --- a/examples/v1/collections/main/dashboards/tabbed_dashboard.yaml +++ b/examples/v1/collections/main/dashboards/tabbed_dashboard.yaml @@ -36,7 +36,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - null diff --git a/examples/v1/collections/main/dashboards/tabbed_dashboard/products_table.yaml b/examples/v1/collections/main/dashboards/tabbed_dashboard/products_table.yaml index b7d30ea..197bbe0 100644 --- a/examples/v1/collections/main/dashboards/tabbed_dashboard/products_table.yaml +++ b/examples/v1/collections/main/dashboards/tabbed_dashboard/products_table.yaml @@ -12,7 +12,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS visualization_settings: {} serdes/meta: diff --git a/examples/v1/collections/main/documents/product_analysis_report/category_breakdown.yaml b/examples/v1/collections/main/documents/product_analysis_report/category_breakdown.yaml index 6944632..6612531 100644 --- a/examples/v1/collections/main/documents/product_analysis_report/category_breakdown.yaml +++ b/examples/v1/collections/main/documents/product_analysis_report/category_breakdown.yaml @@ -13,7 +13,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - count @@ -22,7 +22,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY visualization_settings: {} diff --git a/examples/v1/collections/main/minimal/marketing_analytics/product_dashboard.yaml b/examples/v1/collections/main/minimal/marketing_analytics/product_dashboard.yaml index f53a9ef..5f0b3b9 100644 --- a/examples/v1/collections/main/minimal/marketing_analytics/product_dashboard.yaml +++ b/examples/v1/collections/main/minimal/marketing_analytics/product_dashboard.yaml @@ -22,7 +22,7 @@ dashcards: - dimension - - field - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - null diff --git a/examples/v1/collections/main/minimal/marketing_analytics/product_overview.yaml b/examples/v1/collections/main/minimal/marketing_analytics/product_overview.yaml index 696382e..2da8291 100644 --- a/examples/v1/collections/main/minimal/marketing_analytics/product_overview.yaml +++ b/examples/v1/collections/main/minimal/marketing_analytics/product_overview.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - count @@ -21,7 +21,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - avg @@ -29,14 +29,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING breakout: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY order-by: diff --git a/examples/v1/collections/main/minimal/marketing_analytics/top_products_by_revenue.yaml b/examples/v1/collections/main/minimal/marketing_analytics/top_products_by_revenue.yaml index 899d759..b423c16 100644 --- a/examples/v1/collections/main/minimal/marketing_analytics/top_products_by_revenue.yaml +++ b/examples/v1/collections/main/minimal/marketing_analytics/top_products_by_revenue.yaml @@ -21,8 +21,7 @@ dataset_query: ORDER BY revenue DESC LIMIT 10 template-tags: - category: - type: text + - type: text name: category id: b2c3d4e5-f678-90ab-cdef-1234567890ab display-name: Category diff --git a/examples/v1/collections/main/queries/arithmetic_expressions.yaml b/examples/v1/collections/main/queries/arithmetic_expressions.yaml index c9cfdb1..815c281 100644 --- a/examples/v1/collections/main/queries/arithmetic_expressions.yaml +++ b/examples/v1/collections/main/queries/arithmetic_expressions.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS expressions: - - "+" @@ -19,13 +19,13 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - SUBTOTAL - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TAX - - "-" @@ -33,13 +33,13 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - SUBTOTAL - - "*" @@ -47,7 +47,7 @@ dataset_query: - - field - base-type: type/Integer - - Sample Database - - PUBLIC + - null - ORDERS - QUANTITY - 2 @@ -56,13 +56,13 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - field - base-type: type/Integer - - Sample Database - - PUBLIC + - null - ORDERS - QUANTITY aggregation: @@ -71,7 +71,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - SUBTOTAL - - sum @@ -79,7 +79,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TAX - - sum @@ -87,7 +87,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - avg @@ -95,7 +95,7 @@ dataset_query: - - field - base-type: type/Integer - - Sample Database - - PUBLIC + - null - ORDERS - QUANTITY filters: @@ -109,7 +109,7 @@ dataset_query: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/queries/basic_aggregations.yaml b/examples/v1/collections/main/queries/basic_aggregations.yaml index 35371d4..d1549db 100644 --- a/examples/v1/collections/main/queries/basic_aggregations.yaml +++ b/examples/v1/collections/main/queries/basic_aggregations.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count @@ -21,7 +21,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - avg @@ -29,7 +29,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - min @@ -37,7 +37,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - max @@ -45,7 +45,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - count @@ -53,7 +53,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - distinct @@ -61,7 +61,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - sum @@ -70,14 +70,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT order-by: diff --git a/examples/v1/collections/main/queries/comparison_filters.yaml b/examples/v1/collections/main/queries/comparison_filters.yaml index eac16bb..dbfcbc0 100644 --- a/examples/v1/collections/main/queries/comparison_filters.yaml +++ b/examples/v1/collections/main/queries/comparison_filters.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS filters: - - between @@ -19,7 +19,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 10 @@ -29,7 +29,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - 3 @@ -38,7 +38,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - 5 @@ -47,7 +47,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - Doohickey @@ -56,7 +56,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - Widget @@ -67,7 +67,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - Widget @@ -77,7 +77,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - Doohickey @@ -87,7 +87,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - value diff --git a/examples/v1/collections/main/queries/conditional_aggregations.yaml b/examples/v1/collections/main/queries/conditional_aggregations.yaml index 9549dd3..a5a5973 100644 --- a/examples/v1/collections/main/queries/conditional_aggregations.yaml +++ b/examples/v1/collections/main/queries/conditional_aggregations.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count-where @@ -21,7 +21,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - 100 @@ -30,7 +30,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - ">" @@ -38,7 +38,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - DISCOUNT - 0 @@ -47,7 +47,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - USER_ID - - ">" @@ -55,7 +55,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - 50 @@ -66,14 +66,14 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - DISCOUNT breakout: - - field - temporal-unit: quarter - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/queries/conditional_and_type.yaml b/examples/v1/collections/main/queries/conditional_and_type.yaml index bb68690..16d0863 100644 --- a/examples/v1/collections/main/queries/conditional_and_type.yaml +++ b/examples/v1/collections/main/queries/conditional_and_type.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS expressions: - - case @@ -21,7 +21,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 100 @@ -31,7 +31,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 30 @@ -44,7 +44,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 100 @@ -57,7 +57,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - 4 @@ -67,7 +67,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 0 @@ -76,7 +76,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - integer @@ -84,7 +84,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - - float @@ -92,7 +92,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING limit: 10 diff --git a/examples/v1/collections/main/queries/cumulative_and_statistical.yaml b/examples/v1/collections/main/queries/cumulative_and_statistical.yaml index d3be917..9bc3a84 100644 --- a/examples/v1/collections/main/queries/cumulative_and_statistical.yaml +++ b/examples/v1/collections/main/queries/cumulative_and_statistical.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - cum-count @@ -21,7 +21,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - cum-sum @@ -29,47 +29,38 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - - stddev + - - avg - {} - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - - var + - - min - {} - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - - median + - - max - {} - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - - percentile - - {} - - - field - - base-type: type/Float - - - Sample Database - - PUBLIC - - ORDERS - - TOTAL - - 0.9 breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/queries/fields_and_expressions.yaml b/examples/v1/collections/main/queries/fields_and_expressions.yaml index 2c877fd..20e567d 100644 --- a/examples/v1/collections/main/queries/fields_and_expressions.yaml +++ b/examples/v1/collections/main/queries/fields_and_expressions.yaml @@ -11,25 +11,25 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS fields: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - TAX - - expression @@ -41,13 +41,13 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TAX limit: 100 diff --git a/examples/v1/collections/main/queries/geographic_filter.yaml b/examples/v1/collections/main/queries/geographic_filter.yaml index cfabfa6..fe81bc9 100644 --- a/examples/v1/collections/main/queries/geographic_filter.yaml +++ b/examples/v1/collections/main/queries/geographic_filter.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PEOPLE filters: - - inside @@ -19,13 +19,13 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PEOPLE - LATITUDE - - field - {} - - Sample Database - - PUBLIC + - null - PEOPLE - LONGITUDE - 40.8 diff --git a/examples/v1/collections/main/queries/joins.yaml b/examples/v1/collections/main/queries/joins.yaml index d1384bc..59411f6 100644 --- a/examples/v1/collections/main/queries/joins.yaml +++ b/examples/v1/collections/main/queries/joins.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS joins: - "lib/type": mbql/join @@ -19,7 +19,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS conditions: - - "=" @@ -27,13 +27,13 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - ID alias: Products @@ -44,7 +44,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PEOPLE conditions: - - "=" @@ -52,13 +52,13 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - USER_ID - - field - {} - - Sample Database - - PUBLIC + - null - PEOPLE - ID alias: People @@ -67,13 +67,13 @@ dataset_query: - - field - join-alias: People - - Sample Database - - PUBLIC + - null - PEOPLE - NAME - - field - join-alias: People - - Sample Database - - PUBLIC + - null - PEOPLE - STATE - "lib/type": mbql/join @@ -81,7 +81,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - REVIEWS conditions: - - and @@ -91,13 +91,13 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - field - {} - - Sample Database - - PUBLIC + - null - REVIEWS - PRODUCT_ID - - ">=" @@ -105,7 +105,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - REVIEWS - RATING - 4 diff --git a/examples/v1/collections/main/queries/math_functions.yaml b/examples/v1/collections/main/queries/math_functions.yaml index 32e8104..193d26e 100644 --- a/examples/v1/collections/main/queries/math_functions.yaml +++ b/examples/v1/collections/main/queries/math_functions.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS expressions: - - abs @@ -21,7 +21,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 50 @@ -30,7 +30,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - floor @@ -38,7 +38,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - round @@ -46,7 +46,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - power @@ -54,7 +54,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - 2 @@ -63,7 +63,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - - exp @@ -71,7 +71,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - - log @@ -79,7 +79,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE limit: 10 diff --git a/examples/v1/collections/main/queries/metric_measure_segment_refs.yaml b/examples/v1/collections/main/queries/metric_measure_segment_refs.yaml index eb942f9..8d854bd 100644 --- a/examples/v1/collections/main/queries/metric_measure_segment_refs.yaml +++ b/examples/v1/collections/main/queries/metric_measure_segment_refs.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - metric diff --git a/examples/v1/collections/main/queries/native_card_and_snippet.yaml b/examples/v1/collections/main/queries/native_card_and_snippet.yaml index 5850cf7..3c12ee8 100644 --- a/examples/v1/collections/main/queries/native_card_and_snippet.yaml +++ b/examples/v1/collections/main/queries/native_card_and_snippet.yaml @@ -16,14 +16,12 @@ dataset_query: ORDER BY "count" DESC LIMIT 10 template-tags: - "#1-basic_aggregations": - type: card + - type: card name: "#1-basic_aggregations" id: cc000001-0000-0000-0000-000000000001 display-name: Basic Aggregations card-id: h5F2EjHsRd73Dqqh8sAtd - "snippet: Active Product Filter": - type: snippet + - type: snippet name: "snippet: Active Product Filter" id: cc000002-0000-0000-0000-000000000002 display-name: "Snippet: Active Product Filter" diff --git a/examples/v1/collections/main/queries/native_field_filter.yaml b/examples/v1/collections/main/queries/native_field_filter.yaml index d03e977..fc46e4e 100644 --- a/examples/v1/collections/main/queries/native_field_filter.yaml +++ b/examples/v1/collections/main/queries/native_field_filter.yaml @@ -17,8 +17,7 @@ dataset_query: AND {{date_filter}} GROUP BY {{created_at}}, PRODUCTS.CATEGORY template-tags: - category_filter: - type: dimension + - type: dimension name: category_filter id: bb000001-0000-0000-0000-000000000001 display-name: Category @@ -26,12 +25,11 @@ dataset_query: - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY widget-type: string/= - date_filter: - type: dimension + - type: dimension name: date_filter id: bb000002-0000-0000-0000-000000000002 display-name: Order Date @@ -39,12 +37,11 @@ dataset_query: - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT widget-type: date/range - created_at: - type: temporal-unit + - type: temporal-unit sectionId: date name: created_at id: bb000003-0000-0000-0000-000000000003 @@ -54,7 +51,7 @@ dataset_query: - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/queries/native_variables.yaml b/examples/v1/collections/main/queries/native_variables.yaml index 1c8c973..a39dd7f 100644 --- a/examples/v1/collections/main/queries/native_variables.yaml +++ b/examples/v1/collections/main/queries/native_variables.yaml @@ -17,29 +17,25 @@ dataset_query: AND USER_ID = {{user_id}} AND {{is_active}} template-tags: - min_total: - type: number + - type: number sectionId: number name: min_total id: aa000001-0000-0000-0000-000000000001 display-name: Minimum Total default: 50 required: true - after_date: - type: date + - type: date sectionId: date name: after_date id: aa000002-0000-0000-0000-000000000002 display-name: After Date default: '2024-01-01' - user_id: - type: text + - type: text name: user_id id: aa000003-0000-0000-0000-000000000003 display-name: User ID default: '1' - is_active: - type: boolean + - type: boolean sectionId: boolean name: is_active id: aa000004-0000-0000-0000-000000000004 diff --git a/examples/v1/collections/main/queries/nested_query.yaml b/examples/v1/collections/main/queries/nested_query.yaml index 7860c31..083d30c 100644 --- a/examples/v1/collections/main/queries/nested_query.yaml +++ b/examples/v1/collections/main/queries/nested_query.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count @@ -21,14 +21,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - USER_ID - "lib/type": mbql.stage/mbql diff --git a/examples/v1/collections/main/queries/null_and_string_filters.yaml b/examples/v1/collections/main/queries/null_and_string_filters.yaml index 401783f..da6f00b 100644 --- a/examples/v1/collections/main/queries/null_and_string_filters.yaml +++ b/examples/v1/collections/main/queries/null_and_string_filters.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS filters: - - not-null @@ -19,7 +19,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - not-empty @@ -27,7 +27,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR - - is-empty @@ -35,7 +35,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR # contains — 2 args, no options @@ -44,7 +44,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - widget @@ -54,7 +54,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - gadget @@ -64,7 +64,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - widget @@ -75,7 +75,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR - LLC @@ -85,7 +85,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR - inc @@ -95,7 +95,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR - LLC @@ -106,7 +106,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - Awesome @@ -116,7 +116,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - awesome @@ -126,7 +126,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - Awesome @@ -137,7 +137,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - EAN - "0" @@ -147,7 +147,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - EAN - "9" @@ -157,7 +157,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - EAN - "0" diff --git a/examples/v1/collections/main/queries/string_functions.yaml b/examples/v1/collections/main/queries/string_functions.yaml index d27f7aa..20d87e2 100644 --- a/examples/v1/collections/main/queries/string_functions.yaml +++ b/examples/v1/collections/main/queries/string_functions.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS expressions: - - concat @@ -19,14 +19,14 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - " (" - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - ")" @@ -35,7 +35,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - 1 @@ -45,26 +45,17 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR - Inc. - Incorporated - - - regex-match-first - - "lib/expression-name": EAN Prefix - - - field - - {} - - - Sample Database - - PUBLIC - - PRODUCTS - - EAN - - "^\\d{3}" - - trim - "lib/expression-name": Trimmed Title - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - ltrim @@ -72,7 +63,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - rtrim @@ -80,7 +71,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - upper @@ -88,7 +79,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - - lower @@ -96,7 +87,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - length @@ -104,7 +95,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - substring @@ -112,7 +103,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - 5 diff --git a/examples/v1/collections/main/queries/temporal_and_logical_filters.yaml b/examples/v1/collections/main/queries/temporal_and_logical_filters.yaml index afe5d5a..52f6bbb 100644 --- a/examples/v1/collections/main/queries/temporal_and_logical_filters.yaml +++ b/examples/v1/collections/main/queries/temporal_and_logical_filters.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS filters: - - time-interval @@ -19,7 +19,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - -30 @@ -29,7 +29,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - current @@ -39,7 +39,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - -30 @@ -53,7 +53,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - DISCOUNT limit: 20 diff --git a/examples/v1/collections/main/queries/temporal_expressions.yaml b/examples/v1/collections/main/queries/temporal_expressions.yaml index 3ad2cad..458a2fb 100644 --- a/examples/v1/collections/main/queries/temporal_expressions.yaml +++ b/examples/v1/collections/main/queries/temporal_expressions.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS expressions: - - datetime-add @@ -19,7 +19,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - 7 @@ -29,7 +29,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - 1 @@ -39,7 +39,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - now @@ -50,7 +50,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - interval @@ -62,7 +62,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - datetime @@ -74,7 +74,7 @@ dataset_query: - - field - base-type: type/Integer - - Sample Database - - PUBLIC + - null - ORDERS - QUANTITY - - now diff --git a/examples/v1/collections/main/queries/temporal_extraction.yaml b/examples/v1/collections/main/queries/temporal_extraction.yaml index 88b32bb..6e3d2a5 100644 --- a/examples/v1/collections/main/queries/temporal_extraction.yaml +++ b/examples/v1/collections/main/queries/temporal_extraction.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS expressions: - - get-year @@ -19,7 +19,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-quarter @@ -27,7 +27,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-month @@ -35,7 +35,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-day @@ -43,7 +43,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-hour @@ -51,7 +51,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-minute @@ -59,7 +59,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-second @@ -67,7 +67,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-day-of-week @@ -75,7 +75,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - iso @@ -84,7 +84,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - us @@ -95,7 +95,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - quarter-name @@ -105,7 +105,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - day-name @@ -115,7 +115,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - iso @@ -124,23 +124,24 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - - get-week - - "lib/expression-name": Week Number Default + - "lib/expression-name": Week Number Instance - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT + - instance - - temporal-extract - "lib/expression-name": Extracted Month - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - month-of-year @@ -149,7 +150,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT - day-of-week diff --git a/examples/v1/collections/main/queries/total_revenue_metric.yaml b/examples/v1/collections/main/queries/total_revenue_metric.yaml index a96d0ac..f383098 100644 --- a/examples/v1/collections/main/queries/total_revenue_metric.yaml +++ b/examples/v1/collections/main/queries/total_revenue_metric.yaml @@ -12,7 +12,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -20,7 +20,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL visualization_settings: {} diff --git a/examples/v1/collections/main/queries/url_functions.yaml b/examples/v1/collections/main/queries/url_functions.yaml deleted file mode 100644 index 43e5843..0000000 --- a/examples/v1/collections/main/queries/url_functions.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: "URL Functions" -entity_id: uwAeNRHymXTD1G_7lWV1d -collection_id: cOlQuErIeS0ExAmPlE2x1 -creator_id: admin@example.com -display: table -database_id: Sample Database -dataset_query: - "lib/type": mbql/query - database: Sample Database - stages: - - "lib/type": mbql.stage/mbql - source-table: - - Sample Database - - PUBLIC - - PEOPLE - expressions: - - - host - - "lib/expression-name": Source Host - - - field - - {} - - - Sample Database - - PUBLIC - - PEOPLE - - SOURCE - - - domain - - "lib/expression-name": Source Domain - - - field - - {} - - - Sample Database - - PUBLIC - - PEOPLE - - SOURCE - - - subdomain - - "lib/expression-name": Source Subdomain - - - field - - {} - - - Sample Database - - PUBLIC - - PEOPLE - - SOURCE - - - path - - "lib/expression-name": Source Path - - - field - - {} - - - Sample Database - - PUBLIC - - PEOPLE - - SOURCE - limit: 10 -visualization_settings: {} -serdes/meta: -- id: uwAeNRHymXTD1G_7lWV1d - label: url_functions - model: Card diff --git a/examples/v1/collections/main/queries/window_offset.yaml b/examples/v1/collections/main/queries/window_offset.yaml index 8b4f86a..74bba26 100644 --- a/examples/v1/collections/main/queries/window_offset.yaml +++ b/examples/v1/collections/main/queries/window_offset.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -19,7 +19,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - - offset @@ -29,7 +29,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - -1 @@ -37,7 +37,7 @@ dataset_query: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: {} diff --git a/examples/v1/collections/main/visualization_settings/bar_chart_stacked.yaml b/examples/v1/collections/main/visualization_settings/bar_chart_stacked.yaml index b89c8cc..2f00471 100644 --- a/examples/v1/collections/main/visualization_settings/bar_chart_stacked.yaml +++ b/examples/v1/collections/main/visualization_settings/bar_chart_stacked.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count @@ -20,7 +20,7 @@ dataset_query: - - field - temporal-unit: quarter - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT joins: @@ -28,7 +28,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS conditions: - - = @@ -36,13 +36,13 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - ID alias: Products diff --git a/examples/v1/collections/main/visualization_settings/funnel.yaml b/examples/v1/collections/main/visualization_settings/funnel.yaml index 26f0cef..5f5aeec 100644 --- a/examples/v1/collections/main/visualization_settings/funnel.yaml +++ b/examples/v1/collections/main/visualization_settings/funnel.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - count @@ -20,7 +20,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY visualization_settings: diff --git a/examples/v1/collections/main/visualization_settings/gauge.yaml b/examples/v1/collections/main/visualization_settings/gauge.yaml index 8db262d..be33c34 100644 --- a/examples/v1/collections/main/visualization_settings/gauge.yaml +++ b/examples/v1/collections/main/visualization_settings/gauge.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -19,7 +19,7 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL visualization_settings: diff --git a/examples/v1/collections/main/visualization_settings/line_chart.yaml b/examples/v1/collections/main/visualization_settings/line_chart.yaml index a823f60..6c2f736 100644 --- a/examples/v1/collections/main/visualization_settings/line_chart.yaml +++ b/examples/v1/collections/main/visualization_settings/line_chart.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -19,14 +19,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: diff --git a/examples/v1/collections/main/visualization_settings/map_pins.yaml b/examples/v1/collections/main/visualization_settings/map_pins.yaml index 973ade3..17c2e0c 100644 --- a/examples/v1/collections/main/visualization_settings/map_pins.yaml +++ b/examples/v1/collections/main/visualization_settings/map_pins.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PEOPLE visualization_settings: "map.type": pin diff --git a/examples/v1/collections/main/visualization_settings/pie_chart.yaml b/examples/v1/collections/main/visualization_settings/pie_chart.yaml index 99a52a3..c7ad5d5 100644 --- a/examples/v1/collections/main/visualization_settings/pie_chart.yaml +++ b/examples/v1/collections/main/visualization_settings/pie_chart.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - count @@ -20,7 +20,7 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY visualization_settings: diff --git a/examples/v1/collections/main/visualization_settings/pivot_table.yaml b/examples/v1/collections/main/visualization_settings/pivot_table.yaml index 5c1b640..2d3b42a 100644 --- a/examples/v1/collections/main/visualization_settings/pivot_table.yaml +++ b/examples/v1/collections/main/visualization_settings/pivot_table.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count @@ -21,14 +21,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: quarter - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT joins: @@ -36,7 +36,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS conditions: - - = @@ -44,13 +44,13 @@ dataset_query: - - field - {} - - Sample Database - - PUBLIC + - null - ORDERS - PRODUCT_ID - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - ID alias: Products diff --git a/examples/v1/collections/main/visualization_settings/smart_scalar.yaml b/examples/v1/collections/main/visualization_settings/smart_scalar.yaml index b212b50..1a0f1d6 100644 --- a/examples/v1/collections/main/visualization_settings/smart_scalar.yaml +++ b/examples/v1/collections/main/visualization_settings/smart_scalar.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -19,14 +19,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: diff --git a/examples/v1/collections/main/visualization_settings/table_formatted.yaml b/examples/v1/collections/main/visualization_settings/table_formatted.yaml index d449e12..0dcd1c6 100644 --- a/examples/v1/collections/main/visualization_settings/table_formatted.yaml +++ b/examples/v1/collections/main/visualization_settings/table_formatted.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS visualization_settings: "table.columns": diff --git a/examples/v1/collections/main/visualization_settings/waterfall.yaml b/examples/v1/collections/main/visualization_settings/waterfall.yaml index 908a5f1..e8f7a58 100644 --- a/examples/v1/collections/main/visualization_settings/waterfall.yaml +++ b/examples/v1/collections/main/visualization_settings/waterfall.yaml @@ -11,7 +11,7 @@ dataset_query: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -19,14 +19,14 @@ dataset_query: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT visualization_settings: diff --git a/examples/v1/collections/snippets/active_product_filter.yaml b/examples/v1/collections/snippets/active_product_filter.yaml index f075533..cb4026b 100644 --- a/examples/v1/collections/snippets/active_product_filter.yaml +++ b/examples/v1/collections/snippets/active_product_filter.yaml @@ -1,7 +1,7 @@ name: Active Product Filter entity_id: WyQWnT23PF-SfbYLROllJ creator_id: admin@example.com -content: "\"CREATED_AT\" >= DATEADD('year', -1, CURRENT_TIMESTAMP) AND \"total_revenue\" > 100" +content: "\"CREATED_AT\" >= DATETIME('now', '-1 year') AND \"total_revenue\" > 100" serdes/meta: - id: WyQWnT23PF-SfbYLROllJ label: active_product_filter diff --git a/examples/v1/collections/transforms/hourly_product_stats.yaml b/examples/v1/collections/transforms/hourly_product_stats.yaml index 7c8d701..e73779d 100644 --- a/examples/v1/collections/transforms/hourly_product_stats.yaml +++ b/examples/v1/collections/transforms/hourly_product_stats.yaml @@ -11,7 +11,7 @@ source: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - count @@ -21,14 +21,14 @@ source: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE breakout: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY target: diff --git a/examples/v1/collections/transforms/mbql_transform.yaml b/examples/v1/collections/transforms/mbql_transform.yaml index ffe91db..180c34d 100644 --- a/examples/v1/collections/transforms/mbql_transform.yaml +++ b/examples/v1/collections/transforms/mbql_transform.yaml @@ -11,7 +11,7 @@ source: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count @@ -21,14 +21,14 @@ source: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL breakout: - - field - temporal-unit: month - - Sample Database - - PUBLIC + - null - ORDERS - CREATED_AT target: diff --git a/examples/v1/collections/transforms/product_summary.yaml b/examples/v1/collections/transforms/product_summary.yaml index 018194c..4eca70a 100644 --- a/examples/v1/collections/transforms/product_summary.yaml +++ b/examples/v1/collections/transforms/product_summary.yaml @@ -11,7 +11,7 @@ source: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - count @@ -21,14 +21,14 @@ source: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE breakout: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY target: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/avg_revenue_per_order.yaml b/examples/v1/databases/sample_database/tables/orders/measures/avg_revenue_per_order.yaml similarity index 93% rename from examples/v1/databases/sample_database/schemas/public/tables/orders/measures/avg_revenue_per_order.yaml rename to examples/v1/databases/sample_database/tables/orders/measures/avg_revenue_per_order.yaml index 6299fba..661ac0b 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/avg_revenue_per_order.yaml +++ b/examples/v1/databases/sample_database/tables/orders/measures/avg_revenue_per_order.yaml @@ -4,7 +4,7 @@ creator_id: admin@example.com description: Uses Total Revenue and Order Count measures table_id: - Sample Database -- PUBLIC +- null - ORDERS definition: "lib/type": mbql/query @@ -13,7 +13,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - avg @@ -21,7 +21,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/median_order_total.yaml b/examples/v1/databases/sample_database/tables/orders/measures/median_order_total.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/orders/measures/median_order_total.yaml rename to examples/v1/databases/sample_database/tables/orders/measures/median_order_total.yaml index d70331f..9dec443 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/median_order_total.yaml +++ b/examples/v1/databases/sample_database/tables/orders/measures/median_order_total.yaml @@ -3,7 +3,7 @@ entity_id: d4G5fMj5smJ17Nd0dvE2A creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - ORDERS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - median @@ -20,7 +20,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/order_count.yaml b/examples/v1/databases/sample_database/tables/orders/measures/order_count.yaml similarity index 94% rename from examples/v1/databases/sample_database/schemas/public/tables/orders/measures/order_count.yaml rename to examples/v1/databases/sample_database/tables/orders/measures/order_count.yaml index fe0ccfa..ee21c0f 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/order_count.yaml +++ b/examples/v1/databases/sample_database/tables/orders/measures/order_count.yaml @@ -3,7 +3,7 @@ entity_id: DBap2523KuN4Lt-cYrUjF creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - ORDERS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - count diff --git a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/total_revenue.yaml b/examples/v1/databases/sample_database/tables/orders/measures/total_revenue.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/orders/measures/total_revenue.yaml rename to examples/v1/databases/sample_database/tables/orders/measures/total_revenue.yaml index f607245..67e1404 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/orders/measures/total_revenue.yaml +++ b/examples/v1/databases/sample_database/tables/orders/measures/total_revenue.yaml @@ -3,7 +3,7 @@ entity_id: 8WteUpyQQqObrxLv4KQ-j creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - ORDERS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS aggregation: - - sum @@ -20,7 +20,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/orders/segments/large_orders.yaml b/examples/v1/databases/sample_database/tables/orders/segments/large_orders.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/orders/segments/large_orders.yaml rename to examples/v1/databases/sample_database/tables/orders/segments/large_orders.yaml index 04f51f9..7b4e382 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/orders/segments/large_orders.yaml +++ b/examples/v1/databases/sample_database/tables/orders/segments/large_orders.yaml @@ -3,7 +3,7 @@ entity_id: OaFXAvEzPvu9ZXW5PUMRa creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - ORDERS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - ORDERS filters: - - ">" @@ -20,7 +20,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - ORDERS - TOTAL - 50 diff --git a/examples/v1/databases/sample_database/schemas/public/tables/people/segments/nyc_area.yaml b/examples/v1/databases/sample_database/tables/people/segments/nyc_area.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/people/segments/nyc_area.yaml rename to examples/v1/databases/sample_database/tables/people/segments/nyc_area.yaml index eeec4fb..972e7bb 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/people/segments/nyc_area.yaml +++ b/examples/v1/databases/sample_database/tables/people/segments/nyc_area.yaml @@ -4,7 +4,7 @@ creator_id: admin@example.com description: People located within the NYC bounding box table_id: - Sample Database -- PUBLIC +- null - PEOPLE definition: "lib/type": mbql/query @@ -13,7 +13,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PEOPLE filters: - - inside @@ -21,13 +21,13 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PEOPLE - LATITUDE - - field - {} - - Sample Database - - PUBLIC + - null - PEOPLE - LONGITUDE - 40.92 diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/average_product_price.yaml b/examples/v1/databases/sample_database/tables/products/measures/average_product_price.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/products/measures/average_product_price.yaml rename to examples/v1/databases/sample_database/tables/products/measures/average_product_price.yaml index 4699561..d63f3e0 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/average_product_price.yaml +++ b/examples/v1/databases/sample_database/tables/products/measures/average_product_price.yaml @@ -3,7 +3,7 @@ entity_id: mSrAvgProdPrice00008x creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - avg @@ -20,7 +20,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/avg_product_price.yaml b/examples/v1/databases/sample_database/tables/products/measures/avg_product_price.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/products/measures/avg_product_price.yaml rename to examples/v1/databases/sample_database/tables/products/measures/avg_product_price.yaml index 170929c..f9c5b9f 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/avg_product_price.yaml +++ b/examples/v1/databases/sample_database/tables/products/measures/avg_product_price.yaml @@ -3,7 +3,7 @@ entity_id: xK7mPqR2sT4uVwXyZ9a1b creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - avg @@ -20,7 +20,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/avg_widget_price.yaml b/examples/v1/databases/sample_database/tables/products/measures/avg_widget_price.yaml similarity index 94% rename from examples/v1/databases/sample_database/schemas/public/tables/products/measures/avg_widget_price.yaml rename to examples/v1/databases/sample_database/tables/products/measures/avg_widget_price.yaml index 452efff..85a8701 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/avg_widget_price.yaml +++ b/examples/v1/databases/sample_database/tables/products/measures/avg_widget_price.yaml @@ -4,7 +4,7 @@ creator_id: admin@example.com description: Average price of Widget products — uses Widget Products segment and Average Product Price measure table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -13,7 +13,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - avg @@ -21,7 +21,7 @@ definition: - - field - base-type: type/Float - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/product_count.yaml b/examples/v1/databases/sample_database/tables/products/measures/product_count.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/products/measures/product_count.yaml rename to examples/v1/databases/sample_database/tables/products/measures/product_count.yaml index e8b2581..3d16643 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/measures/product_count.yaml +++ b/examples/v1/databases/sample_database/tables/products/measures/product_count.yaml @@ -3,7 +3,7 @@ entity_id: 8kxQ2Wr7PmN5dLf3hYz9v creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS aggregation: - - distinct @@ -20,7 +20,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - ID serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/premium_widgets.yaml b/examples/v1/databases/sample_database/tables/products/segments/premium_widgets.yaml similarity index 94% rename from examples/v1/databases/sample_database/schemas/public/tables/products/segments/premium_widgets.yaml rename to examples/v1/databases/sample_database/tables/products/segments/premium_widgets.yaml index 723a7b0..6113f64 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/premium_widgets.yaml +++ b/examples/v1/databases/sample_database/tables/products/segments/premium_widgets.yaml @@ -4,7 +4,7 @@ creator_id: admin@example.com description: Widget products priced above $50 — refines the Widget Products segment table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -13,7 +13,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS filters: - - segment @@ -24,7 +24,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 50 diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/recent_midrange.yaml b/examples/v1/databases/sample_database/tables/products/segments/recent_midrange.yaml similarity index 91% rename from examples/v1/databases/sample_database/schemas/public/tables/products/segments/recent_midrange.yaml rename to examples/v1/databases/sample_database/tables/products/segments/recent_midrange.yaml index e0b727d..c9310a1 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/recent_midrange.yaml +++ b/examples/v1/databases/sample_database/tables/products/segments/recent_midrange.yaml @@ -4,7 +4,7 @@ creator_id: admin@example.com description: Products created in last year, priced 20-100, not null rating table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -13,7 +13,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS filters: - - between @@ -21,7 +21,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - PRICE - 20 @@ -31,7 +31,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - RATING - - time-interval @@ -39,7 +39,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CREATED_AT - -1 @@ -51,7 +51,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR serdes/meta: diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/searchable_products.yaml b/examples/v1/databases/sample_database/tables/products/segments/searchable_products.yaml similarity index 91% rename from examples/v1/databases/sample_database/schemas/public/tables/products/segments/searchable_products.yaml rename to examples/v1/databases/sample_database/tables/products/segments/searchable_products.yaml index 4ebaa6b..ed75130 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/searchable_products.yaml +++ b/examples/v1/databases/sample_database/tables/products/segments/searchable_products.yaml @@ -4,7 +4,7 @@ creator_id: admin@example.com description: Products with non-empty title containing "awesome", vendor starting with "A" table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -13,7 +13,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS filters: - - not-empty @@ -21,7 +21,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - - contains @@ -29,7 +29,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - awesome @@ -38,7 +38,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - VENDOR - A @@ -47,7 +47,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - TITLE - discontinued @@ -56,7 +56,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - EAN - "0" diff --git a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/widget_products.yaml b/examples/v1/databases/sample_database/tables/products/segments/widget_products.yaml similarity index 92% rename from examples/v1/databases/sample_database/schemas/public/tables/products/segments/widget_products.yaml rename to examples/v1/databases/sample_database/tables/products/segments/widget_products.yaml index c151d7b..5c1dceb 100644 --- a/examples/v1/databases/sample_database/schemas/public/tables/products/segments/widget_products.yaml +++ b/examples/v1/databases/sample_database/tables/products/segments/widget_products.yaml @@ -3,7 +3,7 @@ entity_id: aB3kLmN9pQrStUvWxYz1a creator_id: admin@example.com table_id: - Sample Database -- PUBLIC +- null - PRODUCTS definition: "lib/type": mbql/query @@ -12,7 +12,7 @@ definition: - "lib/type": mbql.stage/mbql source-table: - Sample Database - - PUBLIC + - null - PRODUCTS filters: - - = @@ -20,7 +20,7 @@ definition: - - field - {} - - Sample Database - - PUBLIC + - null - PRODUCTS - CATEGORY - Widget diff --git a/package.json b/package.json index 2ec963f..bbe8d0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metabase/representations", - "version": "1.1.7", + "version": "1.2.0", "description": "Metabase representation format specification and schema validator", "license": "SEE LICENSE IN LICENSE.txt", "repository": {