diff --git a/Makefile b/Makefile index 8f77876c..36197c46 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,7 @@ check: check-fmt check-imports check-lint-python check-type .PHONY: check test: + rm -rf tests/tmp python3 -m unittest tests .PHONY: test diff --git a/dbtmetabase/_exposures.py b/dbtmetabase/_exposures.py index 7cf4cb76..4e95927e 100644 --- a/dbtmetabase/_exposures.py +++ b/dbtmetabase/_exposures.py @@ -165,8 +165,6 @@ def extract_exposures( count = counts.get(name, 0) counts[name] = count + 1 - _logger.error(ctx.model_refs) - exposures.append( { "id": item["id"], @@ -183,11 +181,13 @@ def extract_exposures( creator_name=creator_name or "", creator_email=creator_email or "", native_query=native_query, - depends_on={ - ctx.model_refs[depend.lower()] - for depend in depends - if depend.lower() in ctx.model_refs - }, + depends_on=sorted( + [ + ctx.model_refs[depend.lower()] + for depend in depends + if depend.lower() in ctx.model_refs + ] + ), ), } ) diff --git a/requirements-test.txt b/requirements-test.txt index d39a6001..1f959e9b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -7,5 +7,6 @@ pylint>=3.0.2 mypy>=1.7.1 molot~=1.0.0 dbt-postgres~=1.8.1 +python-dotenv~=1.0.1 types-requests types-PyYAML diff --git a/sandbox/.gitignore b/sandbox/.gitignore new file mode 100644 index 00000000..f008ba59 --- /dev/null +++ b/sandbox/.gitignore @@ -0,0 +1 @@ +/metabase/metabase.db.trace.db diff --git a/sandbox/docker-compose.yml b/sandbox/docker-compose.yml index b023427b..02b7fe8e 100644 --- a/sandbox/docker-compose.yml +++ b/sandbox/docker-compose.yml @@ -24,13 +24,16 @@ services: build: dockerfile: Dockerfile-metabase args: - - MB_VERSION=0.50.3 + - MB_VERSION=0.50.5 environment: - MB_SETUP_TOKEN=${MB_SETUP_TOKEN:-} + - MB_DB_FILE=/metabase-data/metabase.db ports: - ${MB_PORT}:3000 networks: - common + volumes: + - ./metabase:/metabase-data healthcheck: test: ["CMD-SHELL", "curl --fail http://localhost:3000/api/health"] interval: 10s diff --git a/sandbox/entrypoint.py b/sandbox/entrypoint.py index 4ff27b1b..46870eb4 100755 --- a/sandbox/entrypoint.py +++ b/sandbox/entrypoint.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import time +import logging import requests from molot import envarg, envarg_int, evaluate, shell, target @@ -16,10 +16,12 @@ MB_PASSWORD = envarg("MB_PASSWORD") MB_NAME = envarg("MB_NAME", "dbtmetabase") +MB_API_URL = f"http://{MB_HOST}:{MB_PORT}/api" + @target( description="initial setup", - depends=["metabase_setup", "dbt_run", "metabase_content"], + depends=["dbt_run", "metabase_setup"], ) def init(): pass @@ -31,20 +33,10 @@ def dbt_run(): shell("dbt run --profiles-dir .") -def _session_headers(): - session_id = requests.post( - url=f"http://{MB_HOST}:{MB_PORT}/api/session", - json={"username": MB_USER, "password": MB_PASSWORD}, - timeout=10, - ).json()["id"] - - return {"X-Metabase-Session": session_id} - - @target(description="set up Metabase user and database") def metabase_setup(): - requests.post( - url=f"http://{MB_HOST}:{MB_PORT}/api/setup", + setup_resp = requests.post( + url=f"{MB_API_URL}/setup", json={ "token": MB_SETUP_TOKEN, "user": { @@ -55,28 +47,6 @@ def metabase_setup(): "password_confirm": MB_PASSWORD, "password": MB_PASSWORD, }, - "database": { - "engine": "postgres", - "name": POSTGRES_DB, - "details": { - "host": POSTGRES_HOST, - "port": POSTGRES_PORT, - "dbname": POSTGRES_DB, - "user": POSTGRES_USER, - "password": POSTGRES_PASSWORD, - "schema-filters-type": "all", - "ssl": False, - "tunnel-enabled": False, - "advanced-options": False, - }, - "is_on_demand": False, - "is_full_sync": True, - "is_sample": False, - "cache_ttl": None, - "refingerprint": False, - "auto_run_queries": True, - "schedules": {}, - }, "prefs": { "site_name": MB_NAME, "site_locale": "en", @@ -84,160 +54,104 @@ def metabase_setup(): }, }, timeout=10, - ).raise_for_status() + ) + if setup_resp.status_code == 200: + logging.info("Metabase setup successful") + elif setup_resp.status_code == 403: + logging.info("Metabase already set up") + else: + raise requests.HTTPError(f"Error: {setup_resp.reason}", response=setup_resp) - requests.post( - url=f"http://{MB_HOST}:{MB_PORT}/api/database", - headers=_session_headers(), - json={ - "engine": "postgres", - "name": POSTGRES_DB, - "details": { - "host": POSTGRES_HOST, - "port": POSTGRES_PORT, - "dbname": POSTGRES_DB, - "user": POSTGRES_USER, - "password": POSTGRES_PASSWORD, - "schema-filters-type": "all", - "ssl": False, - "tunnel-enabled": False, - "advanced-options": False, - }, - "is_on_demand": False, - "is_full_sync": True, - "is_sample": False, - "cache_ttl": None, - "refingerprint": False, - "auto_run_queries": True, - "schedules": {}, - }, + session_id = requests.post( + url=f"{MB_API_URL}/session", + json={"username": MB_USER, "password": MB_PASSWORD}, timeout=10, - ).raise_for_status() - + ).json()["id"] -@target(description="add mock content to Metabase") -def metabase_content(): - headers = _session_headers() + headers = {"X-Metabase-Session": session_id} database_id = "" + sample_database_id = "" databases = requests.get( - url=f"http://{MB_HOST}:{MB_PORT}/api/database", + url=f"{MB_API_URL}/database", headers=headers, - json={}, timeout=10, ).json()["data"] for db in databases: - if db["name"] == POSTGRES_DB: + if db["name"] == POSTGRES_DB and db["engine"] == "postgres": database_id = db["id"] - break - - requests.post( - url=f"http://{MB_HOST}:{MB_PORT}/api/database/{database_id}/sync_schema", - headers=headers, - json={}, - timeout=10, - ) - - time.sleep(5) - - tables_fields = requests.get( - url=f"http://{MB_HOST}:{MB_PORT}/api/database/{database_id}?include=tables.fields", + elif db["name"] == "Sample Database" and db["engine"] == "h2": + sample_database_id = db["id"] + + if sample_database_id: + logging.info("Archiving Metabase sample database %s", sample_database_id) + requests.delete( + url=f"{MB_API_URL}/database/{sample_database_id}", + headers=headers, + timeout=10, + ).raise_for_status() + + collections = requests.get( + url=f"{MB_API_URL}/collection", headers=headers, timeout=10, ).json() - - customers_table_id = "" - first_order_field_id = "" - for table in tables_fields["tables"]: - if table["name"] == "customers": - customers_table_id = table["id"] - for field in table["fields"]: - if field["name"] == "first_order": - first_order_field_id = field["id"] - break - + for collection in collections: + if collection.get("is_sample") == True and collection.get("archived") == False: + logging.info("Deleting Metabase sample collection %s", collection["id"]) + requests.put( + url=f"{MB_API_URL}/collection/{collection['id']}", + headers=headers, + json={"archived": True}, + timeout=10, + ).raise_for_status() + + database_body = { + "engine": "postgres", + "name": POSTGRES_DB, + "details": { + "host": POSTGRES_HOST, + "port": POSTGRES_PORT, + "dbname": POSTGRES_DB, + "user": POSTGRES_USER, + "password": POSTGRES_PASSWORD, + "schema-filters-type": "all", + "ssl": False, + "tunnel-enabled": False, + "advanced-options": False, + }, + "is_on_demand": False, + "is_full_sync": True, + "is_sample": False, + "cache_ttl": None, + "refingerprint": False, + "auto_run_queries": True, + "schedules": {}, + } + if not database_id: + logging.info("Creating Metabase database") + database_id = requests.post( + url=f"{MB_API_URL}/database", + headers=headers, + json=database_body, + timeout=10, + ).json()["id"] + else: + logging.info("Updating Metabase database %s", database_id) + requests.put( + url=f"{MB_API_URL}/database/{database_id}", + headers=headers, + json=database_body, + timeout=10, + ).raise_for_status() + + logging.info("Triggering Metabase database sync") requests.post( - url=f"http://{MB_HOST}:{MB_PORT}/api/card", + url=f"{MB_API_URL}/database/{database_id}/sync_schema", headers=headers, - json={ - "name": "Customers", - "dataset_query": { - "database": database_id, - "type": "query", - "query": { - "source-table": customers_table_id, - "aggregation": [["count"]], - "breakout": [ - [ - "field", - first_order_field_id, - {"base-type": "type/Date", "temporal-unit": "month"}, - ] - ], - }, - }, - "display": "line", - "description": "Customers test", - "visualization_settings": { - "graph.dimensions": ["first_order"], - "graph.metrics": ["count"], - }, - "collection_id": None, - "collection_position": None, - "result_metadata": [ - { - "description": None, - "semantic_type": None, - "coercion_strategy": None, - "unit": "month", - "name": "first_order", - "settings": None, - "fk_target_field_id": None, - "field_ref": [ - "field", - first_order_field_id, - {"base-type": "type/Date", "temporal-unit": "month"}, - ], - "effective_type": "type/DateTimeWithLocalTZ", - "id": first_order_field_id, - "visibility_type": "normal", - "display_name": "First Order", - "fingerprint": { - "global": {"distinct-count": 47, "nil%": 0.38}, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07", - } - }, - }, - "base_type": "type/DateTimeWithLocalTZ", - }, - { - "display_name": "Count", - "semantic_type": "type/Quantity", - "field_ref": ["aggregation", 0], - "name": "count", - "base_type": "type/BigInteger", - "effective_type": "type/BigInteger", - "fingerprint": { - "global": {"distinct-count": 4, "nil%": 0}, - "type": { - "type/Number": { - "min": 2, - "q1": 11.298221281347036, - "q3": 27.5, - "max": 38, - "sd": 12.96148139681572, - "avg": 20, - } - }, - }, - }, - ], - }, + json={}, timeout=10, - ) + ).raise_for_status() evaluate() diff --git a/sandbox/metabase/metabase.db.mv.db b/sandbox/metabase/metabase.db.mv.db new file mode 100644 index 00000000..9f6850fb Binary files /dev/null and b/sandbox/metabase/metabase.db.mv.db differ diff --git a/tests/_mocks.py b/tests/_mocks.py index d0a96e22..49c31811 100644 --- a/tests/_mocks.py +++ b/tests/_mocks.py @@ -1,8 +1,10 @@ import json +import os from pathlib import Path -from typing import Any, Dict, Mapping, Optional, Sequence +from typing import Any, Dict, Mapping, Optional, Sequence, Union import requests +from dotenv import dotenv_values from dbtmetabase.core import DbtMetabase from dbtmetabase.manifest import Manifest, Model @@ -11,14 +13,28 @@ FIXTURES_PATH = Path("tests") / "fixtures" TMP_PATH = Path("tests") / "tmp" +RECORD = os.getenv("RECORD", "").lower() == "true" +SANDBOX_ENV = dotenv_values(Path().parent / "sandbox" / ".env") + class MockMetabase(Metabase): - def __init__(self, url: str): + def __init__(self, url: str, record: bool = False): + self.record = record + + api_key = "dummy" + username = None + password = None + + if record: + api_key = None + username = SANDBOX_ENV["MB_USER"] + password = SANDBOX_ENV["MB_PASSWORD"] + super().__init__( url=url, - api_key="dummy", - username="None", - password=None, + api_key=api_key, + username=username, + password=password, session_id=None, skip_verify=False, cert=None, @@ -33,18 +49,29 @@ def _api( path: str, params: Optional[Dict[str, Any]] = None, **kwargs, - ) -> Mapping: + ) -> Union[Mapping, Sequence]: path_toks = f"{path.lstrip('/')}.json".split("/") - if path_toks[0] == "api" and method == "get": - json_path = Path.joinpath(FIXTURES_PATH, *path_toks) - if json_path.exists(): - with open(json_path, encoding="utf-8") as f: - return json.load(f) - else: - response = requests.Response() - response.status_code = 404 - raise requests.exceptions.HTTPError(response=response) - return {} + json_path = Path.joinpath(FIXTURES_PATH, *path_toks) + + if self.record: + resp = super()._api(method, path, params, **kwargs) + + if method == "get": + json_path.parent.mkdir(parents=True, exist_ok=True) + with open(json_path, "w", encoding="utf-8") as f: + json.dump(resp, f, indent=4) + + return resp + else: + if method == "get": + if json_path.exists(): + with open(json_path, encoding="utf-8") as f: + return json.load(f) + else: + response = requests.Response() + response.status_code = 404 + raise requests.exceptions.HTTPError(response=response) + return {} class MockManifest(Manifest): @@ -59,8 +86,8 @@ def read_models(self) -> Sequence[Model]: class MockDbtMetabase(DbtMetabase): def __init__( self, - manifest_path: Path = FIXTURES_PATH / "manifest-v2.json", - metabase_url: str = "http://localhost:3000", + manifest_path: Path = FIXTURES_PATH / "manifest-v12.json", + metabase_url: str = f"http://localhost:{SANDBOX_ENV['MB_PORT']}", ): # pylint: disable=super-init-not-called self._manifest = MockManifest(path=manifest_path) - self._metabase = MockMetabase(url=metabase_url) + self._metabase = MockMetabase(url=metabase_url, record=RECORD) diff --git a/tests/fixtures/api/card.json b/tests/fixtures/api/card.json deleted file mode 100644 index d7f46454..00000000 --- a/tests/fixtures/api/card.json +++ /dev/null @@ -1,3463 +0,0 @@ -[ - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 35, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 15.0, - "q3": 40.10050506338833, - "max": 131.0, - "sd": 26.119172295224672, - "avg": 32.15384615384615 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 34, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.17157287525381, - "q3": 34.732050807568875, - "max": 99.0, - "sd": 17.628392521514144, - "avg": 26.39102564102564 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customer_lifetime_value over time", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.456526Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 41, - null - ] - ], - [ - "avg", - [ - "field", - 41, - null - ] - ] - ] - } - }, - "id": 9, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.208516Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#f9d45c", - "#F1B556" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.189846Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 33, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 17.0, - "q3": 55.93725393319377, - "max": 129.0, - "sd": 25.492672054973276, - "avg": 36.34782608695652 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 35, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 15.0, - "q3": 33.53589838486224, - "max": 65.0, - "sd": 17.057530000270994, - "avg": 27.342391304347824 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customer_lifetime_value over time", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.665585Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 41, - null - ] - ], - [ - "avg", - [ - "field", - 41, - null - ] - ] - ] - } - }, - "id": 11, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.544961Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#f9d45c", - "#F1B556" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.52841Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.0, - "max": 0.0, - "sd": null, - "avg": 0.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers added in the last 30 days", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.000946Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "filter": [ - "time-interval", - [ - "field", - 42, - null - ], - -30, - "day" - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 4, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.545719Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:37.535187Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.0, - "max": 0.0, - "sd": null, - "avg": 0.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers added in the last 30 days", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.157282Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "filter": [ - "time-interval", - [ - "field", - 39, - null - ], - -30, - "day" - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 5, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.641827Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:37.630969Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "name": "customer_lifetime_value", - "field_ref": [ - "field", - 41, - { - "binning": { - "strategy": "num-bins", - "min-value": 0.0, - "max-value": 100.0, - "num-bins": 8, - "bin-width": 12.5 - } - } - ], - "effective_type": "type/BigInteger", - "id": 41, - "display_name": "customer_lifetime_value", - "fingerprint": { - "global": { - "distinct-count": 36, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.464101615137753, - "q3": 35.46410161513776, - "max": 99.0, - "sd": 18.812245525263663, - "avg": 26.967741935483872 - } - } - }, - "base_type": "type/Decimal" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 3.0, - "q3": 17.5, - "max": 38.0, - "sd": 12.294017127971522, - "avg": 12.5 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers by customer_lifetime_value", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.20895Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 41, - { - "binning": { - "strategy": "default" - } - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 7, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.870294Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "customer_lifetime_value" - ], - "graph.colors": [ - "#A6E7F3" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:37.858387Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": "type/Quantity", - "coercion_strategy": null, - "name": "number_of_orders", - "field_ref": [ - "field", - 40, - { - "binning": { - "strategy": "num-bins", - "min-value": 1.0, - "max-value": 5.0, - "num-bins": 8, - "bin-width": 0.5 - } - } - ], - "effective_type": "type/BigInteger", - "id": 40, - "display_name": "number_of_orders", - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.0901356485315583, - "max": 5.0, - "sd": 0.7779687173818424, - "avg": 1.596774193548387 - } - } - }, - "base_type": "type/Decimal" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 4.0, - "q3": 34.25, - "max": 38.0, - "sd": 16.492422502470642, - "avg": 20.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers by number_of_orders", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.107313Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 40, - { - "binning": { - "strategy": "default" - } - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 6, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.76733Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "number_of_orders" - ], - "graph.colors": [ - "#EF8C8C" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:37.754606Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 7, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0200644129064447, - "q3": 2.3725029928215275, - "max": 7.0, - "sd": 1.25650644505132, - "avg": 1.9038461538461537 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.019031639883796, - "max": 5.0, - "sd": 0.7594097162561813, - "avg": 1.573717948717949 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": null, - "query_type": "query", - "name": "Customers, Sum of Number Of Orders and Average of Number Of Orders, Grouped by Most Recent Order (day)", - "creator_id": 1, - "updated_at": "2021-07-21T19:19:58.848286Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 1, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:00:47.4892Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "collection": null, - "favorite": false, - "created_at": "2021-07-21T08:00:47.453351Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 6, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.1073874870150486, - "q3": 3.0, - "max": 5.0, - "sd": 1.2643380578934107, - "avg": 2.152173913043478 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.019470273980893, - "q3": 1.989426104361334, - "max": 5.0, - "sd": 0.7515349295958083, - "avg": 1.596014492753623 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Number_of_orders over time", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.321381Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 10, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.368218Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.347535Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 7, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0200644129064447, - "q3": 2.3725029928215275, - "max": 7.0, - "sd": 1.25650644505132, - "avg": 1.9038461538461537 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.019031639883796, - "max": 5.0, - "sd": 0.7594097162561813, - "avg": 1.573717948717949 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Number_of_orders over time", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.368004Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 8, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.030503Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.016244Z", - "public_uuid": null - }, - { - "description": "Nice KPI", - "archived": false, - "collection_position": null, - "table_id": 6, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 99, - "q1": 99, - "q3": 99, - "max": 99, - "sd": null, - "avg": 99 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": null, - "query_type": "query", - "name": "Orders, Count", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:14.290572Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 6, - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 2, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:14.3056Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "Number of orders" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": null, - "favorite": false, - "created_at": "2021-07-21T08:01:14.290572Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day-of-week", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day-of-week" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 6.0, - "q1": 7.414213562373095, - "q3": 15.782357300628025, - "max": 38.0, - "sd": 10.488088481701515, - "avg": 12.5 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by day of the week", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.346492Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day-of-week" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 12, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.676704Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.662485Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day-of-week", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day-of-week" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 6, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 6.0, - "q1": 7.414213562373095, - "q3": 11.757359312880714, - "max": 38.0, - "sd": 10.528871870107588, - "avg": 12.5 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by day of the week", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.483723Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day-of-week" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 13, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.821564Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.808186Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "month-of-year", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "month-of-year" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 4, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 2.0, - "q1": 11.298221281347036, - "q3": 27.5, - "max": 38.0, - "sd": 12.96148139681572, - "avg": 20.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by month of the year", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.52292Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "month-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 15, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.098141Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:39.084258Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "month-of-year", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "month-of-year" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 8.0, - "q1": 10.25, - "q3": 30.5, - "max": 38.0, - "sd": 12.62933094031509, - "avg": 20.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by month of the year", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.562877Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "month-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 14, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.953633Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:38.938688Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "quarter-of-year", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "quarter-of-year" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 3, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 2.0, - "q1": 11.0, - "q3": 54.5, - "max": 60.0, - "sd": 29.280255007997, - "avg": 33.333333333333336 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by quarter of the year", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.603496Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "quarter-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 17, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.385031Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:39.371067Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "quarter-of-year", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "quarter-of-year" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 3, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 8.0, - "q1": 15.5, - "q3": 50.0, - "max": 54.0, - "sd": 23.35237318418266, - "avg": 33.333333333333336 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by quarter of the year", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.567707Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "quarter-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 16, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.243522Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:39.228965Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 100.0, - "q1": 100.0, - "q3": 100.0, - "max": 100.0, - "sd": null, - "avg": 100.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Total customers", - "creator_id": 1, - "updated_at": "2021-07-21T08:01:41.996Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 3, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.449936Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "favorite": false, - "created_at": "2021-07-21T08:01:37.434243Z", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 10, - "result_metadata": [ - { - "description": "This is a unique identifier for an order", - "semantic_type": null, - "coercion_strategy": null, - "name": "order_id", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 47, - null - ], - "effective_type": "type/Integer", - "id": 47, - "visibility_type": "normal", - "display_name": "Order ID", - "fingerprint": { - "global": { - "distinct-count": 99, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.25, - "q3": 74.75, - "max": 99.0, - "sd": 28.719704534890823, - "avg": 50.0 - } - } - }, - "base_type": "type/Integer" - }, - { - "description": "Foreign key to the customers table", - "semantic_type": "type/FK", - "coercion_strategy": null, - "name": "customer_id", - "settings": null, - "fk_target_field_id": 87, - "field_ref": [ - "field", - 84, - null - ], - "effective_type": "type/Integer", - "id": 84, - "visibility_type": "normal", - "display_name": "Customer ID", - "fingerprint": { - "global": { - "distinct-count": 62, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.875, - "q3": 69.625, - "max": 99.0, - "sd": 27.781341350472964, - "avg": 48.25252525252525 - } - } - }, - "base_type": "type/Integer" - }, - { - "description": "Date (UTC) that the order was placed", - "semantic_type": null, - "coercion_strategy": null, - "unit": "default", - "name": "order_date", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 82, - { - "temporal-unit": "default" - } - ], - "effective_type": "type/Date", - "id": 82, - "visibility_type": "normal", - "display_name": "Order Date", - "fingerprint": { - "global": { - "distinct-count": 69, - "nil%": 0.0 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "description": null, - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "status", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 78, - null - ], - "effective_type": "type/Text", - "id": 78, - "visibility_type": "normal", - "display_name": "Status", - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 8.404040404040405 - } - } - }, - "base_type": "type/Text" - }, - { - "description": "Amount of the order (AUD) paid for by credit card", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "credit_card_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 76, - null - ], - "effective_type": "type/BigInteger", - "id": 76, - "visibility_type": "normal", - "display_name": "Credit Card Amount", - "fingerprint": { - "global": { - "distinct-count": 25, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 18.797054997187544, - "max": 30.0, - "sd": 10.959088854927673, - "avg": 8.797979797979798 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Amount of the order (AUD) paid for by coupon", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "coupon_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 83, - null - ], - "effective_type": "type/BigInteger", - "id": 83, - "visibility_type": "normal", - "display_name": "Coupon Amount", - "fingerprint": { - "global": { - "distinct-count": 12, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.4747603274810728, - "max": 26.0, - "sd": 5.955012405351229, - "avg": 1.8686868686868687 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Amount of the order (AUD) paid for by bank transfer", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "bank_transfer_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 81, - null - ], - "effective_type": "type/BigInteger", - "id": 81, - "visibility_type": "normal", - "display_name": "Bank Transfer Amount", - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 4.75, - "max": 26.0, - "sd": 7.420825132023675, - "avg": 4.151515151515151 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Amount of the order (AUD) paid for by gift card", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "gift_card_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 77, - null - ], - "effective_type": "type/BigInteger", - "id": 77, - "visibility_type": "normal", - "display_name": "Gift Card Amount", - "fingerprint": { - "global": { - "distinct-count": 11, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 1.3692088763283736, - "max": 30.0, - "sd": 6.392362351566517, - "avg": 2.0707070707070705 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Total amount (AUD) of the order", - "semantic_type": null, - "coercion_strategy": null, - "name": "amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 80, - null - ], - "effective_type": "type/BigInteger", - "id": 80, - "visibility_type": "normal", - "display_name": "Amount", - "fingerprint": { - "global": { - "distinct-count": 32, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 8.202945002812456, - "q3": 24.26138721247417, - "max": 58.0, - "sd": 10.736062525374601, - "avg": 16.88888888888889 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": null, - "semantic_type": null, - "coercion_strategy": null, - "name": "customer_id_2", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 93, - { - "join-alias": "Stg Customers - Customer" - } - ], - "effective_type": "type/Integer", - "id": 93, - "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Customer ID", - "fingerprint": { - "global": { - "distinct-count": 100, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.5, - "q3": 75.5, - "max": 100.0, - "sd": 29.008358252146028, - "avg": 50.5 - } - } - }, - "base_type": "type/Integer" - }, - { - "description": null, - "semantic_type": "type/Name", - "coercion_strategy": null, - "name": "first_name", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 94, - { - "join-alias": "Stg Customers - Customer" - } - ], - "effective_type": "type/Text", - "id": 94, - "visibility_type": "normal", - "display_name": "Stg Customers - Customer → First Name", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.02, - "average-length": 5.86 - } - } - }, - "base_type": "type/Text" - }, - { - "description": null, - "semantic_type": "type/Name", - "coercion_strategy": null, - "name": "last_name", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 92, - { - "join-alias": "Stg Customers - Customer" - } - ], - "effective_type": "type/Text", - "id": 92, - "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Last Name", - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 2.0 - } - } - }, - "base_type": "type/Text" - } - ], - "creator": { - "email": "dbtmetabase@example.com", - "first_name": "dbtmetabase", - "last_login": "2024-01-26T23:35:13.524402", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": null, - "date_joined": "2024-01-26T23:29:30.885378", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": null, - "query_type": "query", - "name": "Orders Customers", - "creator_id": 1, - "updated_at": "2024-01-26T23:36:46.84084Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "database": 2, - "type": "query", - "query": { - "source-table": 10, - "joins": [ - { - "fields": "all", - "strategy": "left-join", - "alias": "Stg Customers - Customer", - "condition": [ - "=", - [ - "field", - 84, - { - "base-type": "type/Integer" - } - ], - [ - "field", - 93, - { - "base-type": "type/Integer", - "join-alias": "Stg Customers - Customer" - } - ] - ], - "source-table": 12 - } - ] - } - }, - "id": 23, - "parameter_mappings": [], - "display": "table", - "entity_id": "aR8nxcwbbZSX3_DSLdOBm", - "collection_preview": true, - "last-edit-info": { - "id": 1, - "email": "dbtmetabase@example.com", - "first_name": "dbtmetabase", - "last_name": null, - "timestamp": "2024-01-26T23:34:25.467752Z" - }, - "visualization_settings": { - "table.pivot_column": "status", - "table.cell_column": "order_id" - }, - "collection": null, - "metabase_version": "v0.48.0 (f985e19)", - "parameters": [], - "dataset": false, - "created_at": "2024-01-26T23:34:25.436685", - "public_uuid": null - }, - { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 10, - "result_metadata": [ - { - "description": "This is a unique identifier for an order", - "semantic_type": null, - "coercion_strategy": null, - "name": "order_id", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 47, - null - ], - "effective_type": "type/Integer", - "id": 47, - "visibility_type": "normal", - "display_name": "Order ID", - "fingerprint": { - "global": { - "distinct-count": 99, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 1, - "q1": 25.25, - "q3": 74.75, - "max": 99, - "sd": 28.719704534890823, - "avg": 50 - } - } - }, - "base_type": "type/Integer" - }, - { - "description": "Foreign key to the customers table", - "semantic_type": "type/FK", - "coercion_strategy": null, - "name": "customer_id", - "settings": null, - "fk_target_field_id": 87, - "field_ref": [ - "field", - 84, - null - ], - "effective_type": "type/Integer", - "id": 84, - "visibility_type": "normal", - "display_name": "Customer ID", - "fingerprint": { - "global": { - "distinct-count": 62, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 1, - "q1": 25.875, - "q3": 69.625, - "max": 99, - "sd": 27.781341350472964, - "avg": 48.25252525252525 - } - } - }, - "base_type": "type/Integer" - }, - { - "description": "Date (UTC) that the order was placed", - "semantic_type": null, - "coercion_strategy": null, - "unit": "default", - "name": "order_date", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 82, - { - "temporal-unit": "default" - } - ], - "effective_type": "type/Date", - "id": 82, - "visibility_type": "normal", - "display_name": "Order Date", - "fingerprint": { - "global": { - "distinct-count": 69, - "nil%": 0 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "description": null, - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "status", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 78, - null - ], - "effective_type": "type/Text", - "id": 78, - "visibility_type": "normal", - "display_name": "Status", - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0 - }, - "type": { - "type/Text": { - "percent-json": 0, - "percent-url": 0, - "percent-email": 0, - "percent-state": 0, - "average-length": 8.404040404040405 - } - } - }, - "base_type": "type/Text" - }, - { - "description": "Amount of the order (AUD) paid for by credit card", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "credit_card_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 76, - null - ], - "effective_type": "type/BigInteger", - "id": 76, - "visibility_type": "normal", - "display_name": "Credit Card Amount", - "fingerprint": { - "global": { - "distinct-count": 25, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 0, - "q1": 0, - "q3": 18.797054997187544, - "max": 30, - "sd": 10.959088854927673, - "avg": 8.797979797979798 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Amount of the order (AUD) paid for by coupon", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "coupon_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 83, - null - ], - "effective_type": "type/BigInteger", - "id": 83, - "visibility_type": "normal", - "display_name": "Coupon Amount", - "fingerprint": { - "global": { - "distinct-count": 12, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 0, - "q1": 0, - "q3": 0.4747603274810728, - "max": 26, - "sd": 5.955012405351229, - "avg": 1.8686868686868687 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Amount of the order (AUD) paid for by bank transfer", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "bank_transfer_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 81, - null - ], - "effective_type": "type/BigInteger", - "id": 81, - "visibility_type": "normal", - "display_name": "Bank Transfer Amount", - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 0, - "q1": 0, - "q3": 4.75, - "max": 26, - "sd": 7.420825132023675, - "avg": 4.151515151515151 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Amount of the order (AUD) paid for by gift card", - "semantic_type": "type/Category", - "coercion_strategy": null, - "name": "gift_card_amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 77, - null - ], - "effective_type": "type/BigInteger", - "id": 77, - "visibility_type": "normal", - "display_name": "Gift Card Amount", - "fingerprint": { - "global": { - "distinct-count": 11, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 0, - "q1": 0, - "q3": 1.3692088763283736, - "max": 30, - "sd": 6.392362351566517, - "avg": 2.0707070707070705 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": "Total amount (AUD) of the order", - "semantic_type": null, - "coercion_strategy": null, - "name": "amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 80, - null - ], - "effective_type": "type/BigInteger", - "id": 80, - "visibility_type": "normal", - "display_name": "Amount", - "fingerprint": { - "global": { - "distinct-count": 32, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 0, - "q1": 8.202945002812456, - "q3": 24.26138721247417, - "max": 58, - "sd": 10.736062525374601, - "avg": 16.88888888888889 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": null, - "semantic_type": null, - "coercion_strategy": null, - "name": "customer_id_2", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 93, - null - ], - "effective_type": "type/Integer", - "id": 93, - "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Customer ID", - "fingerprint": { - "global": { - "distinct-count": 100, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 1, - "q1": 25.5, - "q3": 75.5, - "max": 100, - "sd": 29.008358252146028, - "avg": 50.5 - } - } - }, - "base_type": "type/Integer" - }, - { - "description": null, - "semantic_type": "type/Name", - "coercion_strategy": null, - "name": "first_name", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 94, - null - ], - "effective_type": "type/Text", - "id": 94, - "visibility_type": "normal", - "display_name": "Stg Customers - Customer → First Name", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0 - }, - "type": { - "type/Text": { - "percent-json": 0, - "percent-url": 0, - "percent-email": 0, - "percent-state": 0.02, - "average-length": 5.86 - } - } - }, - "base_type": "type/Text" - }, - { - "description": null, - "semantic_type": "type/Name", - "coercion_strategy": null, - "name": "last_name", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 92, - null - ], - "effective_type": "type/Text", - "id": 92, - "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Last Name", - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0 - }, - "type": { - "type/Text": { - "percent-json": 0, - "percent-url": 0, - "percent-email": 0, - "percent-state": 0, - "average-length": 2 - } - } - }, - "base_type": "type/Text" - } - ], - "creator": { - "email": "dbtmetabase@example.com", - "first_name": "dbtmetabase", - "last_login": "2024-01-26T23:35:13.524402", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": null, - "date_joined": "2024-01-26T23:29:30.885378", - "common_name": "dbtmetabase" - }, - "database_id": 2, - "enable_embedding": false, - "collection_id": null, - "query_type": "query", - "name": "Orders Customers Filtered", - "creator_id": 1, - "updated_at": "2024-01-26T23:35:08.864176Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "database": 2, - "type": "query", - "query": { - "source-table": "card__3", - "filter": [ - "not-null", - [ - "field", - 47, - { - "base-type": "type/Integer" - } - ] - ] - } - }, - "id": 24, - "parameter_mappings": [], - "display": "table", - "entity_id": "OLbf7Q2yHWOn6CGvptTpi", - "collection_preview": true, - "last-edit-info": { - "id": 1, - "email": "dbtmetabase@example.com", - "first_name": "dbtmetabase", - "last_name": null, - "timestamp": "2024-01-26T23:35:08.900746Z" - }, - "visualization_settings": { - "table.pivot_column": "status", - "table.cell_column": "order_id" - }, - "collection": null, - "metabase_version": "v0.48.0 (f985e19)", - "parameters": [], - "dataset": false, - "created_at": "2024-01-26T23:35:08.864176", - "public_uuid": null - } -] diff --git a/tests/fixtures/api/card/1.json b/tests/fixtures/api/card/1.json deleted file mode 100644 index b1042b72..00000000 --- a/tests/fixtures/api/card/1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 7, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0200644129064447, - "q3": 2.3725029928215275, - "max": 7.0, - "sd": 1.25650644505132, - "avg": 1.9038461538461537 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.019031639883796, - "max": 5.0, - "sd": 0.7594097162561813, - "avg": 1.573717948717949 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": null, - "query_type": "query", - "name": "Customers, Sum of Number Of Orders and Average of Number Of Orders, Grouped by Most Recent Order (day)", - "dashboard_count": 0, - "creator_id": 1, - "updated_at": "2021-07-21T19:19:58.848286Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 1, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:00:47.4892Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "collection": null, - "created_at": "2021-07-21T08:00:47.453351Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/10.json b/tests/fixtures/api/card/10.json deleted file mode 100644 index ca68fd26..00000000 --- a/tests/fixtures/api/card/10.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 6, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.1073874870150486, - "q3": 3.0, - "max": 5.0, - "sd": 1.2643380578934107, - "avg": 2.152173913043478 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.019470273980893, - "q3": 1.989426104361334, - "max": 5.0, - "sd": 0.7515349295958083, - "avg": 1.596014492753623 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Number_of_orders over time", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.321381Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 10, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.368218Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.347535Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/11.json b/tests/fixtures/api/card/11.json deleted file mode 100644 index 94126819..00000000 --- a/tests/fixtures/api/card/11.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 33, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 17.0, - "q3": 55.93725393319377, - "max": 129.0, - "sd": 25.492672054973276, - "avg": 36.34782608695652 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 35, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 15.0, - "q3": 33.53589838486224, - "max": 65.0, - "sd": 17.057530000270994, - "avg": 27.342391304347824 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customer_lifetime_value over time", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.665585Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 41, - null - ] - ], - [ - "avg", - [ - "field", - 41, - null - ] - ] - ] - } - }, - "id": 11, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.544961Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#f9d45c", - "#F1B556" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.52841Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/12.json b/tests/fixtures/api/card/12.json deleted file mode 100644 index 71d73029..00000000 --- a/tests/fixtures/api/card/12.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day-of-week", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day-of-week" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 6.0, - "q1": 7.414213562373095, - "q3": 15.782357300628025, - "max": 38.0, - "sd": 10.488088481701515, - "avg": 12.5 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by day of the week", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.346492Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day-of-week" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 12, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.676704Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.662485Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/13.json b/tests/fixtures/api/card/13.json deleted file mode 100644 index fd61f167..00000000 --- a/tests/fixtures/api/card/13.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day-of-week", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day-of-week" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 6, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 6.0, - "q1": 7.414213562373095, - "q3": 11.757359312880714, - "max": 38.0, - "sd": 10.528871870107588, - "avg": 12.5 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by day of the week", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.483723Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day-of-week" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 13, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.821564Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.808186Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/14.json b/tests/fixtures/api/card/14.json deleted file mode 100644 index 11745e92..00000000 --- a/tests/fixtures/api/card/14.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "month-of-year", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "month-of-year" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 8.0, - "q1": 10.25, - "q3": 30.5, - "max": 38.0, - "sd": 12.62933094031509, - "avg": 20.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by month of the year", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.562877Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "month-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 14, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.953633Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.938688Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/15.json b/tests/fixtures/api/card/15.json deleted file mode 100644 index c897c1f1..00000000 --- a/tests/fixtures/api/card/15.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "month-of-year", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "month-of-year" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 4, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 2.0, - "q1": 11.298221281347036, - "q3": 27.5, - "max": 38.0, - "sd": 12.96148139681572, - "avg": 20.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by month of the year", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.52292Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "month-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 15, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.098141Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:39.084258Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/16.json b/tests/fixtures/api/card/16.json deleted file mode 100644 index f7650d5f..00000000 --- a/tests/fixtures/api/card/16.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "quarter-of-year", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "quarter-of-year" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 3, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 8.0, - "q1": 15.5, - "q3": 50.0, - "max": 54.0, - "sd": 23.35237318418266, - "avg": 33.333333333333336 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by quarter of the year", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.567707Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "quarter-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 16, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.243522Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:39.228965Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/17.json b/tests/fixtures/api/card/17.json deleted file mode 100644 index 2cabb0f4..00000000 --- a/tests/fixtures/api/card/17.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "quarter-of-year", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "quarter-of-year" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 3, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 2.0, - "q1": 11.0, - "q3": 54.5, - "max": 60.0, - "sd": 29.280255007997, - "avg": 33.333333333333336 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by quarter of the year", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.603496Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "quarter-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 17, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.385031Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:39.371067Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/2.json b/tests/fixtures/api/card/2.json deleted file mode 100644 index 68f22a14..00000000 --- a/tests/fixtures/api/card/2.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "description": "Nice KPI", - "archived": false, - "collection_position": null, - "table_id": 6, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0 - }, - "type": { - "type/Number": { - "min": 99, - "q1": 99, - "q3": 99, - "max": 99, - "sd": null, - "avg": 99 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": null, - "query_type": "query", - "name": "Orders, Count", - "dashboard_count": 0, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:14.290572Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 6, - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 2, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:14.3056Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "Number of orders" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": null, - "created_at": "2021-07-21T08:01:14.290572Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/23.json b/tests/fixtures/api/card/27.json similarity index 70% rename from tests/fixtures/api/card/23.json rename to tests/fixtures/api/card/27.json index d40778e5..1828511f 100644 --- a/tests/fixtures/api/card/23.json +++ b/tests/fixtures/api/card/27.json @@ -1,23 +1,26 @@ { - "description": null, + "cache_invalidated_at": null, + "description": "Orders and customers", "archived": false, + "view_count": 361, "collection_position": null, "table_id": 10, + "can_run_adhoc_query": true, "result_metadata": [ { "description": "This is a unique identifier for an order", - "semantic_type": null, + "semantic_type": "type/PK", "coercion_strategy": null, "name": "order_id", "settings": null, "fk_target_field_id": null, "field_ref": [ "field", - 47, + 84, null ], "effective_type": "type/Integer", - "id": 47, + "id": 84, "visibility_type": "normal", "display_name": "Order ID", "fingerprint": { @@ -44,14 +47,14 @@ "coercion_strategy": null, "name": "customer_id", "settings": null, - "fk_target_field_id": 87, + "fk_target_field_id": 94, "field_ref": [ "field", - 84, + 79, null ], "effective_type": "type/Integer", - "id": 84, + "id": 79, "visibility_type": "normal", "display_name": "Customer ID", "fingerprint": { @@ -138,6 +141,40 @@ }, "base_type": "type/Text" }, + { + "description": "Total amount (AUD) of the order", + "semantic_type": null, + "coercion_strategy": null, + "name": "amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 83, + null + ], + "effective_type": "type/BigInteger", + "id": 83, + "visibility_type": "normal", + "display_name": "Amount", + "fingerprint": { + "global": { + "distinct-count": 32, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 8.202945002812456, + "q3": 24.26138721247417, + "max": 58.0, + "sd": 10.736062525374601, + "avg": 16.88888888888889 + } + } + }, + "base_type": "type/BigInteger" + }, { "description": "Amount of the order (AUD) paid for by credit card", "semantic_type": "type/Category", @@ -147,11 +184,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 76, + 81, null ], "effective_type": "type/BigInteger", - "id": 76, + "id": 81, "visibility_type": "normal", "display_name": "Credit Card Amount", "fingerprint": { @@ -181,11 +218,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 83, + 76, null ], "effective_type": "type/BigInteger", - "id": 83, + "id": 76, "visibility_type": "normal", "display_name": "Coupon Amount", "fingerprint": { @@ -215,11 +252,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 81, + 77, null ], "effective_type": "type/BigInteger", - "id": 81, + "id": 77, "visibility_type": "normal", "display_name": "Bank Transfer Amount", "fingerprint": { @@ -249,11 +286,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 77, + 80, null ], "effective_type": "type/BigInteger", - "id": 77, + "id": 80, "visibility_type": "normal", "display_name": "Gift Card Amount", "fingerprint": { @@ -275,57 +312,23 @@ "base_type": "type/BigInteger" }, { - "description": "Total amount (AUD) of the order", - "semantic_type": null, - "coercion_strategy": null, - "name": "amount", - "settings": null, - "fk_target_field_id": null, - "field_ref": [ - "field", - 80, - null - ], - "effective_type": "type/BigInteger", - "id": 80, - "visibility_type": "normal", - "display_name": "Amount", - "fingerprint": { - "global": { - "distinct-count": 32, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 8.202945002812456, - "q3": 24.26138721247417, - "max": 58.0, - "sd": 10.736062525374601, - "avg": 16.88888888888889 - } - } - }, - "base_type": "type/BigInteger" - }, - { - "description": null, - "semantic_type": null, + "description": "This is a unique identifier for a customer", + "semantic_type": "type/PK", "coercion_strategy": null, "name": "customer_id_2", "settings": null, "fk_target_field_id": null, "field_ref": [ "field", - 93, + 94, { - "join-alias": "Stg Customers - Customer" + "join-alias": "Customers" } ], "effective_type": "type/Integer", - "id": 93, + "id": 94, "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Customer ID", + "display_name": "Customers \u2192 Customer ID", "fingerprint": { "global": { "distinct-count": 100, @@ -345,7 +348,7 @@ "base_type": "type/Integer" }, { - "description": null, + "description": "Customer's first name. PII.", "semantic_type": "type/Name", "coercion_strategy": null, "name": "first_name", @@ -353,18 +356,18 @@ "fk_target_field_id": null, "field_ref": [ "field", - 94, + 91, { - "join-alias": "Stg Customers - Customer" + "join-alias": "Customers" } ], "effective_type": "type/Text", - "id": 94, + "id": 91, "visibility_type": "normal", - "display_name": "Stg Customers - Customer → First Name", + "display_name": "Customers \u2192 First Name", "fingerprint": { "global": { - "distinct-count": 47, + "distinct-count": 79, "nil%": 0.0 }, "type": { @@ -380,7 +383,7 @@ "base_type": "type/Text" }, { - "description": null, + "description": "Customer's last name. PII.", "semantic_type": "type/Name", "coercion_strategy": null, "name": "last_name", @@ -388,15 +391,15 @@ "fk_target_field_id": null, "field_ref": [ "field", - 92, + 90, { - "join-alias": "Stg Customers - Customer" + "join-alias": "Customers" } ], "effective_type": "type/Text", - "id": 92, + "id": 90, "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Last Name", + "display_name": "Customers \u2192 Last Name", "fingerprint": { "global": { "distinct-count": 19, @@ -413,31 +416,174 @@ } }, "base_type": "type/Text" + }, + { + "description": "Date (UTC) of a customer's first order", + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "first_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 95, + { + "temporal-unit": "default", + "join-alias": "Customers" + } + ], + "effective_type": "type/Date", + "id": 95, + "visibility_type": "normal", + "display_name": "Customers \u2192 First Order", + "fingerprint": { + "global": { + "distinct-count": 47, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-07" + } + } + }, + "base_type": "type/Date" + }, + { + "description": "Date (UTC) of a customer's most recent order", + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "most_recent_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 92, + { + "temporal-unit": "default", + "join-alias": "Customers" + } + ], + "effective_type": "type/Date", + "id": 92, + "visibility_type": "normal", + "display_name": "Customers \u2192 Most Recent Order", + "fingerprint": { + "global": { + "distinct-count": 53, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-09", + "latest": "2018-04-09" + } + } + }, + "base_type": "type/Date" + }, + { + "description": "Count of the number of orders a customer has placed", + "semantic_type": "type/Quantity", + "coercion_strategy": null, + "name": "number_of_orders", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 89, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/BigInteger", + "id": 89, + "visibility_type": "normal", + "display_name": "Customers \u2192 order_count", + "fingerprint": { + "global": { + "distinct-count": 5, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 1.0, + "q3": 2.0901356485315583, + "max": 5.0, + "sd": 0.7779687173818424, + "avg": 1.596774193548387 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "Total value (AUD) of a customer's orders", + "semantic_type": null, + "coercion_strategy": null, + "name": "customer_lifetime_value", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 93, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/BigInteger", + "id": 93, + "visibility_type": "normal", + "display_name": "Customers \u2192 Customer Lifetime Value", + "fingerprint": { + "global": { + "distinct-count": 36, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 13.464101615137753, + "q3": 35.46410161513776, + "max": 99.0, + "sd": 18.812245525263663, + "avg": 26.967741935483872 + } + } + }, + "base_type": "type/BigInteger" } ], "creator": { "email": "dbtmetabase@example.com", "first_name": "dbtmetabase", - "last_login": "2024-01-26T23:35:13.524402", + "last_login": "2024-06-20T06:03:33.519227Z", "is_qbnewb": false, "is_superuser": true, "id": 1, "last_name": null, - "date_joined": "2024-01-26T23:29:30.885378", + "date_joined": "2024-06-19T11:49:37.507897Z", "common_name": "dbtmetabase" }, + "initially_published_at": null, "can_write": true, "database_id": 2, "enable_embedding": false, "collection_id": null, "query_type": "query", - "name": "Orders Customers", - "last_query_start": "2024-01-26T23:36:46.40105Z", - "dashboard_count": 0, - "average_query_time": 412.0, + "name": "Orders + Customers", + "last_query_start": "2024-06-20T05:55:59.014926Z", + "dashboard_count": 1, + "last_used_at": "2024-06-20T05:55:59.079272Z", + "type": "question", + "average_query_time": 107.22222222222223, "creator_id": 1, "moderation_reviews": [], - "updated_at": "2024-01-26T23:36:46.84084Z", + "updated_at": "2024-06-20T05:55:59.117538Z", "made_public_by_id": null, "embedding_params": null, "cache_ttl": null, @@ -449,23 +595,22 @@ "joins": [ { "fields": "all", - "strategy": "left-join", - "alias": "Stg Customers - Customer", + "alias": "Customers", "condition": [ "=", [ "field", - 84, + 79, { "base-type": "type/Integer" } ], [ "field", - 93, + 94, { "base-type": "type/Integer", - "join-alias": "Stg Customers - Customer" + "join-alias": "Customers" } ] ], @@ -474,20 +619,20 @@ ] } }, - "id": 23, + "id": 27, "parameter_mappings": [], "display": "table", - "entity_id": "aR8nxcwbbZSX3_DSLdOBm", + "entity_id": "WWI6bOVB-ssXYgCHASj9E", "collection_preview": true, "last-edit-info": { "id": 1, "email": "dbtmetabase@example.com", "first_name": "dbtmetabase", "last_name": null, - "timestamp": "2024-01-26T23:34:25.467752Z" + "timestamp": "2024-06-19T12:04:21.270066Z" }, "visualization_settings": { - "table.pivot_column": "status", + "table.pivot_column": "number_of_orders", "table.cell_column": "order_id" }, "collection": { @@ -498,10 +643,9 @@ "id": "root", "can_write": true }, - "metabase_version": "v0.48.0 (f985e19)", + "metabase_version": "v0.50.5 (48f6978)", "parameters": [], - "dataset": false, - "created_at": "2024-01-26T23:34:25.436685", + "created_at": "2024-06-19T11:57:35.85999Z", "parameter_usage_count": 0, "public_uuid": null -} +} \ No newline at end of file diff --git a/tests/fixtures/api/card/24.json b/tests/fixtures/api/card/28.json similarity index 70% rename from tests/fixtures/api/card/24.json rename to tests/fixtures/api/card/28.json index 73a4aed6..d7bfbedb 100644 --- a/tests/fixtures/api/card/24.json +++ b/tests/fixtures/api/card/28.json @@ -1,11 +1,14 @@ { + "cache_invalidated_at": null, "description": null, "archived": false, + "view_count": 180, "collection_position": null, "table_id": 10, + "can_run_adhoc_query": true, "result_metadata": [ { - "description": "This is a unique identifier for an order", + "description": null, "semantic_type": null, "coercion_strategy": null, "name": "order_id", @@ -13,11 +16,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 47, + 84, null ], "effective_type": "type/Integer", - "id": 47, + "id": 84, "visibility_type": "normal", "display_name": "Order ID", "fingerprint": { @@ -39,19 +42,19 @@ "base_type": "type/Integer" }, { - "description": "Foreign key to the customers table", - "semantic_type": "type/FK", + "description": null, + "semantic_type": null, "coercion_strategy": null, "name": "customer_id", "settings": null, - "fk_target_field_id": 87, + "fk_target_field_id": null, "field_ref": [ "field", - 84, + 79, null ], "effective_type": "type/Integer", - "id": 84, + "id": 79, "visibility_type": "normal", "display_name": "Customer ID", "fingerprint": { @@ -73,7 +76,7 @@ "base_type": "type/Integer" }, { - "description": "Date (UTC) that the order was placed", + "description": null, "semantic_type": null, "coercion_strategy": null, "unit": "default", @@ -139,7 +142,7 @@ "base_type": "type/Text" }, { - "description": "Amount of the order (AUD) paid for by credit card", + "description": null, "semantic_type": "type/Category", "coercion_strategy": null, "name": "credit_card_amount", @@ -147,11 +150,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 76, + 81, null ], "effective_type": "type/BigInteger", - "id": 76, + "id": 81, "visibility_type": "normal", "display_name": "Credit Card Amount", "fingerprint": { @@ -173,7 +176,7 @@ "base_type": "type/BigInteger" }, { - "description": "Amount of the order (AUD) paid for by coupon", + "description": null, "semantic_type": "type/Category", "coercion_strategy": null, "name": "coupon_amount", @@ -181,11 +184,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 83, + 76, null ], "effective_type": "type/BigInteger", - "id": 83, + "id": 76, "visibility_type": "normal", "display_name": "Coupon Amount", "fingerprint": { @@ -207,7 +210,7 @@ "base_type": "type/BigInteger" }, { - "description": "Amount of the order (AUD) paid for by bank transfer", + "description": null, "semantic_type": "type/Category", "coercion_strategy": null, "name": "bank_transfer_amount", @@ -215,11 +218,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 81, + 77, null ], "effective_type": "type/BigInteger", - "id": 81, + "id": 77, "visibility_type": "normal", "display_name": "Bank Transfer Amount", "fingerprint": { @@ -241,7 +244,7 @@ "base_type": "type/BigInteger" }, { - "description": "Amount of the order (AUD) paid for by gift card", + "description": null, "semantic_type": "type/Category", "coercion_strategy": null, "name": "gift_card_amount", @@ -249,11 +252,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 77, + 80, null ], "effective_type": "type/BigInteger", - "id": 77, + "id": 80, "visibility_type": "normal", "display_name": "Gift Card Amount", "fingerprint": { @@ -275,7 +278,7 @@ "base_type": "type/BigInteger" }, { - "description": "Total amount (AUD) of the order", + "description": null, "semantic_type": null, "coercion_strategy": null, "name": "amount", @@ -283,11 +286,11 @@ "fk_target_field_id": null, "field_ref": [ "field", - 80, + 83, null ], "effective_type": "type/BigInteger", - "id": 80, + "id": 83, "visibility_type": "normal", "display_name": "Amount", "fingerprint": { @@ -317,13 +320,13 @@ "fk_target_field_id": null, "field_ref": [ "field", - 93, + 94, null ], "effective_type": "type/Integer", - "id": 93, + "id": 94, "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Customer ID", + "display_name": "Customers \u2192 Customer ID", "fingerprint": { "global": { "distinct-count": 100, @@ -351,16 +354,16 @@ "fk_target_field_id": null, "field_ref": [ "field", - 94, + 91, null ], "effective_type": "type/Text", - "id": 94, + "id": 91, "visibility_type": "normal", - "display_name": "Stg Customers - Customer → First Name", + "display_name": "Customers \u2192 First Name", "fingerprint": { "global": { - "distinct-count": 47, + "distinct-count": 79, "nil%": 0 }, "type": { @@ -384,13 +387,13 @@ "fk_target_field_id": null, "field_ref": [ "field", - 92, + 90, null ], "effective_type": "type/Text", - "id": 92, + "id": 90, "visibility_type": "normal", - "display_name": "Stg Customers - Customer → Last Name", + "display_name": "Customers \u2192 Last Name", "fingerprint": { "global": { "distinct-count": 19, @@ -407,31 +410,168 @@ } }, "base_type": "type/Text" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "first_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 95, + { + "temporal-unit": "default" + } + ], + "effective_type": "type/Date", + "id": 95, + "visibility_type": "normal", + "display_name": "Customers \u2192 First Order", + "fingerprint": { + "global": { + "distinct-count": 47, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-07" + } + } + }, + "base_type": "type/Date" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "most_recent_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 92, + { + "temporal-unit": "default" + } + ], + "effective_type": "type/Date", + "id": 92, + "visibility_type": "normal", + "display_name": "Customers \u2192 Most Recent Order", + "fingerprint": { + "global": { + "distinct-count": 53, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-09", + "latest": "2018-04-09" + } + } + }, + "base_type": "type/Date" + }, + { + "description": null, + "semantic_type": "type/Quantity", + "coercion_strategy": null, + "name": "number_of_orders", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 89, + null + ], + "effective_type": "type/BigInteger", + "id": 89, + "visibility_type": "normal", + "display_name": "Customers \u2192 Number Of Orders", + "fingerprint": { + "global": { + "distinct-count": 5, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 1, + "q3": 2.0901356485315583, + "max": 5, + "sd": 0.7779687173818424, + "avg": 1.596774193548387 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "name": "customer_lifetime_value", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 93, + null + ], + "effective_type": "type/BigInteger", + "id": 93, + "visibility_type": "normal", + "display_name": "Customers \u2192 Customer Lifetime Value", + "fingerprint": { + "global": { + "distinct-count": 36, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 13.464101615137753, + "q3": 35.46410161513776, + "max": 99, + "sd": 18.812245525263663, + "avg": 26.967741935483872 + } + } + }, + "base_type": "type/BigInteger" } ], "creator": { "email": "dbtmetabase@example.com", "first_name": "dbtmetabase", - "last_login": "2024-01-26T23:35:13.524402", - "is_qbnewb": true, + "last_login": "2024-06-20T06:03:33.519227Z", + "is_qbnewb": false, "is_superuser": true, "id": 1, "last_name": null, - "date_joined": "2024-01-26T23:29:30.885378", + "date_joined": "2024-06-19T11:49:37.507897Z", "common_name": "dbtmetabase" }, + "initially_published_at": null, "can_write": true, "database_id": 2, "enable_embedding": false, "collection_id": null, "query_type": "query", - "name": "Orders Customers Filtered", - "last_query_start": null, - "dashboard_count": 0, - "average_query_time": null, + "name": "Orders + Customers, Filtered by Status is completed", + "last_query_start": "2024-06-19T12:09:31.377224Z", + "dashboard_count": 1, + "last_used_at": "2024-06-19T12:09:31.689381Z", + "type": "question", + "average_query_time": 264.0, "creator_id": 1, "moderation_reviews": [], - "updated_at": "2024-01-26T23:35:08.864176Z", + "updated_at": "2024-06-19T12:09:31.689381Z", "made_public_by_id": null, "embedding_params": null, "cache_ttl": null, @@ -439,30 +579,31 @@ "database": 2, "type": "query", "query": { - "source-table": "card__3", + "source-table": "card__27", "filter": [ - "not-null", + "=", [ "field", - 47, + 78, { - "base-type": "type/Integer" + "base-type": "type/Text" } - ] + ], + "completed" ] } }, - "id": 24, + "id": 28, "parameter_mappings": [], "display": "table", - "entity_id": "OLbf7Q2yHWOn6CGvptTpi", + "entity_id": "ewUj6ow4HD_vePKnXihVA", "collection_preview": true, "last-edit-info": { "id": 1, "email": "dbtmetabase@example.com", "first_name": "dbtmetabase", "last_name": null, - "timestamp": "2024-01-26T23:35:08.900746Z" + "timestamp": "2024-06-19T11:58:35.066297Z" }, "visualization_settings": { "table.pivot_column": "status", @@ -476,10 +617,9 @@ "id": "root", "can_write": true }, - "metabase_version": "v0.48.0 (f985e19)", + "metabase_version": "v0.50.5 (48f6978)", "parameters": [], - "dataset": false, - "created_at": "2024-01-26T23:35:08.864176", + "created_at": "2024-06-19T11:58:35.060527Z", "parameter_usage_count": 0, "public_uuid": null -} +} \ No newline at end of file diff --git a/tests/fixtures/api/card/29.json b/tests/fixtures/api/card/29.json new file mode 100644 index 00000000..837addff --- /dev/null +++ b/tests/fixtures/api/card/29.json @@ -0,0 +1,104 @@ +{ + "cache_invalidated_at": null, + "description": null, + "archived": false, + "view_count": 179, + "collection_position": null, + "table_id": null, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "display_name": "count", + "field_ref": [ + "field", + "count", + { + "base-type": "type/BigInteger" + } + ], + "name": "count", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": "type/Quantity", + "fingerprint": { + "global": { + "distinct-count": 1, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 5.0, + "q1": 5.0, + "q3": 5.0, + "max": 5.0, + "sd": null, + "avg": 5.0 + } + } + } + } + ], + "creator": { + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_login": "2024-06-20T06:03:33.519227Z", + "is_qbnewb": false, + "is_superuser": true, + "id": 1, + "last_name": null, + "date_joined": "2024-06-19T11:49:37.507897Z", + "common_name": "dbtmetabase" + }, + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "native", + "name": "Returned Order Count SQL", + "last_query_start": "2024-06-19T12:09:31.387065Z", + "dashboard_count": 1, + "last_used_at": "2024-06-19T12:09:31.486489Z", + "type": "question", + "average_query_time": 190.5, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-19T12:09:31.507473Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "native", + "native": { + "template-tags": {}, + "query": "select\n count(*)\nfrom STG_payments as p\n left join STG_orders as o on p.order_id = o.order_id\nwhere o.status = 'returned'\n;" + } + }, + "id": 29, + "parameter_mappings": [], + "display": "scalar", + "entity_id": "iCEt78jHFFT1fqTa28FOB", + "collection_preview": true, + "last-edit-info": { + "id": 1, + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_name": null, + "timestamp": "2024-06-19T12:03:01.981604Z" + }, + "visualization_settings": {}, + "collection": { + "metabase.models.collection.root/is-root?": true, + "authority_level": null, + "name": "Our analytics", + "is_personal": false, + "id": "root", + "can_write": true + }, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-19T12:03:01.905927Z", + "parameter_usage_count": 0, + "public_uuid": null +} \ No newline at end of file diff --git a/tests/fixtures/api/card/3.json b/tests/fixtures/api/card/3.json deleted file mode 100644 index dfd0762a..00000000 --- a/tests/fixtures/api/card/3.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 100.0, - "q1": 100.0, - "q3": 100.0, - "max": 100.0, - "sd": null, - "avg": 100.0 - } - } - } - } - ], - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Total customers", - "dashboard_count": 1, - "creator_id": 2, - "updated_at": "2021-07-21T08:01:41.996Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 3, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.449936Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:37.434243Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/30.json b/tests/fixtures/api/card/30.json new file mode 100644 index 00000000..20d72db9 --- /dev/null +++ b/tests/fixtures/api/card/30.json @@ -0,0 +1,106 @@ +{ + "cache_invalidated_at": null, + "description": "Dummy 1", + "archived": false, + "view_count": 21, + "collection_position": null, + "table_id": null, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "display_name": "?column?", + "field_ref": [ + "field", + "?column?", + { + "base-type": "type/Integer" + } + ], + "name": "?column?", + "base_type": "type/Integer", + "effective_type": "type/Integer", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 1, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 1, + "q3": 1, + "max": 1, + "sd": null, + "avg": 1 + } + } + } + } + ], + "creator": { + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_login": "2024-06-20T06:03:33.519227Z", + "is_qbnewb": false, + "is_superuser": true, + "id": 1, + "last_name": null, + "date_joined": "2024-06-19T11:49:37.507897Z", + "common_name": "dbtmetabase" + }, + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "native", + "name": "Dummy", + "last_query_start": "2024-06-20T05:56:57.283068Z", + "dashboard_count": 0, + "last_used_at": "2024-06-20T05:56:57.295379Z", + "type": "question", + "average_query_time": 28.0, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-20T05:57:05.732801Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "native", + "native": { + "template-tags": {}, + "query": "select 1;" + } + }, + "id": 30, + "parameter_mappings": [], + "display": "table", + "entity_id": "32PjfPIi_tmY3317kwVnd", + "collection_preview": true, + "last-edit-info": { + "id": 1, + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_name": null, + "timestamp": "2024-06-20T05:57:05.744383Z" + }, + "visualization_settings": { + "table.pivot_column": "?column?" + }, + "collection": { + "metabase.models.collection.root/is-root?": true, + "authority_level": null, + "name": "Our analytics", + "is_personal": false, + "id": "root", + "can_write": true + }, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-20T05:56:33.051625Z", + "parameter_usage_count": 0, + "public_uuid": null +} \ No newline at end of file diff --git a/tests/fixtures/api/card/31.json b/tests/fixtures/api/card/31.json new file mode 100644 index 00000000..62870a94 --- /dev/null +++ b/tests/fixtures/api/card/31.json @@ -0,0 +1,106 @@ +{ + "cache_invalidated_at": null, + "description": "Dummy 2", + "archived": false, + "view_count": 21, + "collection_position": null, + "table_id": null, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "display_name": "?column?", + "field_ref": [ + "field", + "?column?", + { + "base-type": "type/Integer" + } + ], + "name": "?column?", + "base_type": "type/Integer", + "effective_type": "type/Integer", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 1, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 2, + "q1": 2, + "q3": 2, + "max": 2, + "sd": null, + "avg": 2 + } + } + } + } + ], + "creator": { + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_login": "2024-06-20T06:03:33.519227Z", + "is_qbnewb": false, + "is_superuser": true, + "id": 1, + "last_name": null, + "date_joined": "2024-06-19T11:49:37.507897Z", + "common_name": "dbtmetabase" + }, + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "native", + "name": "Dummy", + "last_query_start": "2024-06-20T05:57:12.286765Z", + "dashboard_count": 0, + "last_used_at": "2024-06-20T05:57:12.297288Z", + "type": "question", + "average_query_time": 24.0, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-20T05:57:18.515991Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "native", + "native": { + "template-tags": {}, + "query": "select 2;" + } + }, + "id": 31, + "parameter_mappings": [], + "display": "table", + "entity_id": "y_3jQjY9IbZEBAZ8xLoPN", + "collection_preview": true, + "last-edit-info": { + "id": 1, + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_name": null, + "timestamp": "2024-06-20T05:57:18.528579Z" + }, + "visualization_settings": { + "table.pivot_column": "?column?" + }, + "collection": { + "metabase.models.collection.root/is-root?": true, + "authority_level": null, + "name": "Our analytics", + "is_personal": false, + "id": "root", + "can_write": true + }, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-20T05:56:45.033599Z", + "parameter_usage_count": 0, + "public_uuid": null +} \ No newline at end of file diff --git a/tests/fixtures/api/card/32.json b/tests/fixtures/api/card/32.json new file mode 100644 index 00000000..2a2aabd5 --- /dev/null +++ b/tests/fixtures/api/card/32.json @@ -0,0 +1,342 @@ +{ + "cache_invalidated_at": null, + "description": "CTE SQL", + "archived": false, + "view_count": 12, + "collection_position": null, + "table_id": null, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "display_name": "order_id", + "field_ref": [ + "field", + "order_id", + { + "base-type": "type/Integer" + } + ], + "name": "order_id", + "base_type": "type/Integer", + "effective_type": "type/Integer", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 67, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 2, + "q1": 21.25, + "q3": 56.75, + "max": 76, + "sd": 21.08874820298452, + "avg": 38.701492537313435 + } + } + } + }, + { + "display_name": "customer_id", + "field_ref": [ + "field", + "customer_id", + { + "base-type": "type/Integer" + } + ], + "name": "customer_id", + "base_type": "type/Integer", + "effective_type": "type/Integer", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 48, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 24.625, + "q3": 69.7752551286084, + "max": 99, + "sd": 28.40534122698791, + "avg": 46.985074626865675 + } + } + } + }, + { + "display_name": "order_date", + "field_ref": [ + "field", + "order_date", + { + "base-type": "type/Date" + } + ], + "name": "order_date", + "base_type": "type/Date", + "effective_type": "type/Date", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 48, + "nil%": 0 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-02T00:00:00Z", + "latest": "2018-03-20T00:00:00Z" + } + } + } + }, + { + "display_name": "status", + "field_ref": [ + "field", + "status", + { + "base-type": "type/Text" + } + ], + "name": "status", + "base_type": "type/Text", + "effective_type": "type/Text", + "semantic_type": "type/Category", + "fingerprint": { + "global": { + "distinct-count": 1, + "nil%": 0 + }, + "type": { + "type/Text": { + "percent-json": 0, + "percent-url": 0, + "percent-email": 0, + "percent-state": 0, + "average-length": 9 + } + } + } + }, + { + "display_name": "credit_card_amount", + "field_ref": [ + "field", + "credit_card_amount", + { + "base-type": "type/BigInteger" + } + ], + "name": "credit_card_amount", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 23, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0.04114159559085226, + "q3": 18.914213562373096, + "max": 30, + "sd": 10.838625503455733, + "avg": 9.35820895522388 + } + } + } + }, + { + "display_name": "coupon_amount", + "field_ref": [ + "field", + "coupon_amount", + { + "base-type": "type/BigInteger" + } + ], + "name": "coupon_amount", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 9, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 0.45220794454572616, + "max": 26, + "sd": 6.053134245386682, + "avg": 1.8955223880597014 + } + } + } + }, + { + "display_name": "bank_transfer_amount", + "field_ref": [ + "field", + "bank_transfer_amount", + { + "base-type": "type/BigInteger" + } + ], + "name": "bank_transfer_amount", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 16, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 3.775255128608411, + "max": 26, + "sd": 6.7730209474362155, + "avg": 3.626865671641791 + } + } + } + }, + { + "display_name": "gift_card_amount", + "field_ref": [ + "field", + "gift_card_amount", + { + "base-type": "type/BigInteger" + } + ], + "name": "gift_card_amount", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 7, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 2.5479849964495047, + "max": 28, + "sd": 5.306226341936319, + "avg": 1.5820895522388059 + } + } + } + }, + { + "display_name": "amount", + "field_ref": [ + "field", + "amount", + { + "base-type": "type/BigInteger" + } + ], + "name": "amount", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": null, + "fingerprint": { + "global": { + "distinct-count": 30, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 8.085786437626904, + "q3": 23.806287056638602, + "max": 58, + "sd": 10.43352457692227, + "avg": 16.46268656716418 + } + } + } + } + ], + "creator": { + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_login": "2024-06-20T06:03:33.519227Z", + "is_qbnewb": false, + "is_superuser": true, + "id": 1, + "last_name": null, + "date_joined": "2024-06-19T11:49:37.507897Z", + "common_name": "dbtmetabase" + }, + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "native", + "name": "Completed Orders CTE SQL", + "last_query_start": null, + "dashboard_count": 0, + "last_used_at": null, + "type": "question", + "average_query_time": null, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-20T06:01:34.470497Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "native", + "native": { + "template-tags": {}, + "query": "with completed_orders as (\n\n select * from Orders where status = 'completed'\n\n)\n\nselect * from completed_orders" + } + }, + "id": 32, + "parameter_mappings": [], + "display": "table", + "entity_id": "6jo5ucWZF4jBmf8OmRajs", + "collection_preview": true, + "last-edit-info": { + "id": 1, + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_name": null, + "timestamp": "2024-06-20T06:01:34.486033Z" + }, + "visualization_settings": { + "table.pivot_column": "status", + "table.cell_column": "order_id" + }, + "collection": { + "metabase.models.collection.root/is-root?": true, + "authority_level": null, + "name": "Our analytics", + "is_personal": false, + "id": "root", + "can_write": true + }, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-20T06:01:34.470497Z", + "parameter_usage_count": 0, + "public_uuid": null +} \ No newline at end of file diff --git a/tests/fixtures/api/card/4.json b/tests/fixtures/api/card/4.json deleted file mode 100644 index c700bfca..00000000 --- a/tests/fixtures/api/card/4.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.0, - "max": 0.0, - "sd": null, - "avg": 0.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers added in the last 30 days", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.000946Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "filter": [ - "time-interval", - [ - "field", - 42, - null - ], - -30, - "day" - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 4, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.545719Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:37.535187Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/5.json b/tests/fixtures/api/card/5.json deleted file mode 100644 index 90e70f31..00000000 --- a/tests/fixtures/api/card/5.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.0, - "max": 0.0, - "sd": null, - "avg": 0.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers added in the last 30 days", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.157282Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "filter": [ - "time-interval", - [ - "field", - 39, - null - ], - -30, - "day" - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 5, - "display": "scalar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.641827Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:37.630969Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/6.json b/tests/fixtures/api/card/6.json deleted file mode 100644 index 1cf9abc1..00000000 --- a/tests/fixtures/api/card/6.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": "type/Quantity", - "coercion_strategy": null, - "name": "number_of_orders", - "field_ref": [ - "field", - 40, - { - "binning": { - "strategy": "num-bins", - "min-value": 1.0, - "max-value": 5.0, - "num-bins": 8, - "bin-width": 0.5 - } - } - ], - "effective_type": "type/BigInteger", - "id": 40, - "display_name": "number_of_orders", - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.0901356485315583, - "max": 5.0, - "sd": 0.7779687173818424, - "avg": 1.596774193548387 - } - } - }, - "base_type": "type/Decimal" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 4.0, - "q3": 34.25, - "max": 38.0, - "sd": 16.492422502470642, - "avg": 20.0 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers by number_of_orders", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.107313Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 40, - { - "binning": { - "strategy": "default" - } - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 6, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.76733Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "number_of_orders" - ], - "graph.colors": [ - "#EF8C8C" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:37.754606Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/7.json b/tests/fixtures/api/card/7.json deleted file mode 100644 index cd7e2e76..00000000 --- a/tests/fixtures/api/card/7.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "name": "customer_lifetime_value", - "field_ref": [ - "field", - 41, - { - "binning": { - "strategy": "num-bins", - "min-value": 0.0, - "max-value": 100.0, - "num-bins": 8, - "bin-width": 12.5 - } - } - ], - "effective_type": "type/BigInteger", - "id": 41, - "display_name": "customer_lifetime_value", - "fingerprint": { - "global": { - "distinct-count": 36, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.464101615137753, - "q3": 35.46410161513776, - "max": 99.0, - "sd": 18.812245525263663, - "avg": 26.967741935483872 - } - } - }, - "base_type": "type/Decimal" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 3.0, - "q3": 17.5, - "max": 38.0, - "sd": 12.294017127971522, - "avg": 12.5 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers by customer_lifetime_value", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.20895Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 41, - { - "binning": { - "strategy": "default" - } - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 7, - "display": "bar", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:37.870294Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "customer_lifetime_value" - ], - "graph.colors": [ - "#A6E7F3" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:37.858387Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/8.json b/tests/fixtures/api/card/8.json deleted file mode 100644 index 3b881ddf..00000000 --- a/tests/fixtures/api/card/8.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 7, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0200644129064447, - "q3": 2.3725029928215275, - "max": 7.0, - "sd": 1.25650644505132, - "avg": 1.9038461538461537 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.019031639883796, - "max": 5.0, - "sd": 0.7594097162561813, - "avg": 1.573717948717949 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Number_of_orders over time", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.368004Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 8, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.030503Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.016244Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/card/9.json b/tests/fixtures/api/card/9.json deleted file mode 100644 index 7d6f491a..00000000 --- a/tests/fixtures/api/card/9.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 35, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 15.0, - "q3": 40.10050506338833, - "max": 131.0, - "sd": 26.119172295224672, - "avg": 32.15384615384615 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 34, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.17157287525381, - "q3": 34.732050807568875, - "max": 99.0, - "sd": 17.628392521514144, - "avg": 26.39102564102564 - } - } - } - } - ], - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "can_write": true, - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customer_lifetime_value over time", - "dashboard_count": 1, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.456526Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 41, - null - ] - ], - [ - "avg", - [ - "field", - 41, - null - ] - ] - ] - } - }, - "id": 9, - "display": "line", - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:38.208516Z" - }, - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#f9d45c", - "#F1B556" - ] - }, - "collection": { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - "created_at": "2021-07-21T08:01:38.189846Z", - "public_uuid": null -} \ No newline at end of file diff --git a/tests/fixtures/api/collection.json b/tests/fixtures/api/collection.json index 9c307a11..addf935c 100644 --- a/tests/fixtures/api/collection.json +++ b/tests/fixtures/api/collection.json @@ -1,49 +1,29 @@ [ { + "authority_level": null, + "can_write": true, "name": "Our analytics", - "id": "root", - "parent_id": null, - "effective_location": null, "effective_ancestors": [], - "can_write": true + "effective_location": null, + "parent_id": null, + "id": "root", + "is_personal": false }, { "authority_level": null, "description": null, "archived": false, "slug": "dbtmetabase_s_personal_collection", - "color": "#31698A", "can_write": true, "name": "dbtmetabase's Personal Collection", "personal_owner_id": 1, - "id": 1, - "location": "/", - "namespace": null - }, - { - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "can_write": true, - "name": "A look at your customers table", - "personal_owner_id": null, - "id": 3, - "location": "/2/", - "namespace": null - }, - { - "authority_level": null, - "description": null, - "archived": false, - "slug": "automatically_generated_dashboards", - "color": "#509EE3", - "can_write": true, - "name": "Automatically Generated Dashboards", - "personal_owner_id": null, + "type": null, + "is_sample": false, "id": 2, + "entity_id": "4NxVlV7MwKdihROHJkxCx", "location": "/", - "namespace": null + "namespace": null, + "is_personal": true, + "created_at": "2024-06-19T11:49:38.03895Z" } ] \ No newline at end of file diff --git a/tests/fixtures/api/collection/1.json b/tests/fixtures/api/collection/1.json deleted file mode 100644 index 4c517b08..00000000 --- a/tests/fixtures/api/collection/1.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "authority_level": null, - "description": null, - "archived": false, - "slug": "dbtmetabase_s_personal_collection", - "color": "#31698A", - "can_write": true, - "name": "dbtmetabase's Personal Collection", - "personal_owner_id": 1, - "effective_ancestors": [ - { - "metabase.models.collection.root/is-root?": true, - "name": "Our analytics", - "id": "root", - "can_write": true - } - ], - "effective_location": "/", - "parent_id": null, - "id": 1, - "location": "/", - "namespace": null -} \ No newline at end of file diff --git a/tests/fixtures/api/collection/2.json b/tests/fixtures/api/collection/2.json deleted file mode 100644 index 080a8402..00000000 --- a/tests/fixtures/api/collection/2.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "authority_level": null, - "description": null, - "archived": false, - "slug": "automatically_generated_dashboards", - "color": "#509EE3", - "can_write": true, - "name": "Automatically Generated Dashboards", - "personal_owner_id": null, - "effective_ancestors": [ - { - "metabase.models.collection.root/is-root?": true, - "name": "Our analytics", - "id": "root", - "can_write": true - } - ], - "effective_location": "/", - "parent_id": null, - "id": 2, - "location": "/", - "namespace": null -} \ No newline at end of file diff --git a/tests/fixtures/api/collection/2/items.json b/tests/fixtures/api/collection/2/items.json deleted file mode 100644 index 75a1f83e..00000000 --- a/tests/fixtures/api/collection/2/items.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "description": "Automatically generated cards.", - "can_write": true, - "name": "A look at your customers table", - "id": 3, - "model": "collection" - } -] \ No newline at end of file diff --git a/tests/fixtures/api/collection/3.json b/tests/fixtures/api/collection/3.json deleted file mode 100644 index 243332d5..00000000 --- a/tests/fixtures/api/collection/3.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "authority_level": null, - "description": "Automatically generated cards.", - "archived": false, - "slug": "a_look_at_your_customers_table", - "color": "#f9d45c", - "can_write": true, - "name": "A look at your customers table", - "personal_owner_id": null, - "effective_ancestors": [ - { - "metabase.models.collection.root/is-root?": true, - "name": "Our analytics", - "id": "root", - "can_write": true - }, - { - "name": "Automatically Generated Dashboards", - "id": 2, - "can_write": true - } - ], - "effective_location": "/2/", - "parent_id": 2, - "id": 3, - "location": "/2/", - "namespace": null -} \ No newline at end of file diff --git a/tests/fixtures/api/collection/3/items.json b/tests/fixtures/api/collection/3/items.json deleted file mode 100644 index e5e7a915..00000000 --- a/tests/fixtures/api/collection/3/items.json +++ /dev/null @@ -1,273 +0,0 @@ -[ - { - "description": null, - "collection_position": 1, - "name": "A look at your customers table", - "id": 1, - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:39.542335Z" - }, - "favorite": false, - "model": "dashboard" - }, - { - "description": null, - "collection_position": null, - "name": "Customer_lifetime_value over time", - "id": 11, - "display": "line", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.544961Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Customer_lifetime_value over time", - "id": 9, - "display": "line", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.208516Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Customers added in the last 30 days", - "id": 4, - "display": "scalar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:37.545719Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Customers added in the last 30 days", - "id": 5, - "display": "scalar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:37.641827Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Customers by customer_lifetime_value", - "id": 7, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:37.870294Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Customers by number_of_orders", - "id": 6, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:37.76733Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Number_of_orders over time", - "id": 8, - "display": "line", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.030503Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Number_of_orders over time", - "id": 10, - "display": "line", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.368218Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Timestamp by day of the week", - "id": 12, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.676704Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Timestamp by day of the week", - "id": 13, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.821564Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Timestamp by month of the year", - "id": 15, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:39.098141Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Timestamp by month of the year", - "id": 14, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:38.953633Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Timestamp by quarter of the year", - "id": 17, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:39.385031Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Timestamp by quarter of the year", - "id": 16, - "display": "bar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:39.243522Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Total customers", - "id": 3, - "display": "scalar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:37.449936Z" - }, - "favorite": false, - "model": "card" - }, - { - "description": null, - "collection_position": null, - "name": "Missing", - "id": 404, - "display": "scalar", - "last-edit-info": { - "id": 1, - "last_name": "", - "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:37.449936Z" - }, - "favorite": false, - "model": "card" - } -] diff --git a/tests/fixtures/api/collection/root/items.json b/tests/fixtures/api/collection/root/items.json index 5f52f908..95c95816 100644 --- a/tests/fixtures/api/collection/root/items.json +++ b/tests/fixtures/api/collection/root/items.json @@ -1,80 +1,159 @@ [ { - "description": null, + "description": "CTE SQL", + "collection_position": null, "can_write": true, - "name": "dbtmetabase's Personal Collection", - "id": 1, - "model": "collection" + "database_id": null, + "collection_id": null, + "name": "Completed Orders CTE SQL", + "fully_parameterized": true, + "moderated_status": null, + "id": 32, + "display": "table", + "entity_id": "6jo5ucWZF4jBmf8OmRajs", + "collection_preview": true, + "last-edit-info": { + "id": 1, + "last_name": null, + "first_name": "dbtmetabase", + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-20T06:01:34.486033Z" + }, + "location": null, + "model": "card" }, { - "description": null, + "description": "Dummy 1", + "collection_position": null, "can_write": true, - "name": "Automatically Generated Dashboards", - "id": 2, - "model": "collection" + "database_id": null, + "collection_id": null, + "name": "Dummy", + "fully_parameterized": true, + "moderated_status": null, + "id": 30, + "display": "table", + "entity_id": "32PjfPIi_tmY3317kwVnd", + "collection_preview": true, + "last-edit-info": { + "id": 1, + "last_name": null, + "first_name": "dbtmetabase", + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-20T05:57:05.744383Z" + }, + "location": null, + "model": "card" }, { - "description": null, + "description": "Dummy 2", "collection_position": null, - "name": "Customers, Sum of Number Of Orders and Average of Number Of Orders, Grouped by Most Recent Order (day)", - "id": 1, - "display": "line", + "can_write": true, + "database_id": null, + "collection_id": null, + "name": "Dummy", + "fully_parameterized": true, + "moderated_status": null, + "id": 31, + "display": "table", + "entity_id": "y_3jQjY9IbZEBAZ8xLoPN", + "collection_preview": true, "last-edit-info": { "id": 1, - "last_name": "", + "last_name": null, "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:00:47.4892Z" + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-20T05:57:18.528579Z" }, - "favorite": false, + "location": null, "model": "card" }, { - "description": "Nice KPI", + "description": "Orders and customers", "collection_position": null, - "name": "Orders, Count", - "id": 2, - "display": "scalar", + "can_write": true, + "database_id": null, + "collection_id": null, + "name": "Orders + Customers", + "fully_parameterized": true, + "moderated_status": null, + "id": 27, + "display": "table", + "entity_id": "WWI6bOVB-ssXYgCHASj9E", + "collection_preview": true, "last-edit-info": { "id": 1, - "last_name": "", + "last_name": null, "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2021-07-21T08:01:14.3056Z" + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-19T12:04:21.270066Z" }, - "favorite": false, + "location": null, "model": "card" }, { "description": null, "collection_position": null, - "name": "Orders Customers", - "id": 23, + "can_write": true, + "database_id": null, + "collection_id": null, + "name": "Orders + Customers, Filtered by Status is completed", + "fully_parameterized": true, + "moderated_status": null, + "id": 28, "display": "table", + "entity_id": "ewUj6ow4HD_vePKnXihVA", + "collection_preview": true, "last-edit-info": { "id": 1, - "email": "dbtmetabase@example.com", - "first_name": "dbtmetabase", "last_name": null, - "timestamp": "2024-01-26T23:34:25.467752Z" + "first_name": "dbtmetabase", + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-19T11:58:35.066297Z" }, - "favorite": false, + "location": null, "model": "card" }, { "description": null, "collection_position": null, - "name": "Orders Customers Filtered", - "id": 24, - "display": "table", + "can_write": true, + "database_id": null, + "collection_id": null, + "name": "Returned Order Count SQL", + "fully_parameterized": true, + "moderated_status": null, + "id": 29, + "display": "scalar", + "entity_id": "iCEt78jHFFT1fqTa28FOB", + "collection_preview": true, "last-edit-info": { "id": 1, - "last_name": "", + "last_name": null, "first_name": "dbtmetabase", - "email": "user@example.com", - "timestamp": "2024-01-21T08:01:37.449936Z" + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-19T12:03:01.981604Z" }, - "favorite": false, + "location": null, "model": "card" + }, + { + "description": "Dashboard is a dashboard is a dashboard", + "collection_position": null, + "can_write": true, + "database_id": null, + "collection_id": null, + "name": "The Dashboard", + "id": 2, + "entity_id": "tAP447G_z1qHPtZeJkc2J", + "last-edit-info": { + "id": 1, + "last_name": null, + "first_name": "dbtmetabase", + "email": "dbtmetabase@example.com", + "timestamp": "2024-06-19T12:03:22.501237Z" + }, + "location": null, + "model": "dashboard" } -] +] \ No newline at end of file diff --git a/tests/fixtures/api/dashboard.json b/tests/fixtures/api/dashboard.json deleted file mode 100644 index 5c686e86..00000000 --- a/tests/fixtures/api/dashboard.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "description": null, - "archived": false, - "collection_position": 1, - "creator": { - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_login": "2021-07-21T19:25:28.6083Z", - "is_qbnewb": false, - "is_superuser": true, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase" - }, - "enable_embedding": false, - "collection_id": 3, - "show_in_getting_started": false, - "name": "A look at your customers table", - "caveats": null, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:37.328519Z", - "made_public_by_id": null, - "embedding_params": null, - "id": 1, - "position": null, - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.542335Z" - }, - "parameters": [ - { - "id": "-1693594175", - "type": "date/all-options", - "name": "most_recent_order", - "slug": "most_recent_order" - }, - { - "id": "381527929", - "type": "date/all-options", - "name": "first_order", - "slug": "first_order" - } - ], - "favorite": false, - "created_at": "2021-07-21T08:01:37.328519Z", - "public_uuid": null, - "points_of_interest": null - } -] \ No newline at end of file diff --git a/tests/fixtures/api/dashboard/1.json b/tests/fixtures/api/dashboard/1.json deleted file mode 100644 index f858d4a7..00000000 --- a/tests/fixtures/api/dashboard/1.json +++ /dev/null @@ -1,2533 +0,0 @@ -{ - "description": null, - "archived": false, - "collection_position": 1, - "dashcards": [ - { - "sizeX": 18, - "series": [], - "collection_authority_level": null, - "card": { - "query_average_duration": null - }, - "updated_at": "2021-07-21T08:01:37.372373Z", - "col": 0, - "id": 1, - "parameter_mappings": [], - "card_id": null, - "visualization_settings": { - "text": "# Summary", - "virtual_card": { - "name": null, - "display": "text", - "dataset_query": {}, - "visualization_settings": {} - }, - "dashcard.background": false, - "text.align_vertical": "bottom" - }, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.372373Z", - "sizeY": 2, - "row": 0 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 100.0, - "q1": 100.0, - "q3": 100.0, - "max": 100.0, - "sd": null, - "avg": 100.0 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Total customers", - "query_average_duration": 579, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:41.996Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 3, - "display": "scalar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "created_at": "2021-07-21T08:01:37.434243Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:37.466466Z", - "col": 0, - "id": 2, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 3 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 3 - } - ], - "card_id": 3, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.466466Z", - "sizeY": 4, - "row": 2 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.0, - "max": 0.0, - "sd": null, - "avg": 0.0 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers added in the last 30 days", - "query_average_duration": 38, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.000946Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "filter": [ - "time-interval", - [ - "field", - 42, - null - ], - -30, - "day" - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 4, - "display": "scalar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "created_at": "2021-07-21T08:01:37.535187Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:37.567169Z", - "col": 6, - "id": 3, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 4 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 4 - } - ], - "card_id": 4, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.567169Z", - "sizeY": 4, - "row": 2 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 1, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.0, - "max": 0.0, - "sd": null, - "avg": 0.0 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers added in the last 30 days", - "query_average_duration": 132, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.157282Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "filter": [ - "time-interval", - [ - "field", - 39, - null - ], - -30, - "day" - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 5, - "display": "scalar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [] - }, - "created_at": "2021-07-21T08:01:37.630969Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:37.652919Z", - "col": 12, - "id": 4, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 5 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 5 - } - ], - "card_id": 5, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.652919Z", - "sizeY": 4, - "row": 2 - }, - { - "sizeX": 18, - "series": [], - "collection_authority_level": null, - "card": { - "query_average_duration": null - }, - "updated_at": "2021-07-21T08:01:37.686857Z", - "col": 0, - "id": 5, - "parameter_mappings": [], - "card_id": null, - "visualization_settings": { - "text": "# How these customers are distributed", - "virtual_card": { - "name": null, - "display": "text", - "dataset_query": {}, - "visualization_settings": {} - }, - "dashcard.background": false, - "text.align_vertical": "bottom" - }, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.686857Z", - "sizeY": 2, - "row": 6 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": "type/Quantity", - "coercion_strategy": null, - "name": "number_of_orders", - "field_ref": [ - "field", - 40, - { - "binning": { - "strategy": "num-bins", - "min-value": 1.0, - "max-value": 5.0, - "num-bins": 8, - "bin-width": 0.5 - } - } - ], - "effective_type": "type/BigInteger", - "id": 40, - "display_name": "number_of_orders", - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.0901356485315583, - "max": 5.0, - "sd": 0.7779687173818424, - "avg": 1.596774193548387 - } - } - }, - "base_type": "type/Decimal" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 4.0, - "q3": 34.25, - "max": 38.0, - "sd": 16.492422502470642, - "avg": 20.0 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers by number_of_orders", - "query_average_duration": 321, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.107313Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 40, - { - "binning": { - "strategy": "default" - } - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 6, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "number_of_orders" - ], - "graph.colors": [ - "#EF8C8C" - ] - }, - "created_at": "2021-07-21T08:01:37.754606Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:37.781517Z", - "col": 0, - "id": 6, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 6 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 6 - } - ], - "card_id": 6, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.781517Z", - "sizeY": 4, - "row": 8 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "name": "customer_lifetime_value", - "field_ref": [ - "field", - 41, - { - "binning": { - "strategy": "num-bins", - "min-value": 0.0, - "max-value": 100.0, - "num-bins": 8, - "bin-width": 12.5 - } - } - ], - "effective_type": "type/BigInteger", - "id": 41, - "display_name": "customer_lifetime_value", - "fingerprint": { - "global": { - "distinct-count": 36, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.464101615137753, - "q3": 35.46410161513776, - "max": 99.0, - "sd": 18.812245525263663, - "avg": 26.967741935483872 - } - } - }, - "base_type": "type/Decimal" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 3.0, - "q3": 17.5, - "max": 38.0, - "sd": 12.294017127971522, - "avg": 12.5 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customers by customer_lifetime_value", - "query_average_duration": 163, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.20895Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 41, - { - "binning": { - "strategy": "default" - } - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 7, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "customer_lifetime_value" - ], - "graph.colors": [ - "#A6E7F3" - ] - }, - "created_at": "2021-07-21T08:01:37.858387Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:37.886739Z", - "col": 6, - "id": 7, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 7 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 7 - } - ], - "card_id": 7, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.886739Z", - "sizeY": 4, - "row": 8 - }, - { - "sizeX": 18, - "series": [], - "collection_authority_level": null, - "card": { - "query_average_duration": null - }, - "updated_at": "2021-07-21T08:01:37.923226Z", - "col": 0, - "id": 8, - "parameter_mappings": [], - "card_id": null, - "visualization_settings": { - "text": "# These customers across time", - "virtual_card": { - "name": null, - "display": "text", - "dataset_query": {}, - "visualization_settings": {} - }, - "dashcard.background": false, - "text.align_vertical": "bottom" - }, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:37.923226Z", - "sizeY": 2, - "row": 12 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 7, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0200644129064447, - "q3": 2.3725029928215275, - "max": 7.0, - "sd": 1.25650644505132, - "avg": 1.9038461538461537 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.019031639883796, - "max": 5.0, - "sd": 0.7594097162561813, - "avg": 1.573717948717949 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Number_of_orders over time", - "query_average_duration": 1044, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.368004Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 8, - "display": "line", - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "created_at": "2021-07-21T08:01:38.016244Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.058235Z", - "col": 0, - "id": 9, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 8 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 8 - } - ], - "card_id": 8, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.058235Z", - "sizeY": 4, - "row": 14 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 35, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 15.0, - "q3": 40.10050506338833, - "max": 131.0, - "sd": 26.119172295224672, - "avg": 32.15384615384615 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 34, - "nil%": 0.01886792452830189 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.17157287525381, - "q3": 34.732050807568875, - "max": 99.0, - "sd": 17.628392521514144, - "avg": 26.39102564102564 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customer_lifetime_value over time", - "query_average_duration": 1070, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.456526Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 41, - null - ] - ], - [ - "avg", - [ - "field", - 41, - null - ] - ] - ] - } - }, - "id": 9, - "display": "line", - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#f9d45c", - "#F1B556" - ] - }, - "created_at": "2021-07-21T08:01:38.189846Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.245167Z", - "col": 6, - "id": 10, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 9 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 9 - } - ], - "card_id": 9, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.245167Z", - "sizeY": 4, - "row": 14 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 6, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.1073874870150486, - "q3": 3.0, - "max": 5.0, - "sd": 1.2643380578934107, - "avg": 2.152173913043478 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of number_of_orders", - "base_type": "type/Decimal", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 8, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.019470273980893, - "q3": 1.989426104361334, - "max": 5.0, - "sd": 0.7515349295958083, - "avg": 1.596014492753623 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Number_of_orders over time", - "query_average_duration": 861, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.321381Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 40, - null - ] - ], - [ - "avg", - [ - "field", - 40, - null - ] - ] - ] - } - }, - "id": 10, - "display": "line", - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#7172AD", - "#EF8C8C" - ] - }, - "created_at": "2021-07-21T08:01:38.347535Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.41171Z", - "col": 12, - "id": 11, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 10 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 10 - } - ], - "card_id": 10, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.41171Z", - "sizeY": 4, - "row": 14 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Date" - }, - { - "name": "sum", - "display_name": "Sum of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 33, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 17.0, - "q3": 55.93725393319377, - "max": 129.0, - "sd": 25.492672054973276, - "avg": 36.34782608695652 - } - } - } - }, - { - "name": "avg", - "display_name": "Average of customer_lifetime_value", - "base_type": "type/Decimal", - "semantic_type": null, - "field_ref": [ - "aggregation", - 1 - ], - "fingerprint": { - "global": { - "distinct-count": 35, - "nil%": 0.02127659574468085 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 15.0, - "q3": 33.53589838486224, - "max": 65.0, - "sd": 17.057530000270994, - "avg": 27.342391304347824 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Customer_lifetime_value over time", - "query_average_duration": 843, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.665585Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day" - } - ] - ], - "aggregation": [ - [ - "sum", - [ - "field", - 41, - null - ] - ], - [ - "avg", - [ - "field", - 41, - null - ] - ] - ] - } - }, - "id": 11, - "display": "line", - "visualization_settings": { - "graph.series_labels": [ - "sum", - "average" - ], - "graph.metrics": [ - "sum", - "avg" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#f9d45c", - "#F1B556" - ] - }, - "created_at": "2021-07-21T08:01:38.52841Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.575083Z", - "col": 0, - "id": 12, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 11 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 11 - } - ], - "card_id": 11, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.575083Z", - "sizeY": 4, - "row": 18 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day-of-week", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "day-of-week" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 6.0, - "q1": 7.414213562373095, - "q3": 15.782357300628025, - "max": 38.0, - "sd": 10.488088481701515, - "avg": 12.5 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by day of the week", - "query_average_duration": 277, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.346492Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "day-of-week" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 12, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "created_at": "2021-07-21T08:01:38.662485Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.705264Z", - "col": 6, - "id": 13, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 12 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 12 - } - ], - "card_id": 12, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.705264Z", - "sizeY": 4, - "row": 18 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "day-of-week", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "day-of-week" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 6, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 6.0, - "q1": 7.414213562373095, - "q3": 11.757359312880714, - "max": 38.0, - "sd": 10.528871870107588, - "avg": 12.5 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by day of the week", - "query_average_duration": 195, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.483723Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "day-of-week" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 13, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "created_at": "2021-07-21T08:01:38.808186Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.850161Z", - "col": 12, - "id": 14, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 13 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 13 - } - ], - "card_id": 13, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.850161Z", - "sizeY": 4, - "row": 18 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "month-of-year", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "month-of-year" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 8.0, - "q1": 10.25, - "q3": 30.5, - "max": 38.0, - "sd": 12.62933094031509, - "avg": 20.0 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by month of the year", - "query_average_duration": 159, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.562877Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "month-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 14, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "created_at": "2021-07-21T08:01:38.938688Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:38.983764Z", - "col": 0, - "id": 15, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 14 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 14 - } - ], - "card_id": 14, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:38.983764Z", - "sizeY": 4, - "row": 22 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "month-of-year", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "month-of-year" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 4, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 2.0, - "q1": 11.298221281347036, - "q3": 27.5, - "max": 38.0, - "sd": 12.96148139681572, - "avg": 20.0 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by month of the year", - "query_average_duration": 119, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.52292Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "month-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 15, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "created_at": "2021-07-21T08:01:39.084258Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:39.132463Z", - "col": 6, - "id": 16, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 15 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 15 - } - ], - "card_id": 15, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:39.132463Z", - "sizeY": 4, - "row": 22 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "quarter-of-year", - "name": "most_recent_order", - "field_ref": [ - "field", - 42, - { - "temporal-unit": "quarter-of-year" - } - ], - "effective_type": "type/Date", - "id": 42, - "display_name": "most_recent_order", - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 3, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 8.0, - "q1": 15.5, - "q3": 50.0, - "max": 54.0, - "sd": 23.35237318418266, - "avg": 33.333333333333336 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by quarter of the year", - "query_average_duration": 73, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.567707Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 42, - { - "temporal-unit": "quarter-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 16, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "most_recent_order" - ], - "graph.colors": [ - "#A6E7F3" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "created_at": "2021-07-21T08:01:39.228965Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:39.274309Z", - "col": 12, - "id": 17, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 16 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 16 - } - ], - "card_id": 16, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:39.274309Z", - "sizeY": 4, - "row": 22 - }, - { - "sizeX": 6, - "series": [], - "collection_authority_level": null, - "card": { - "description": null, - "archived": false, - "collection_position": null, - "table_id": 7, - "result_metadata": [ - { - "semantic_type": null, - "coercion_strategy": null, - "unit": "quarter-of-year", - "name": "first_order", - "field_ref": [ - "field", - 39, - { - "temporal-unit": "quarter-of-year" - } - ], - "effective_type": "type/Date", - "id": 39, - "display_name": "first_order", - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "base_type": "type/Integer" - }, - { - "name": "count", - "display_name": "Count", - "base_type": "type/BigInteger", - "semantic_type": "type/Quantity", - "field_ref": [ - "aggregation", - 0 - ], - "fingerprint": { - "global": { - "distinct-count": 3, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 2.0, - "q1": 11.0, - "q3": 54.5, - "max": 60.0, - "sd": 29.280255007997, - "avg": 33.333333333333336 - } - } - } - } - ], - "database_id": 2, - "enable_embedding": false, - "collection_id": 3, - "query_type": "query", - "name": "Timestamp by quarter of the year", - "query_average_duration": 74, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:42.603496Z", - "made_public_by_id": null, - "embedding_params": null, - "cache_ttl": null, - "dataset_query": { - "type": "query", - "database": 2, - "query": { - "source-table": 7, - "breakout": [ - [ - "field", - 39, - { - "temporal-unit": "quarter-of-year" - } - ] - ], - "aggregation": [ - [ - "count" - ] - ] - } - }, - "id": 17, - "display": "bar", - "visualization_settings": { - "graph.series_labels": [ - "number" - ], - "graph.metrics": [ - "count" - ], - "graph.dimensions": [ - "first_order" - ], - "graph.colors": [ - "#F1B556" - ], - "graph.x_axis.title_text": "Timestamp" - }, - "created_at": "2021-07-21T08:01:39.371067Z", - "public_uuid": null - }, - "updated_at": "2021-07-21T08:01:39.426126Z", - "col": 0, - "id": 18, - "parameter_mappings": [ - { - "parameter_id": "-1693594175", - "target": [ - "dimension", - [ - "field", - 42, - null - ] - ], - "card_id": 17 - }, - { - "parameter_id": "381527929", - "target": [ - "dimension", - [ - "field", - 39, - null - ] - ], - "card_id": 17 - } - ], - "card_id": 17, - "visualization_settings": {}, - "dashboard_id": 1, - "created_at": "2021-07-21T08:01:39.426126Z", - "sizeY": 4, - "row": 26 - } - ], - "param_values": null, - "can_write": true, - "enable_embedding": false, - "collection_id": 3, - "show_in_getting_started": false, - "name": "A look at your customers table", - "caveats": null, - "collection_authority_level": null, - "creator_id": 1, - "updated_at": "2021-07-21T08:01:37.328519Z", - "made_public_by_id": null, - "embedding_params": null, - "id": 1, - "position": null, - "param_fields": { - "42": { - "id": 42, - "table_id": 7, - "display_name": "most_recent_order", - "base_type": "type/Date", - "semantic_type": null, - "has_field_values": "none", - "name_field": null, - "dimensions": [] - }, - "39": { - "id": 39, - "table_id": 7, - "display_name": "first_order", - "base_type": "type/Date", - "semantic_type": null, - "has_field_values": "none", - "name_field": null, - "dimensions": [] - } - }, - "last-edit-info": { - "id": 1, - "email": "user@example.com", - "first_name": "dbtmetabase", - "last_name": "", - "timestamp": "2021-07-21T08:01:39.542335Z" - }, - "parameters": [ - { - "id": "-1693594175", - "type": "date/all-options", - "name": "most_recent_order", - "slug": "most_recent_order" - }, - { - "id": "381527929", - "type": "date/all-options", - "name": "first_order", - "slug": "first_order" - } - ], - "created_at": "2021-07-21T08:01:37.328519Z", - "public_uuid": null, - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/dashboard/2.json b/tests/fixtures/api/dashboard/2.json new file mode 100644 index 00000000..3a2f87c4 --- /dev/null +++ b/tests/fixtures/api/dashboard/2.json @@ -0,0 +1,1396 @@ +{ + "description": "Dashboard is a dashboard is a dashboard", + "archived": false, + "view_count": 96, + "collection_position": null, + "dashcards": [ + { + "size_x": 12, + "dashboard_tab_id": null, + "series": [], + "action_id": null, + "collection_authority_level": null, + "card": { + "cache_invalidated_at": null, + "description": "Orders and customers", + "archived": false, + "view_count": 360, + "collection_position": null, + "table_id": 10, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "description": "This is a unique identifier for an order", + "semantic_type": "type/PK", + "coercion_strategy": null, + "name": "order_id", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 84, + null + ], + "effective_type": "type/Integer", + "id": 84, + "visibility_type": "normal", + "display_name": "Order ID", + "fingerprint": { + "global": { + "distinct-count": 99, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 25.25, + "q3": 74.75, + "max": 99.0, + "sd": 28.719704534890823, + "avg": 50.0 + } + } + }, + "base_type": "type/Integer" + }, + { + "description": "Foreign key to the customers table", + "semantic_type": "type/FK", + "coercion_strategy": null, + "name": "customer_id", + "settings": null, + "fk_target_field_id": 94, + "field_ref": [ + "field", + 79, + null + ], + "effective_type": "type/Integer", + "id": 79, + "visibility_type": "normal", + "display_name": "Customer ID", + "fingerprint": { + "global": { + "distinct-count": 62, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 25.875, + "q3": 69.625, + "max": 99.0, + "sd": 27.781341350472964, + "avg": 48.25252525252525 + } + } + }, + "base_type": "type/Integer" + }, + { + "description": "Date (UTC) that the order was placed", + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "order_date", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 82, + { + "temporal-unit": "default" + } + ], + "effective_type": "type/Date", + "id": 82, + "visibility_type": "normal", + "display_name": "Order Date", + "fingerprint": { + "global": { + "distinct-count": 69, + "nil%": 0.0 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-09" + } + } + }, + "base_type": "type/Date" + }, + { + "description": null, + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "status", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 78, + null + ], + "effective_type": "type/Text", + "id": 78, + "visibility_type": "normal", + "display_name": "Status", + "fingerprint": { + "global": { + "distinct-count": 5, + "nil%": 0.0 + }, + "type": { + "type/Text": { + "percent-json": 0.0, + "percent-url": 0.0, + "percent-email": 0.0, + "percent-state": 0.0, + "average-length": 8.404040404040405 + } + } + }, + "base_type": "type/Text" + }, + { + "description": "Total amount (AUD) of the order", + "semantic_type": null, + "coercion_strategy": null, + "name": "amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 83, + null + ], + "effective_type": "type/BigInteger", + "id": 83, + "visibility_type": "normal", + "display_name": "Amount", + "fingerprint": { + "global": { + "distinct-count": 32, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 8.202945002812456, + "q3": 24.26138721247417, + "max": 58.0, + "sd": 10.736062525374601, + "avg": 16.88888888888889 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "Amount of the order (AUD) paid for by credit card", + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "credit_card_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 81, + null + ], + "effective_type": "type/BigInteger", + "id": 81, + "visibility_type": "normal", + "display_name": "Credit Card Amount", + "fingerprint": { + "global": { + "distinct-count": 25, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 0.0, + "q3": 18.797054997187544, + "max": 30.0, + "sd": 10.959088854927673, + "avg": 8.797979797979798 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "Amount of the order (AUD) paid for by coupon", + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "coupon_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 76, + null + ], + "effective_type": "type/BigInteger", + "id": 76, + "visibility_type": "normal", + "display_name": "Coupon Amount", + "fingerprint": { + "global": { + "distinct-count": 12, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 0.0, + "q3": 0.4747603274810728, + "max": 26.0, + "sd": 5.955012405351229, + "avg": 1.8686868686868687 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "Amount of the order (AUD) paid for by bank transfer", + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "bank_transfer_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 77, + null + ], + "effective_type": "type/BigInteger", + "id": 77, + "visibility_type": "normal", + "display_name": "Bank Transfer Amount", + "fingerprint": { + "global": { + "distinct-count": 19, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 0.0, + "q3": 4.75, + "max": 26.0, + "sd": 7.420825132023675, + "avg": 4.151515151515151 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "Amount of the order (AUD) paid for by gift card", + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "gift_card_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 80, + null + ], + "effective_type": "type/BigInteger", + "id": 80, + "visibility_type": "normal", + "display_name": "Gift Card Amount", + "fingerprint": { + "global": { + "distinct-count": 11, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 0.0, + "q3": 1.3692088763283736, + "max": 30.0, + "sd": 6.392362351566517, + "avg": 2.0707070707070705 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "This is a unique identifier for a customer", + "semantic_type": "type/PK", + "coercion_strategy": null, + "name": "customer_id_2", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 94, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/Integer", + "id": 94, + "visibility_type": "normal", + "display_name": "Customers \u2192 Customer ID", + "fingerprint": { + "global": { + "distinct-count": 100, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 25.5, + "q3": 75.5, + "max": 100.0, + "sd": 29.008358252146028, + "avg": 50.5 + } + } + }, + "base_type": "type/Integer" + }, + { + "description": "Customer's first name. PII.", + "semantic_type": "type/Name", + "coercion_strategy": null, + "name": "first_name", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 91, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/Text", + "id": 91, + "visibility_type": "normal", + "display_name": "Customers \u2192 First Name", + "fingerprint": { + "global": { + "distinct-count": 79, + "nil%": 0.0 + }, + "type": { + "type/Text": { + "percent-json": 0.0, + "percent-url": 0.0, + "percent-email": 0.0, + "percent-state": 0.02, + "average-length": 5.86 + } + } + }, + "base_type": "type/Text" + }, + { + "description": "Customer's last name. PII.", + "semantic_type": "type/Name", + "coercion_strategy": null, + "name": "last_name", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 90, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/Text", + "id": 90, + "visibility_type": "normal", + "display_name": "Customers \u2192 Last Name", + "fingerprint": { + "global": { + "distinct-count": 19, + "nil%": 0.0 + }, + "type": { + "type/Text": { + "percent-json": 0.0, + "percent-url": 0.0, + "percent-email": 0.0, + "percent-state": 0.0, + "average-length": 2.0 + } + } + }, + "base_type": "type/Text" + }, + { + "description": "Date (UTC) of a customer's first order", + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "first_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 95, + { + "temporal-unit": "default", + "join-alias": "Customers" + } + ], + "effective_type": "type/Date", + "id": 95, + "visibility_type": "normal", + "display_name": "Customers \u2192 First Order", + "fingerprint": { + "global": { + "distinct-count": 47, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-07" + } + } + }, + "base_type": "type/Date" + }, + { + "description": "Date (UTC) of a customer's most recent order", + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "most_recent_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 92, + { + "temporal-unit": "default", + "join-alias": "Customers" + } + ], + "effective_type": "type/Date", + "id": 92, + "visibility_type": "normal", + "display_name": "Customers \u2192 Most Recent Order", + "fingerprint": { + "global": { + "distinct-count": 53, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-09", + "latest": "2018-04-09" + } + } + }, + "base_type": "type/Date" + }, + { + "description": "Count of the number of orders a customer has placed", + "semantic_type": "type/Quantity", + "coercion_strategy": null, + "name": "number_of_orders", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 89, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/BigInteger", + "id": 89, + "visibility_type": "normal", + "display_name": "Customers \u2192 order_count", + "fingerprint": { + "global": { + "distinct-count": 5, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 1.0, + "q3": 2.0901356485315583, + "max": 5.0, + "sd": 0.7779687173818424, + "avg": 1.596774193548387 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": "Total value (AUD) of a customer's orders", + "semantic_type": null, + "coercion_strategy": null, + "name": "customer_lifetime_value", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 93, + { + "join-alias": "Customers" + } + ], + "effective_type": "type/BigInteger", + "id": 93, + "visibility_type": "normal", + "display_name": "Customers \u2192 Customer Lifetime Value", + "fingerprint": { + "global": { + "distinct-count": 36, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 13.464101615137753, + "q3": 35.46410161513776, + "max": 99.0, + "sd": 18.812245525263663, + "avg": 26.967741935483872 + } + } + }, + "base_type": "type/BigInteger" + } + ], + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "query", + "name": "Orders + Customers", + "last_used_at": "2024-06-20T05:55:59.079272Z", + "type": "question", + "query_average_duration": 72, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-20T05:55:59.117538Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "query", + "query": { + "source-table": 10, + "joins": [ + { + "fields": "all", + "alias": "Customers", + "condition": [ + "=", + [ + "field", + 79, + { + "base-type": "type/Integer" + } + ], + [ + "field", + 94, + { + "base-type": "type/Integer", + "join-alias": "Customers" + } + ] + ], + "source-table": 12 + } + ] + } + }, + "id": 27, + "parameter_mappings": [], + "display": "table", + "entity_id": "WWI6bOVB-ssXYgCHASj9E", + "collection_preview": true, + "visualization_settings": { + "table.pivot_column": "number_of_orders", + "table.cell_column": "order_id" + }, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-19T11:57:35.85999Z", + "public_uuid": null + }, + "updated_at": "2024-06-19T11:57:59.706516Z", + "col": 0, + "id": 32, + "parameter_mappings": [], + "card_id": 27, + "entity_id": "t8WO08wff6s6mQEeClbMU", + "visualization_settings": {}, + "size_y": 9, + "dashboard_id": 2, + "created_at": "2024-06-19T11:57:59.706516Z", + "row": 0 + }, + { + "size_x": 12, + "dashboard_tab_id": null, + "series": [], + "action_id": null, + "collection_authority_level": null, + "card": { + "cache_invalidated_at": null, + "description": null, + "archived": false, + "view_count": 180, + "collection_position": null, + "table_id": 10, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "name": "order_id", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 84, + null + ], + "effective_type": "type/Integer", + "id": 84, + "visibility_type": "normal", + "display_name": "Order ID", + "fingerprint": { + "global": { + "distinct-count": 99, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 25.25, + "q3": 74.75, + "max": 99, + "sd": 28.719704534890823, + "avg": 50 + } + } + }, + "base_type": "type/Integer" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "name": "customer_id", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 79, + null + ], + "effective_type": "type/Integer", + "id": 79, + "visibility_type": "normal", + "display_name": "Customer ID", + "fingerprint": { + "global": { + "distinct-count": 62, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 25.875, + "q3": 69.625, + "max": 99, + "sd": 27.781341350472964, + "avg": 48.25252525252525 + } + } + }, + "base_type": "type/Integer" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "order_date", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 82, + { + "temporal-unit": "default" + } + ], + "effective_type": "type/Date", + "id": 82, + "visibility_type": "normal", + "display_name": "Order Date", + "fingerprint": { + "global": { + "distinct-count": 69, + "nil%": 0 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-09" + } + } + }, + "base_type": "type/Date" + }, + { + "description": null, + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "status", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 78, + null + ], + "effective_type": "type/Text", + "id": 78, + "visibility_type": "normal", + "display_name": "Status", + "fingerprint": { + "global": { + "distinct-count": 5, + "nil%": 0 + }, + "type": { + "type/Text": { + "percent-json": 0, + "percent-url": 0, + "percent-email": 0, + "percent-state": 0, + "average-length": 8.404040404040405 + } + } + }, + "base_type": "type/Text" + }, + { + "description": null, + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "credit_card_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 81, + null + ], + "effective_type": "type/BigInteger", + "id": 81, + "visibility_type": "normal", + "display_name": "Credit Card Amount", + "fingerprint": { + "global": { + "distinct-count": 25, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 18.797054997187544, + "max": 30, + "sd": 10.959088854927673, + "avg": 8.797979797979798 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "coupon_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 76, + null + ], + "effective_type": "type/BigInteger", + "id": 76, + "visibility_type": "normal", + "display_name": "Coupon Amount", + "fingerprint": { + "global": { + "distinct-count": 12, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 0.4747603274810728, + "max": 26, + "sd": 5.955012405351229, + "avg": 1.8686868686868687 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "bank_transfer_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 77, + null + ], + "effective_type": "type/BigInteger", + "id": 77, + "visibility_type": "normal", + "display_name": "Bank Transfer Amount", + "fingerprint": { + "global": { + "distinct-count": 19, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 4.75, + "max": 26, + "sd": 7.420825132023675, + "avg": 4.151515151515151 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": "type/Category", + "coercion_strategy": null, + "name": "gift_card_amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 80, + null + ], + "effective_type": "type/BigInteger", + "id": 80, + "visibility_type": "normal", + "display_name": "Gift Card Amount", + "fingerprint": { + "global": { + "distinct-count": 11, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 0, + "q3": 1.3692088763283736, + "max": 30, + "sd": 6.392362351566517, + "avg": 2.0707070707070705 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "name": "amount", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 83, + null + ], + "effective_type": "type/BigInteger", + "id": 83, + "visibility_type": "normal", + "display_name": "Amount", + "fingerprint": { + "global": { + "distinct-count": 32, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 0, + "q1": 8.202945002812456, + "q3": 24.26138721247417, + "max": 58, + "sd": 10.736062525374601, + "avg": 16.88888888888889 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "name": "customer_id_2", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 94, + null + ], + "effective_type": "type/Integer", + "id": 94, + "visibility_type": "normal", + "display_name": "Customers \u2192 Customer ID", + "fingerprint": { + "global": { + "distinct-count": 100, + "nil%": 0 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 25.5, + "q3": 75.5, + "max": 100, + "sd": 29.008358252146028, + "avg": 50.5 + } + } + }, + "base_type": "type/Integer" + }, + { + "description": null, + "semantic_type": "type/Name", + "coercion_strategy": null, + "name": "first_name", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 91, + null + ], + "effective_type": "type/Text", + "id": 91, + "visibility_type": "normal", + "display_name": "Customers \u2192 First Name", + "fingerprint": { + "global": { + "distinct-count": 79, + "nil%": 0 + }, + "type": { + "type/Text": { + "percent-json": 0, + "percent-url": 0, + "percent-email": 0, + "percent-state": 0.02, + "average-length": 5.86 + } + } + }, + "base_type": "type/Text" + }, + { + "description": null, + "semantic_type": "type/Name", + "coercion_strategy": null, + "name": "last_name", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 90, + null + ], + "effective_type": "type/Text", + "id": 90, + "visibility_type": "normal", + "display_name": "Customers \u2192 Last Name", + "fingerprint": { + "global": { + "distinct-count": 19, + "nil%": 0 + }, + "type": { + "type/Text": { + "percent-json": 0, + "percent-url": 0, + "percent-email": 0, + "percent-state": 0, + "average-length": 2 + } + } + }, + "base_type": "type/Text" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "first_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 95, + { + "temporal-unit": "default" + } + ], + "effective_type": "type/Date", + "id": 95, + "visibility_type": "normal", + "display_name": "Customers \u2192 First Order", + "fingerprint": { + "global": { + "distinct-count": 47, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-07" + } + } + }, + "base_type": "type/Date" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "unit": "default", + "name": "most_recent_order", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 92, + { + "temporal-unit": "default" + } + ], + "effective_type": "type/Date", + "id": 92, + "visibility_type": "normal", + "display_name": "Customers \u2192 Most Recent Order", + "fingerprint": { + "global": { + "distinct-count": 53, + "nil%": 0.38 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-09", + "latest": "2018-04-09" + } + } + }, + "base_type": "type/Date" + }, + { + "description": null, + "semantic_type": "type/Quantity", + "coercion_strategy": null, + "name": "number_of_orders", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 89, + null + ], + "effective_type": "type/BigInteger", + "id": 89, + "visibility_type": "normal", + "display_name": "Customers \u2192 Number Of Orders", + "fingerprint": { + "global": { + "distinct-count": 5, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 1, + "q3": 2.0901356485315583, + "max": 5, + "sd": 0.7779687173818424, + "avg": 1.596774193548387 + } + } + }, + "base_type": "type/BigInteger" + }, + { + "description": null, + "semantic_type": null, + "coercion_strategy": null, + "name": "customer_lifetime_value", + "settings": null, + "fk_target_field_id": null, + "field_ref": [ + "field", + 93, + null + ], + "effective_type": "type/BigInteger", + "id": 93, + "visibility_type": "normal", + "display_name": "Customers \u2192 Customer Lifetime Value", + "fingerprint": { + "global": { + "distinct-count": 36, + "nil%": 0.38 + }, + "type": { + "type/Number": { + "min": 1, + "q1": 13.464101615137753, + "q3": 35.46410161513776, + "max": 99, + "sd": 18.812245525263663, + "avg": 26.967741935483872 + } + } + }, + "base_type": "type/BigInteger" + } + ], + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "query", + "name": "Orders + Customers, Filtered by Status is completed", + "last_used_at": "2024-06-19T12:09:31.689381Z", + "type": "question", + "query_average_duration": 129, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-19T12:09:31.689381Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "query", + "query": { + "source-table": "card__27", + "filter": [ + "=", + [ + "field", + 78, + { + "base-type": "type/Text" + } + ], + "completed" + ] + } + }, + "id": 28, + "parameter_mappings": [], + "display": "table", + "entity_id": "ewUj6ow4HD_vePKnXihVA", + "collection_preview": true, + "visualization_settings": { + "table.pivot_column": "status", + "table.cell_column": "order_id" + }, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-19T11:58:35.060527Z", + "public_uuid": null + }, + "updated_at": "2024-06-19T11:59:02.788755Z", + "col": 12, + "id": 33, + "parameter_mappings": [], + "card_id": 28, + "entity_id": "T-MQs-NmBE2RvDxzilbfy", + "visualization_settings": {}, + "size_y": 9, + "dashboard_id": 2, + "created_at": "2024-06-19T11:59:02.788755Z", + "row": 0 + }, + { + "size_x": 6, + "dashboard_tab_id": null, + "series": [], + "action_id": null, + "collection_authority_level": null, + "card": { + "cache_invalidated_at": null, + "description": null, + "archived": false, + "view_count": 179, + "collection_position": null, + "table_id": null, + "can_run_adhoc_query": true, + "result_metadata": [ + { + "display_name": "count", + "field_ref": [ + "field", + "count", + { + "base-type": "type/BigInteger" + } + ], + "name": "count", + "base_type": "type/BigInteger", + "effective_type": "type/BigInteger", + "semantic_type": "type/Quantity", + "fingerprint": { + "global": { + "distinct-count": 1, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 5.0, + "q1": 5.0, + "q3": 5.0, + "max": 5.0, + "sd": null, + "avg": 5.0 + } + } + } + } + ], + "initially_published_at": null, + "can_write": true, + "database_id": 2, + "enable_embedding": false, + "collection_id": null, + "query_type": "native", + "name": "Returned Order Count SQL", + "last_used_at": "2024-06-19T12:09:31.486489Z", + "type": "question", + "query_average_duration": 10, + "creator_id": 1, + "moderation_reviews": [], + "updated_at": "2024-06-19T12:09:31.507473Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "dataset_query": { + "database": 2, + "type": "native", + "native": { + "template-tags": {}, + "query": "select\n count(*)\nfrom STG_payments as p\n left join STG_orders as o on p.order_id = o.order_id\nwhere o.status = 'returned'\n;" + } + }, + "id": 29, + "parameter_mappings": [], + "display": "scalar", + "entity_id": "iCEt78jHFFT1fqTa28FOB", + "collection_preview": true, + "visualization_settings": {}, + "metabase_version": "v0.50.5 (48f6978)", + "parameters": [], + "created_at": "2024-06-19T12:03:01.905927Z", + "public_uuid": null + }, + "updated_at": "2024-06-19T12:03:09.615782Z", + "col": 0, + "id": 34, + "parameter_mappings": [], + "card_id": 29, + "entity_id": "UXRKboD_8GJ4FwKULLjkm", + "visualization_settings": {}, + "size_y": 3, + "dashboard_id": 2, + "created_at": "2024-06-19T12:03:09.615782Z", + "row": 9 + } + ], + "param_values": null, + "initially_published_at": null, + "can_write": true, + "tabs": [], + "enable_embedding": false, + "collection_id": null, + "show_in_getting_started": false, + "name": "The Dashboard", + "width": "fixed", + "caveats": null, + "collection_authority_level": null, + "creator_id": 1, + "updated_at": "2024-06-19T12:03:22.492116Z", + "made_public_by_id": null, + "embedding_params": null, + "cache_ttl": null, + "last_used_param_values": {}, + "id": 2, + "position": null, + "entity_id": "tAP447G_z1qHPtZeJkc2J", + "param_fields": null, + "last-edit-info": { + "id": 1, + "email": "dbtmetabase@example.com", + "first_name": "dbtmetabase", + "last_name": null, + "timestamp": "2024-06-19T12:03:22.501237Z" + }, + "collection": { + "metabase.models.collection.root/is-root?": true, + "authority_level": null, + "name": "Our analytics", + "is_personal": false, + "id": "root", + "can_write": true + }, + "parameters": [], + "auto_apply_filters": true, + "created_at": "2024-06-19T11:57:43.675681Z", + "public_uuid": null, + "points_of_interest": null +} \ No newline at end of file diff --git a/tests/fixtures/api/database.json b/tests/fixtures/api/database.json index e7337673..d66d6b87 100644 --- a/tests/fixtures/api/database.json +++ b/tests/fixtures/api/database.json @@ -1,51 +1,88 @@ [ { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", "native_permissions": "write", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", + "points_of_interest": null, + "can_upload": false } ] \ No newline at end of file diff --git a/tests/fixtures/api/database/2.json b/tests/fixtures/api/database/2.json deleted file mode 100644 index 95c2c8d4..00000000 --- a/tests/fixtures/api/database/2.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "schedules": { - "cache_field_values": { - "schedule_minute": 0, - "schedule_day": null, - "schedule_frame": null, - "schedule_hour": 22, - "schedule_type": "daily" - }, - "metadata_sync": { - "schedule_minute": 46, - "schedule_day": null, - "schedule_frame": null, - "schedule_hour": null, - "schedule_type": "hourly" - } - }, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/database/2/metadata.json b/tests/fixtures/api/database/2/metadata.json index 269f033a..c22daedd 100644 --- a/tests/fixtures/api/database/2/metadata.json +++ b/tests/fixtures/api/database/2/metadata.json @@ -1,63 +1,94 @@ { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, "tables": [ { - "description": null, + "description": "This table has basic information about a customer, as well as some derived facts based on a customer's orders", "entity_type": "entity/GenericTable", + "view_count": 2, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "customers", "fields": [ { - "description": null, + "description": "This is a unique identifier for a customer", "database_type": "int4", - "semantic_type": null, - "table_id": 7, + "semantic_type": "type/PK", + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "customer_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.194597Z", + "updated_at": "2024-06-20T05:41:57.903724Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 38, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 94, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "customer_id", + "display_name": "Customer ID", "database_position": 0, + "database_required": false, "fingerprint": { "global": { "distinct-count": 100, @@ -74,35 +105,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.408064Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/Integer", "points_of_interest": null }, { - "description": null, + "description": "Customer's first name. PII.", "database_type": "text", "semantic_type": "type/Name", - "table_id": 7, + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "first_name", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.242305Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:57.905659Z", + "custom_position": 1, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 37, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 91, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 1, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "first_name", + "display_name": "First Name", "database_position": 1, + "database_required": false, "fingerprint": { "global": { "distinct-count": 79, @@ -118,35 +155,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.404944Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/Text", "points_of_interest": null }, { - "description": null, + "description": "Customer's last name. PII.", "database_type": "text", "semantic_type": "type/Name", - "table_id": 7, + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "last_name", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.249828Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:57.90759Z", + "custom_position": 2, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 43, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 90, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 2, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "last_name", + "display_name": "Last Name", "database_position": 2, + "database_required": false, "fingerprint": { "global": { "distinct-count": 19, @@ -162,35 +205,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.419931Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/Text", "points_of_interest": null }, { - "description": null, + "description": "Date (UTC) of a customer's first order", "database_type": "date", "semantic_type": null, - "table_id": 7, + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "first_order", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.232032Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:57.908907Z", + "custom_position": 3, "effective_type": "type/Date", "active": true, + "nfc_path": null, "parent_id": null, - "id": 39, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 95, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 3, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "first_order", + "display_name": "First Order", "database_position": 3, + "database_required": false, "fingerprint": { "global": { "distinct-count": 47, @@ -203,35 +252,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.410556Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/Date", "points_of_interest": null }, { - "description": null, + "description": "Date (UTC) of a customer's most recent order", "database_type": "date", "semantic_type": null, - "table_id": 7, + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "most_recent_order", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.186143Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:57.909899Z", + "custom_position": 4, "effective_type": "type/Date", "active": true, + "nfc_path": null, "parent_id": null, - "id": 42, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 92, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 4, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "most_recent_order", + "display_name": "Most Recent Order", "database_position": 4, + "database_required": false, "fingerprint": { "global": { "distinct-count": 53, @@ -244,35 +299,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.417127Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/Date", "points_of_interest": null }, { - "description": null, + "description": "Count of the number of orders a customer has placed", "database_type": "int8", - "semantic_type": "type/Quantity", - "table_id": 7, + "semantic_type": null, + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "number_of_orders", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.197576Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:57.911909Z", + "custom_position": 5, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 40, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 89, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 5, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "number_of_orders", + "display_name": "order_count", "database_position": 5, + "database_required": false, "fingerprint": { "global": { "distinct-count": 5, @@ -289,35 +350,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.412376Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/BigInteger", "points_of_interest": null }, { - "description": null, + "description": "Total value (AUD) of a customer's orders", "database_type": "int8", "semantic_type": null, - "table_id": 7, + "table_id": 12, "coercion_strategy": null, + "database_indexed": null, "name": "customer_lifetime_value", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.288463Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:57.913497Z", + "custom_position": 6, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 41, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 93, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 6, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "customer_lifetime_value", + "display_name": "Customer Lifetime Value", "database_position": 6, + "database_required": false, "fingerprint": { "global": { "distinct-count": 36, @@ -334,57 +401,67 @@ } } }, - "created_at": "2021-07-21T05:47:53.414671Z", + "created_at": "2024-06-19T11:49:38.804953Z", "base_type": "type/BigInteger", "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 7, + "id": 12, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "customers", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "clients", "metrics": [], - "created_at": "2021-07-21T05:47:53.372467Z", + "created_at": "2024-06-19T11:49:38.617718Z", + "estimated_row_count": 100, "points_of_interest": null }, { - "description": null, + "description": "This table has basic information about orders, as well as some derived facts based on payments", "entity_type": "entity/TransactionTable", + "view_count": 1, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "orders", "fields": [ { - "description": null, + "description": "This is a unique identifier for an order", "database_type": "int4", - "semantic_type": null, - "table_id": 6, + "semantic_type": "type/PK", + "table_id": 10, "coercion_strategy": null, + "database_indexed": null, "name": "order_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.255223Z", + "updated_at": "2024-06-20T05:41:58.045181Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 47, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 84, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "order_id", + "display_name": "Order ID", "database_position": 0, + "database_required": false, "fingerprint": { "global": { "distinct-count": 99, @@ -401,35 +478,90 @@ } } }, - "created_at": "2021-07-21T05:47:53.444318Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/Integer", "points_of_interest": null }, { - "description": null, + "description": "Foreign key to the customers table", "database_type": "int4", - "semantic_type": null, - "table_id": 6, + "semantic_type": "type/FK", + "table_id": 10, "coercion_strategy": null, + "database_indexed": null, "name": "customer_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, - "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.259928Z", - "custom_position": 0, + "fk_target_field_id": 94, + "updated_at": "2024-06-20T05:41:58.046428Z", + "custom_position": 1, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 51, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 79, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 1, "visibility_type": "normal", - "target": null, + "target": { + "description": "This is a unique identifier for a customer", + "database_type": "int4", + "semantic_type": "type/PK", + "table_id": 12, + "coercion_strategy": null, + "database_indexed": null, + "name": "customer_id", + "fingerprint_version": 5, + "has_field_values": "list", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:57.903724Z", + "custom_position": 0, + "effective_type": "type/Integer", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 94, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 0, + "visibility_type": "normal", + "preview_display": true, + "display_name": "Customer ID", + "database_position": 0, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 100, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 25.5, + "q3": 75.5, + "max": 100.0, + "sd": 29.008358252146028, + "avg": 50.5 + } + } + }, + "created_at": "2024-06-19T11:49:38.804953Z", + "base_type": "type/Integer", + "points_of_interest": null + }, "preview_display": true, - "display_name": "customer_id", + "display_name": "Customer ID", "database_position": 1, + "database_required": false, "fingerprint": { "global": { "distinct-count": 62, @@ -446,35 +578,41 @@ } } }, - "created_at": "2021-07-21T05:47:53.452739Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/Integer", "points_of_interest": null }, { - "description": null, + "description": "Date (UTC) that the order was placed", "database_type": "date", "semantic_type": null, - "table_id": 6, + "table_id": 10, "coercion_strategy": null, + "database_indexed": null, "name": "order_date", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.188819Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.048017Z", + "custom_position": 2, "effective_type": "type/Date", "active": true, + "nfc_path": null, "parent_id": null, - "id": 46, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 82, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 2, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "order_date", + "display_name": "Order Date", "database_position": 2, + "database_required": false, "fingerprint": { "global": { "distinct-count": 69, @@ -487,7 +625,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.441254Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/Date", "points_of_interest": null }, @@ -495,27 +633,33 @@ "description": null, "database_type": "text", "semantic_type": "type/Category", - "table_id": 6, + "table_id": 10, "coercion_strategy": null, + "database_indexed": null, "name": "status", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.203655Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.049405Z", + "custom_position": 3, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 50, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 78, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 3, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "status", + "display_name": "Status", "database_position": 3, + "database_required": false, "fingerprint": { "global": { "distinct-count": 5, @@ -531,254 +675,288 @@ } } }, - "created_at": "2021-07-21T05:47:53.450839Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/Text", "points_of_interest": null }, { - "description": null, + "description": "Total amount (AUD) of the order", "database_type": "int8", - "semantic_type": "type/Category", - "table_id": 6, + "semantic_type": null, + "table_id": 10, "coercion_strategy": null, - "name": "credit_card_amount", + "database_indexed": null, + "name": "amount", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.24496Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.050561Z", + "custom_position": 4, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 44, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 83, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 4, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "credit_card_amount", - "database_position": 4, + "display_name": "Amount", + "database_position": 8, + "database_required": false, "fingerprint": { "global": { - "distinct-count": 25, + "distinct-count": 32, "nil%": 0.0 }, "type": { "type/Number": { "min": 0.0, - "q1": 0.0, - "q3": 18.797054997187544, - "max": 30.0, - "sd": 10.959088854927673, - "avg": 8.797979797979798 + "q1": 8.202945002812456, + "q3": 24.26138721247417, + "max": 58.0, + "sd": 10.736062525374601, + "avg": 16.88888888888889 } } }, - "created_at": "2021-07-21T05:47:53.43752Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/BigInteger", "points_of_interest": null }, { - "description": null, + "description": "Amount of the order (AUD) paid for by credit card", "database_type": "int8", "semantic_type": "type/Category", - "table_id": 6, + "table_id": 10, "coercion_strategy": null, - "name": "coupon_amount", + "database_indexed": null, + "name": "credit_card_amount", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.25752Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.051915Z", + "custom_position": 5, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 49, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 81, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 5, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "coupon_amount", - "database_position": 5, + "display_name": "Credit Card Amount", + "database_position": 4, + "database_required": false, "fingerprint": { "global": { - "distinct-count": 12, + "distinct-count": 25, "nil%": 0.0 }, "type": { "type/Number": { "min": 0.0, "q1": 0.0, - "q3": 0.4747603274810728, - "max": 26.0, - "sd": 5.955012405351229, - "avg": 1.8686868686868687 + "q3": 18.797054997187544, + "max": 30.0, + "sd": 10.959088854927673, + "avg": 8.797979797979798 } } }, - "created_at": "2021-07-21T05:47:53.448941Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/BigInteger", "points_of_interest": null }, { - "description": null, + "description": "Amount of the order (AUD) paid for by coupon", "database_type": "int8", "semantic_type": "type/Category", - "table_id": 6, + "table_id": 10, "coercion_strategy": null, - "name": "bank_transfer_amount", + "database_indexed": null, + "name": "coupon_amount", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.25288Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.053613Z", + "custom_position": 6, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 45, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 76, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 6, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "bank_transfer_amount", - "database_position": 6, + "display_name": "Coupon Amount", + "database_position": 5, + "database_required": false, "fingerprint": { "global": { - "distinct-count": 19, + "distinct-count": 12, "nil%": 0.0 }, "type": { "type/Number": { "min": 0.0, "q1": 0.0, - "q3": 4.75, + "q3": 0.4747603274810728, "max": 26.0, - "sd": 7.420825132023675, - "avg": 4.151515151515151 + "sd": 5.955012405351229, + "avg": 1.8686868686868687 } } }, - "created_at": "2021-07-21T05:47:53.43953Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/BigInteger", "points_of_interest": null }, { - "description": null, + "description": "Amount of the order (AUD) paid for by bank transfer", "database_type": "int8", "semantic_type": "type/Category", - "table_id": 6, + "table_id": 10, "coercion_strategy": null, - "name": "gift_card_amount", + "database_indexed": null, + "name": "bank_transfer_amount", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.201036Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.055474Z", + "custom_position": 7, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 48, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 77, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 7, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "gift_card_amount", - "database_position": 7, + "display_name": "Bank Transfer Amount", + "database_position": 6, + "database_required": false, "fingerprint": { "global": { - "distinct-count": 11, + "distinct-count": 19, "nil%": 0.0 }, "type": { "type/Number": { "min": 0.0, "q1": 0.0, - "q3": 1.3692088763283736, - "max": 30.0, - "sd": 6.392362351566517, - "avg": 2.0707070707070705 + "q3": 4.75, + "max": 26.0, + "sd": 7.420825132023675, + "avg": 4.151515151515151 } } }, - "created_at": "2021-07-21T05:47:53.447026Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/BigInteger", "points_of_interest": null }, { - "description": null, + "description": "Amount of the order (AUD) paid for by gift card", "database_type": "int8", - "semantic_type": null, - "table_id": 6, + "semantic_type": "type/Category", + "table_id": 10, "coercion_strategy": null, - "name": "amount", + "database_indexed": null, + "name": "gift_card_amount", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.206083Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.05653Z", + "custom_position": 8, "effective_type": "type/BigInteger", "active": true, + "nfc_path": null, "parent_id": null, - "id": 52, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 80, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 8, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "amount", - "database_position": 8, + "display_name": "Gift Card Amount", + "database_position": 7, + "database_required": false, "fingerprint": { "global": { - "distinct-count": 32, + "distinct-count": 11, "nil%": 0.0 }, "type": { "type/Number": { "min": 0.0, - "q1": 8.202945002812456, - "q3": 24.26138721247417, - "max": 58.0, - "sd": 10.736062525374601, - "avg": 16.88888888888889 + "q1": 0.0, + "q3": 1.3692088763283736, + "max": 30.0, + "sd": 6.392362351566517, + "avg": 2.0707070707070705 } } }, - "created_at": "2021-07-21T05:47:53.455652Z", + "created_at": "2024-06-19T11:49:38.765377Z", "base_type": "type/BigInteger", "points_of_interest": null } ], - "caveats": null, + "caveats": "Some facts are derived from payments", "segments": [], - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 6, + "id": 10, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "orders", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Orders", "metrics": [], - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null + "created_at": "2024-06-19T11:49:38.600376Z", + "estimated_row_count": 99, + "points_of_interest": "Basic information only" }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "raw_customers", "fields": [ @@ -786,29 +964,35 @@ "description": null, "database_type": "int4", "semantic_type": "type/PK", - "table_id": 9, + "table_id": 13, "coercion_strategy": null, + "database_indexed": null, "name": "id", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.234376Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 55, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 98, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "id", + "display_name": "ID", "database_position": 0, + "database_required": false, "fingerprint": null, - "created_at": "2021-07-21T05:47:53.473642Z", + "created_at": "2024-06-19T11:49:38.826019Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -816,27 +1000,33 @@ "description": null, "database_type": "text", "semantic_type": "type/Name", - "table_id": 9, + "table_id": 13, "coercion_strategy": null, + "database_indexed": null, "name": "first_name", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.208554Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 53, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 96, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 1, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "first_name", + "display_name": "First Name", "database_position": 1, + "database_required": false, "fingerprint": { "global": { "distinct-count": 79, @@ -852,7 +1042,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.469932Z", + "created_at": "2024-06-19T11:49:38.826019Z", "base_type": "type/Text", "points_of_interest": null }, @@ -860,27 +1050,33 @@ "description": null, "database_type": "text", "semantic_type": "type/Name", - "table_id": 9, + "table_id": 13, "coercion_strategy": null, + "database_indexed": null, "name": "last_name", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.262668Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 54, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 97, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 2, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "last_name", + "display_name": "Last Name", "database_position": 2, + "database_required": false, "fingerprint": { "global": { "distinct-count": 19, @@ -896,29 +1092,33 @@ } } }, - "created_at": "2021-07-21T05:47:53.471892Z", + "created_at": "2024-06-19T11:49:38.826019Z", "base_type": "type/Text", "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.166218Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 9, + "id": 13, "db_id": 2, "visibility_type": null, "field_order": "database", - "display_name": "raw_customers", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Raw Customers", "metrics": [], - "created_at": "2021-07-21T05:47:53.380782Z", + "created_at": "2024-06-19T11:49:38.633775Z", + "estimated_row_count": 100, "points_of_interest": null }, { "description": null, "entity_type": "entity/TransactionTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "raw_orders", "fields": [ @@ -926,29 +1126,35 @@ "description": null, "database_type": "int4", "semantic_type": "type/PK", - "table_id": 12, + "table_id": 14, "coercion_strategy": null, + "database_indexed": null, "name": "id", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.266036Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 57, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 102, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "id", + "display_name": "ID", "database_position": 0, + "database_required": false, "fingerprint": null, - "created_at": "2021-07-21T05:47:53.48931Z", + "created_at": "2024-06-19T11:49:38.845799Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -956,27 +1162,33 @@ "description": null, "database_type": "int4", "semantic_type": null, - "table_id": 12, + "table_id": 14, "coercion_strategy": null, + "database_indexed": null, "name": "user_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.214697Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 59, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 101, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 1, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "user_id", + "display_name": "User ID", "database_position": 1, + "database_required": false, "fingerprint": { "global": { "distinct-count": 62, @@ -993,7 +1205,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.494231Z", + "created_at": "2024-06-19T11:49:38.845799Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -1001,27 +1213,33 @@ "description": null, "database_type": "date", "semantic_type": null, - "table_id": 12, + "table_id": 14, "coercion_strategy": null, + "database_indexed": null, "name": "order_date", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.268564Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Date", "active": true, + "nfc_path": null, "parent_id": null, - "id": 56, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 99, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 2, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "order_date", + "display_name": "Order Date", "database_position": 2, + "database_required": false, "fingerprint": { "global": { "distinct-count": 69, @@ -1034,7 +1252,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.48571Z", + "created_at": "2024-06-19T11:49:38.845799Z", "base_type": "type/Date", "points_of_interest": null }, @@ -1042,27 +1260,33 @@ "description": null, "database_type": "text", "semantic_type": "type/Category", - "table_id": 12, + "table_id": 14, "coercion_strategy": null, + "database_indexed": null, "name": "status", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.211374Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 58, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 100, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 3, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "status", + "display_name": "Status", "database_position": 3, + "database_required": false, "fingerprint": { "global": { "distinct-count": 5, @@ -1078,29 +1302,33 @@ } } }, - "created_at": "2021-07-21T05:47:53.491699Z", + "created_at": "2024-06-19T11:49:38.845799Z", "base_type": "type/Text", "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.170459Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 12, + "id": 14, "db_id": 2, "visibility_type": null, "field_order": "database", - "display_name": "raw_orders", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Raw Orders", "metrics": [], - "created_at": "2021-07-21T05:47:53.391873Z", + "created_at": "2024-06-19T11:49:38.648208Z", + "estimated_row_count": 99, "points_of_interest": null }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "raw_payments", "fields": [ @@ -1110,27 +1338,33 @@ "semantic_type": "type/PK", "table_id": 11, "coercion_strategy": null, + "database_indexed": null, "name": "id", "fingerprint_version": 5, "has_field_values": "none", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.271155Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 62, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 85, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "id", + "display_name": "ID", "database_position": 0, + "database_required": false, "fingerprint": null, - "created_at": "2021-07-21T05:47:53.511724Z", + "created_at": "2024-06-19T11:49:38.787871Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -1140,25 +1374,31 @@ "semantic_type": null, "table_id": 11, "coercion_strategy": null, + "database_indexed": null, "name": "order_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.247411Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 60, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 87, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 1, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "order_id", + "display_name": "Order ID", "database_position": 1, + "database_required": false, "fingerprint": { "global": { "distinct-count": 99, @@ -1175,7 +1415,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.506967Z", + "created_at": "2024-06-19T11:49:38.787871Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -1185,25 +1425,31 @@ "semantic_type": "type/Category", "table_id": 11, "coercion_strategy": null, + "database_indexed": null, "name": "payment_method", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.217422Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 61, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 88, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 2, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "payment_method", + "display_name": "Payment Method", "database_position": 2, + "database_required": false, "fingerprint": { "global": { "distinct-count": 4, @@ -1219,7 +1465,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.508887Z", + "created_at": "2024-06-19T11:49:38.787871Z", "base_type": "type/Text", "points_of_interest": null }, @@ -1229,25 +1475,31 @@ "semantic_type": "type/Category", "table_id": 11, "coercion_strategy": null, + "database_indexed": null, "name": "amount", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.273607Z", + "updated_at": "2024-06-19T11:49:39.47428Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 63, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 86, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 3, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "amount", + "display_name": "Amount", "database_position": 3, + "database_required": false, "fingerprint": { "global": { "distinct-count": 30, @@ -1264,29 +1516,33 @@ } } }, - "created_at": "2021-07-21T05:47:53.513727Z", + "created_at": "2024-06-19T11:49:38.787871Z", "base_type": "type/Integer", "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.173953Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, "id": 11, "db_id": 2, "visibility_type": null, "field_order": "database", - "display_name": "raw_payments", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Raw Payments", "metrics": [], - "created_at": "2021-07-21T05:47:53.388179Z", + "created_at": "2024-06-19T11:49:38.607177Z", + "estimated_row_count": 113, "points_of_interest": null }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "stg_customers", "fields": [ @@ -1294,27 +1550,33 @@ "description": null, "database_type": "int4", "semantic_type": null, - "table_id": 8, + "table_id": 16, "coercion_strategy": null, + "database_indexed": null, "name": "customer_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.276108Z", + "updated_at": "2024-06-20T05:41:58.068227Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 65, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 108, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "customer_id", + "display_name": "Customer ID", "database_position": 0, + "database_required": false, "fingerprint": { "global": { "distinct-count": 100, @@ -1331,29 +1593,133 @@ } } }, - "created_at": "2021-07-21T05:47:53.528091Z", + "created_at": "2024-06-19T11:49:38.870444Z", "base_type": "type/Integer", "points_of_interest": null + }, + { + "description": null, + "database_type": "text", + "semantic_type": "type/Name", + "table_id": 16, + "coercion_strategy": null, + "database_indexed": null, + "name": "first_name", + "fingerprint_version": 5, + "has_field_values": "list", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:58.069308Z", + "custom_position": 1, + "effective_type": "type/Text", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 107, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 1, + "visibility_type": "normal", + "target": null, + "preview_display": true, + "display_name": "First Name", + "database_position": 1, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 79, + "nil%": 0.0 + }, + "type": { + "type/Text": { + "percent-json": 0.0, + "percent-url": 0.0, + "percent-email": 0.0, + "percent-state": 0.02, + "average-length": 5.86 + } + } + }, + "created_at": "2024-06-19T11:49:38.870444Z", + "base_type": "type/Text", + "points_of_interest": null + }, + { + "description": null, + "database_type": "text", + "semantic_type": "type/Name", + "table_id": 16, + "coercion_strategy": null, + "database_indexed": null, + "name": "last_name", + "fingerprint_version": 5, + "has_field_values": "list", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:58.070264Z", + "custom_position": 2, + "effective_type": "type/Text", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 109, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 2, + "visibility_type": "normal", + "target": null, + "preview_display": true, + "display_name": "Last Name", + "database_position": 2, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 19, + "nil%": 0.0 + }, + "type": { + "type/Text": { + "percent-json": 0.0, + "percent-url": 0.0, + "percent-email": 0.0, + "percent-state": 0.0, + "average-length": 2.0 + } + } + }, + "created_at": "2024-06-19T11:49:38.870444Z", + "base_type": "type/Text", + "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.176617Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 8, + "id": 16, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "stg_customers", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Stg Customers", "metrics": [], - "created_at": "2021-07-21T05:47:53.376525Z", + "created_at": "2024-06-19T11:49:38.669615Z", + "estimated_row_count": null, "points_of_interest": null }, { "description": null, "entity_type": "entity/TransactionTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "stg_orders", "fields": [ @@ -1361,27 +1727,33 @@ "description": null, "database_type": "int4", "semantic_type": null, - "table_id": 5, + "table_id": 15, "coercion_strategy": null, + "database_indexed": null, "name": "order_id", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.225874Z", + "updated_at": "2024-06-20T05:41:58.096268Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 68, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 106, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "order_id", + "display_name": "Order ID", "database_position": 0, + "database_required": false, "fingerprint": { "global": { "distinct-count": 99, @@ -1398,7 +1770,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.545842Z", + "created_at": "2024-06-19T11:49:38.865141Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -1406,27 +1778,33 @@ "description": null, "database_type": "text", "semantic_type": "type/Category", - "table_id": 5, + "table_id": 15, "coercion_strategy": null, + "database_indexed": null, "name": "status", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.27984Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.09722Z", + "custom_position": 1, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 69, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 3, + "id": 103, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 1, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "status", + "display_name": "Status", "database_position": 3, + "database_required": false, "fingerprint": { "global": { "distinct-count": 5, @@ -1442,29 +1820,131 @@ } } }, - "created_at": "2021-07-21T05:47:53.547849Z", + "created_at": "2024-06-19T11:49:38.865141Z", "base_type": "type/Text", "points_of_interest": null + }, + { + "description": null, + "database_type": "date", + "semantic_type": null, + "table_id": 15, + "coercion_strategy": null, + "database_indexed": null, + "name": "order_date", + "fingerprint_version": 5, + "has_field_values": "none", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:58.09817Z", + "custom_position": 2, + "effective_type": "type/Date", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 104, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 2, + "visibility_type": "normal", + "target": null, + "preview_display": true, + "display_name": "Order Date", + "database_position": 2, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 69, + "nil%": 0.0 + }, + "type": { + "type/DateTime": { + "earliest": "2018-01-01", + "latest": "2018-04-09" + } + } + }, + "created_at": "2024-06-19T11:49:38.865141Z", + "base_type": "type/Date", + "points_of_interest": null + }, + { + "description": null, + "database_type": "int4", + "semantic_type": null, + "table_id": 15, + "coercion_strategy": null, + "database_indexed": null, + "name": "customer_id", + "fingerprint_version": 5, + "has_field_values": "list", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:58.099319Z", + "custom_position": 3, + "effective_type": "type/Integer", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 105, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 3, + "visibility_type": "normal", + "target": null, + "preview_display": true, + "display_name": "Customer ID", + "database_position": 1, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 62, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 25.875, + "q3": 69.625, + "max": 99.0, + "sd": 27.781341350472964, + "avg": 48.25252525252525 + } + } + }, + "created_at": "2024-06-19T11:49:38.865141Z", + "base_type": "type/Integer", + "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.179323Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 5, + "id": 15, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "stg_orders", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Stg Orders", "metrics": [], - "created_at": "2021-07-21T05:47:53.363321Z", + "created_at": "2024-06-19T11:49:38.659111Z", + "estimated_row_count": null, "points_of_interest": null }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "show_in_getting_started": false, "name": "stg_payments", "fields": [ @@ -1472,27 +1952,33 @@ "description": null, "database_type": "int4", "semantic_type": null, - "table_id": 10, + "table_id": 9, "coercion_strategy": null, + "database_indexed": null, "name": "payment_id", "fingerprint_version": 5, - "has_field_values": "none", + "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.191434Z", + "updated_at": "2024-06-20T05:41:58.081283Z", "custom_position": 0, "effective_type": "type/Integer", "active": true, + "nfc_path": null, "parent_id": null, - "id": 74, - "last_analyzed": "2021-07-21T05:47:54.560768Z", + "id": 72, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, "position": 0, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "payment_id", + "display_name": "Payment ID", "database_position": 0, + "database_required": false, "fingerprint": { "global": { "distinct-count": 113, @@ -1509,7 +1995,7 @@ } } }, - "created_at": "2021-07-21T05:47:53.570339Z", + "created_at": "2024-06-19T11:49:38.737818Z", "base_type": "type/Integer", "points_of_interest": null }, @@ -1517,27 +2003,33 @@ "description": null, "database_type": "text", "semantic_type": "type/Category", - "table_id": 10, + "table_id": 9, "coercion_strategy": null, + "database_indexed": null, "name": "payment_method", "fingerprint_version": 5, "has_field_values": "list", "settings": null, "caveats": null, "fk_target_field_id": null, - "updated_at": "2021-07-21T07:30:35.236542Z", - "custom_position": 0, + "updated_at": "2024-06-20T05:41:58.082175Z", + "custom_position": 1, "effective_type": "type/Text", "active": true, + "nfc_path": null, "parent_id": null, - "id": 72, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, + "id": 73, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 1, "visibility_type": "normal", "target": null, "preview_display": true, - "display_name": "payment_method", + "display_name": "Payment Method", "database_position": 2, + "database_required": false, "fingerprint": { "global": { "distinct-count": 4, @@ -1553,44 +2045,161 @@ } } }, - "created_at": "2021-07-21T05:47:53.566146Z", + "created_at": "2024-06-19T11:49:38.737818Z", "base_type": "type/Text", "points_of_interest": null + }, + { + "description": null, + "database_type": "int4", + "semantic_type": null, + "table_id": 9, + "coercion_strategy": null, + "database_indexed": null, + "name": "order_id", + "fingerprint_version": 5, + "has_field_values": "list", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:58.083109Z", + "custom_position": 2, + "effective_type": "type/Integer", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 75, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 2, + "visibility_type": "normal", + "target": null, + "preview_display": true, + "display_name": "Order ID", + "database_position": 1, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 99, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 1.0, + "q1": 24.904857366030992, + "q3": 75.25, + "max": 99.0, + "sd": 28.540193317267853, + "avg": 50.0353982300885 + } + } + }, + "created_at": "2024-06-19T11:49:38.737818Z", + "base_type": "type/Integer", + "points_of_interest": null + }, + { + "description": null, + "database_type": "int4", + "semantic_type": "type/Category", + "table_id": 9, + "coercion_strategy": null, + "database_indexed": null, + "name": "amount", + "fingerprint_version": 5, + "has_field_values": "list", + "settings": null, + "caveats": null, + "fk_target_field_id": null, + "updated_at": "2024-06-20T05:41:58.084131Z", + "custom_position": 3, + "effective_type": "type/Integer", + "active": true, + "nfc_path": null, + "parent_id": null, + "id": 74, + "last_analyzed": "2024-06-19T11:49:39.47428Z", + "database_partitioned": null, + "database_is_auto_increment": false, + "json_unfolding": false, + "position": 3, + "visibility_type": "normal", + "target": null, + "preview_display": true, + "display_name": "Amount", + "database_position": 3, + "database_required": false, + "fingerprint": { + "global": { + "distinct-count": 30, + "nil%": 0.0 + }, + "type": { + "type/Number": { + "min": 0.0, + "q1": 6.064037815689349, + "q3": 22.787918451395115, + "max": 30.0, + "sd": 9.198368733518729, + "avg": 14.79646017699115 + } + } + }, + "created_at": "2024-06-19T11:49:38.737818Z", + "base_type": "type/Integer", + "points_of_interest": null } ], "caveats": null, "segments": [], - "updated_at": "2021-07-21T07:30:35.181929Z", - "entity_name": null, + "updated_at": "2024-06-20T06:03:34.567961Z", "active": true, - "id": 10, + "id": 9, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "stg_payments", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Stg Payments", "metrics": [], - "created_at": "2021-07-21T05:47:53.384404Z", + "created_at": "2024-06-19T11:49:38.586822Z", + "estimated_row_count": null, "points_of_interest": null } ], + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null -} +} \ No newline at end of file diff --git a/tests/fixtures/api/field/37.json b/tests/fixtures/api/field/37.json deleted file mode 100644 index 2aa1dea9..00000000 --- a/tests/fixtures/api/field/37.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Name", - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "first_name", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.242305Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 37, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 1, - "visibility_type": "normal", - "preview_display": true, - "display_name": "first_name", - "database_position": 1, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 79, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.02, - "average-length": 5.86 - } - } - }, - "created_at": "2021-07-21T05:47:53.404944Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/38.json b/tests/fixtures/api/field/38.json deleted file mode 100644 index ba3d530d..00000000 --- a/tests/fixtures/api/field/38.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "customer_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.194597Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 38, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "customer_id", - "database_position": 0, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 100, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.5, - "q3": 75.5, - "max": 100.0, - "sd": 29.008358252146028, - "avg": 50.5 - } - } - }, - "created_at": "2021-07-21T05:47:53.408064Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/39.json b/tests/fixtures/api/field/39.json deleted file mode 100644 index 2dfd6ea9..00000000 --- a/tests/fixtures/api/field/39.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "description": null, - "database_type": "date", - "semantic_type": null, - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "first_order", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.232032Z", - "custom_position": 0, - "effective_type": "type/Date", - "active": true, - "parent_id": null, - "id": 39, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 3, - "visibility_type": "normal", - "preview_display": true, - "display_name": "first_order", - "database_position": 3, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 47, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-07" - } - } - }, - "created_at": "2021-07-21T05:47:53.410556Z", - "base_type": "type/Date", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/40.json b/tests/fixtures/api/field/40.json deleted file mode 100644 index 43142685..00000000 --- a/tests/fixtures/api/field/40.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": "type/Quantity", - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "number_of_orders", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.197576Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 40, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 5, - "visibility_type": "normal", - "preview_display": true, - "display_name": "number_of_orders", - "database_position": 5, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 1.0, - "q3": 2.0901356485315583, - "max": 5.0, - "sd": 0.7779687173818424, - "avg": 1.596774193548387 - } - } - }, - "created_at": "2021-07-21T05:47:53.412376Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/41.json b/tests/fixtures/api/field/41.json deleted file mode 100644 index b602c7ad..00000000 --- a/tests/fixtures/api/field/41.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": null, - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "customer_lifetime_value", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.288463Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 41, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 6, - "visibility_type": "normal", - "preview_display": true, - "display_name": "customer_lifetime_value", - "database_position": 6, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 36, - "nil%": 0.38 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 13.464101615137753, - "q3": 35.46410161513776, - "max": 99.0, - "sd": 18.812245525263663, - "avg": 26.967741935483872 - } - } - }, - "created_at": "2021-07-21T05:47:53.414671Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/42.json b/tests/fixtures/api/field/42.json deleted file mode 100644 index 22b3a5a1..00000000 --- a/tests/fixtures/api/field/42.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "description": null, - "database_type": "date", - "semantic_type": null, - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "most_recent_order", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.186143Z", - "custom_position": 0, - "effective_type": "type/Date", - "active": true, - "parent_id": null, - "id": 42, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 4, - "visibility_type": "normal", - "preview_display": true, - "display_name": "most_recent_order", - "database_position": 4, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 53, - "nil%": 0.38 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-09", - "latest": "2018-04-09" - } - } - }, - "created_at": "2021-07-21T05:47:53.417127Z", - "base_type": "type/Date", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/43.json b/tests/fixtures/api/field/43.json deleted file mode 100644 index 2e643af8..00000000 --- a/tests/fixtures/api/field/43.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Name", - "table_id": 7, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null - }, - "name": "last_name", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.249828Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 43, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, - "visibility_type": "normal", - "preview_display": true, - "display_name": "last_name", - "database_position": 2, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 2.0 - } - } - }, - "created_at": "2021-07-21T05:47:53.419931Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/44.json b/tests/fixtures/api/field/44.json deleted file mode 100644 index 130e5eda..00000000 --- a/tests/fixtures/api/field/44.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": "type/Category", - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "credit_card_amount", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.24496Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 44, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 4, - "visibility_type": "normal", - "preview_display": true, - "display_name": "credit_card_amount", - "database_position": 4, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 25, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 18.797054997187544, - "max": 30.0, - "sd": 10.959088854927673, - "avg": 8.797979797979798 - } - } - }, - "created_at": "2021-07-21T05:47:53.43752Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/45.json b/tests/fixtures/api/field/45.json deleted file mode 100644 index fcbf0092..00000000 --- a/tests/fixtures/api/field/45.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": "type/Category", - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "bank_transfer_amount", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.25288Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 45, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 6, - "visibility_type": "normal", - "preview_display": true, - "display_name": "bank_transfer_amount", - "database_position": 6, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 4.75, - "max": 26.0, - "sd": 7.420825132023675, - "avg": 4.151515151515151 - } - } - }, - "created_at": "2021-07-21T05:47:53.43953Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/46.json b/tests/fixtures/api/field/46.json deleted file mode 100644 index 4ff41998..00000000 --- a/tests/fixtures/api/field/46.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "description": null, - "database_type": "date", - "semantic_type": null, - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "order_date", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.188819Z", - "custom_position": 0, - "effective_type": "type/Date", - "active": true, - "parent_id": null, - "id": 46, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, - "visibility_type": "normal", - "preview_display": true, - "display_name": "order_date", - "database_position": 2, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 69, - "nil%": 0.0 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-09" - } - } - }, - "created_at": "2021-07-21T05:47:53.441254Z", - "base_type": "type/Date", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/47.json b/tests/fixtures/api/field/47.json deleted file mode 100644 index aa31ae05..00000000 --- a/tests/fixtures/api/field/47.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "order_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.255223Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 47, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "order_id", - "database_position": 0, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 99, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.25, - "q3": 74.75, - "max": 99.0, - "sd": 28.719704534890823, - "avg": 50.0 - } - } - }, - "created_at": "2021-07-21T05:47:53.444318Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/48.json b/tests/fixtures/api/field/48.json deleted file mode 100644 index e4de2b55..00000000 --- a/tests/fixtures/api/field/48.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": "type/Category", - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "gift_card_amount", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.201036Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 48, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 7, - "visibility_type": "normal", - "preview_display": true, - "display_name": "gift_card_amount", - "database_position": 7, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 11, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 1.3692088763283736, - "max": 30.0, - "sd": 6.392362351566517, - "avg": 2.0707070707070705 - } - } - }, - "created_at": "2021-07-21T05:47:53.447026Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/49.json b/tests/fixtures/api/field/49.json deleted file mode 100644 index 703394d6..00000000 --- a/tests/fixtures/api/field/49.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": "type/Category", - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "coupon_amount", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.25752Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 49, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 5, - "visibility_type": "normal", - "preview_display": true, - "display_name": "coupon_amount", - "database_position": 5, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 12, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 0.0, - "q3": 0.4747603274810728, - "max": 26.0, - "sd": 5.955012405351229, - "avg": 1.8686868686868687 - } - } - }, - "created_at": "2021-07-21T05:47:53.448941Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/50.json b/tests/fixtures/api/field/50.json deleted file mode 100644 index 7c383f83..00000000 --- a/tests/fixtures/api/field/50.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Category", - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "status", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.203655Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 50, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 3, - "visibility_type": "normal", - "preview_display": true, - "display_name": "status", - "database_position": 3, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 8.404040404040405 - } - } - }, - "created_at": "2021-07-21T05:47:53.450839Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/51.json b/tests/fixtures/api/field/51.json deleted file mode 100644 index 23682fa2..00000000 --- a/tests/fixtures/api/field/51.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "customer_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.259928Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 51, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 1, - "visibility_type": "normal", - "preview_display": true, - "display_name": "customer_id", - "database_position": 1, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 62, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.875, - "q3": 69.625, - "max": 99.0, - "sd": 27.781341350472964, - "avg": 48.25252525252525 - } - } - }, - "created_at": "2021-07-21T05:47:53.452739Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/52.json b/tests/fixtures/api/field/52.json deleted file mode 100644 index be94486d..00000000 --- a/tests/fixtures/api/field/52.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int8", - "semantic_type": null, - "table_id": 6, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null - }, - "name": "amount", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.206083Z", - "custom_position": 0, - "effective_type": "type/BigInteger", - "active": true, - "parent_id": null, - "id": 52, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 8, - "visibility_type": "normal", - "preview_display": true, - "display_name": "amount", - "database_position": 8, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 32, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 8.202945002812456, - "q3": 24.26138721247417, - "max": 58.0, - "sd": 10.736062525374601, - "avg": 16.88888888888889 - } - } - }, - "created_at": "2021-07-21T05:47:53.455652Z", - "base_type": "type/BigInteger", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/53.json b/tests/fixtures/api/field/53.json deleted file mode 100644 index 0f077f91..00000000 --- a/tests/fixtures/api/field/53.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Name", - "table_id": 9, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.166218Z", - "entity_name": null, - "active": true, - "id": 9, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_customers", - "created_at": "2021-07-21T05:47:53.380782Z", - "points_of_interest": null - }, - "name": "first_name", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.208554Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 53, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 1, - "visibility_type": "normal", - "preview_display": true, - "display_name": "first_name", - "database_position": 1, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 79, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.02, - "average-length": 5.86 - } - } - }, - "created_at": "2021-07-21T05:47:53.469932Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/54.json b/tests/fixtures/api/field/54.json deleted file mode 100644 index 5d3ae3b1..00000000 --- a/tests/fixtures/api/field/54.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Name", - "table_id": 9, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.166218Z", - "entity_name": null, - "active": true, - "id": 9, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_customers", - "created_at": "2021-07-21T05:47:53.380782Z", - "points_of_interest": null - }, - "name": "last_name", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.262668Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 54, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, - "visibility_type": "normal", - "preview_display": true, - "display_name": "last_name", - "database_position": 2, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 19, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 2.0 - } - } - }, - "created_at": "2021-07-21T05:47:53.471892Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/55.json b/tests/fixtures/api/field/55.json deleted file mode 100644 index a7703e04..00000000 --- a/tests/fixtures/api/field/55.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": "type/PK", - "table_id": 9, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.166218Z", - "entity_name": null, - "active": true, - "id": 9, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_customers", - "created_at": "2021-07-21T05:47:53.380782Z", - "points_of_interest": null - }, - "name": "id", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.234376Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 55, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "id", - "database_position": 0, - "name_field": { - "id": 54, - "table_id": 9, - "display_name": "last_name", - "base_type": "type/Text", - "semantic_type": "type/Name", - "has_field_values": "list" - }, - "fingerprint": null, - "created_at": "2021-07-21T05:47:53.473642Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/56.json b/tests/fixtures/api/field/56.json deleted file mode 100644 index fba8f2a8..00000000 --- a/tests/fixtures/api/field/56.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "description": null, - "database_type": "date", - "semantic_type": null, - "table_id": 12, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.170459Z", - "entity_name": null, - "active": true, - "id": 12, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_orders", - "created_at": "2021-07-21T05:47:53.391873Z", - "points_of_interest": null - }, - "name": "order_date", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.268564Z", - "custom_position": 0, - "effective_type": "type/Date", - "active": true, - "parent_id": null, - "id": 56, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, - "visibility_type": "normal", - "preview_display": true, - "display_name": "order_date", - "database_position": 2, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 69, - "nil%": 0.0 - }, - "type": { - "type/DateTime": { - "earliest": "2018-01-01", - "latest": "2018-04-09" - } - } - }, - "created_at": "2021-07-21T05:47:53.48571Z", - "base_type": "type/Date", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/57.json b/tests/fixtures/api/field/57.json deleted file mode 100644 index 81c19cc5..00000000 --- a/tests/fixtures/api/field/57.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": "type/PK", - "table_id": 12, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.170459Z", - "entity_name": null, - "active": true, - "id": 12, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_orders", - "created_at": "2021-07-21T05:47:53.391873Z", - "points_of_interest": null - }, - "name": "id", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.266036Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 57, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "id", - "database_position": 0, - "name_field": null, - "fingerprint": null, - "created_at": "2021-07-21T05:47:53.48931Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/58.json b/tests/fixtures/api/field/58.json deleted file mode 100644 index 647c3a66..00000000 --- a/tests/fixtures/api/field/58.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Category", - "table_id": 12, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.170459Z", - "entity_name": null, - "active": true, - "id": 12, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_orders", - "created_at": "2021-07-21T05:47:53.391873Z", - "points_of_interest": null - }, - "name": "status", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.211374Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 58, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 3, - "visibility_type": "normal", - "preview_display": true, - "display_name": "status", - "database_position": 3, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 8.404040404040405 - } - } - }, - "created_at": "2021-07-21T05:47:53.491699Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/59.json b/tests/fixtures/api/field/59.json deleted file mode 100644 index 207ef6ea..00000000 --- a/tests/fixtures/api/field/59.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 12, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.170459Z", - "entity_name": null, - "active": true, - "id": 12, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_orders", - "created_at": "2021-07-21T05:47:53.391873Z", - "points_of_interest": null - }, - "name": "user_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.214697Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 59, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 1, - "visibility_type": "normal", - "preview_display": true, - "display_name": "user_id", - "database_position": 1, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 62, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.875, - "q3": 69.625, - "max": 99.0, - "sd": 27.781341350472964, - "avg": 48.25252525252525 - } - } - }, - "created_at": "2021-07-21T05:47:53.494231Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/60.json b/tests/fixtures/api/field/60.json deleted file mode 100644 index 99c5b1f1..00000000 --- a/tests/fixtures/api/field/60.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 11, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.173953Z", - "entity_name": null, - "active": true, - "id": 11, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_payments", - "created_at": "2021-07-21T05:47:53.388179Z", - "points_of_interest": null - }, - "name": "order_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.247411Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 60, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 1, - "visibility_type": "normal", - "preview_display": true, - "display_name": "order_id", - "database_position": 1, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 99, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 24.904857366030992, - "q3": 75.25, - "max": 99.0, - "sd": 28.540193317267853, - "avg": 50.0353982300885 - } - } - }, - "created_at": "2021-07-21T05:47:53.506967Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/61.json b/tests/fixtures/api/field/61.json deleted file mode 100644 index 7e1a37d8..00000000 --- a/tests/fixtures/api/field/61.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Category", - "table_id": 11, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.173953Z", - "entity_name": null, - "active": true, - "id": 11, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_payments", - "created_at": "2021-07-21T05:47:53.388179Z", - "points_of_interest": null - }, - "name": "payment_method", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.217422Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 61, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, - "visibility_type": "normal", - "preview_display": true, - "display_name": "payment_method", - "database_position": 2, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 4, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 10.79646017699115 - } - } - }, - "created_at": "2021-07-21T05:47:53.508887Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/62.json b/tests/fixtures/api/field/62.json deleted file mode 100644 index 0cd0029b..00000000 --- a/tests/fixtures/api/field/62.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": "type/PK", - "table_id": 11, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.173953Z", - "entity_name": null, - "active": true, - "id": 11, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_payments", - "created_at": "2021-07-21T05:47:53.388179Z", - "points_of_interest": null - }, - "name": "id", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.271155Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 62, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "id", - "database_position": 0, - "name_field": null, - "fingerprint": null, - "created_at": "2021-07-21T05:47:53.511724Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/63.json b/tests/fixtures/api/field/63.json deleted file mode 100644 index be19ef3c..00000000 --- a/tests/fixtures/api/field/63.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": "type/Category", - "table_id": 11, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.173953Z", - "entity_name": null, - "active": true, - "id": 11, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_payments", - "created_at": "2021-07-21T05:47:53.388179Z", - "points_of_interest": null - }, - "name": "amount", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.273607Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 63, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 3, - "visibility_type": "normal", - "preview_display": true, - "display_name": "amount", - "database_position": 3, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 30, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 0.0, - "q1": 606.4037815689348, - "q3": 2278.791845139511, - "max": 3000.0, - "sd": 919.836873351873, - "avg": 1479.646017699115 - } - } - }, - "created_at": "2021-07-21T05:47:53.513727Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/65.json b/tests/fixtures/api/field/65.json deleted file mode 100644 index 4111128c..00000000 --- a/tests/fixtures/api/field/65.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 8, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.176617Z", - "entity_name": null, - "active": true, - "id": 8, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_customers", - "created_at": "2021-07-21T05:47:53.376525Z", - "points_of_interest": null - }, - "name": "customer_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.276108Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 65, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "customer_id", - "database_position": 0, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 100, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.5, - "q3": 75.5, - "max": 100.0, - "sd": 29.008358252146028, - "avg": 50.5 - } - } - }, - "created_at": "2021-07-21T05:47:53.528091Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/68.json b/tests/fixtures/api/field/68.json deleted file mode 100644 index b936f0ba..00000000 --- a/tests/fixtures/api/field/68.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 5, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.179323Z", - "entity_name": null, - "active": true, - "id": 5, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_orders", - "created_at": "2021-07-21T05:47:53.363321Z", - "points_of_interest": null - }, - "name": "order_id", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.225874Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 68, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "order_id", - "database_position": 0, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 99, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 25.25, - "q3": 74.75, - "max": 99.0, - "sd": 28.719704534890823, - "avg": 50.0 - } - } - }, - "created_at": "2021-07-21T05:47:53.545842Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/69.json b/tests/fixtures/api/field/69.json deleted file mode 100644 index 0aad7741..00000000 --- a/tests/fixtures/api/field/69.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Category", - "table_id": 5, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.179323Z", - "entity_name": null, - "active": true, - "id": 5, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_orders", - "created_at": "2021-07-21T05:47:53.363321Z", - "points_of_interest": null - }, - "name": "status", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.27984Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 69, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 3, - "visibility_type": "normal", - "preview_display": true, - "display_name": "status", - "database_position": 3, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 5, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 8.404040404040405 - } - } - }, - "created_at": "2021-07-21T05:47:53.547849Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/72.json b/tests/fixtures/api/field/72.json deleted file mode 100644 index 3a051059..00000000 --- a/tests/fixtures/api/field/72.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": null, - "database_type": "text", - "semantic_type": "type/Category", - "table_id": 10, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.181929Z", - "entity_name": null, - "active": true, - "id": 10, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_payments", - "created_at": "2021-07-21T05:47:53.384404Z", - "points_of_interest": null - }, - "name": "payment_method", - "fingerprint_version": 5, - "has_field_values": "list", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.236542Z", - "custom_position": 0, - "effective_type": "type/Text", - "active": true, - "parent_id": null, - "id": 72, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 2, - "visibility_type": "normal", - "preview_display": true, - "display_name": "payment_method", - "database_position": 2, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 4, - "nil%": 0.0 - }, - "type": { - "type/Text": { - "percent-json": 0.0, - "percent-url": 0.0, - "percent-email": 0.0, - "percent-state": 0.0, - "average-length": 10.79646017699115 - } - } - }, - "created_at": "2021-07-21T05:47:53.566146Z", - "base_type": "type/Text", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/field/74.json b/tests/fixtures/api/field/74.json deleted file mode 100644 index 9d212e89..00000000 --- a/tests/fixtures/api/field/74.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "description": null, - "database_type": "int4", - "semantic_type": null, - "table_id": 10, - "coercion_strategy": null, - "table": { - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.181929Z", - "entity_name": null, - "active": true, - "id": 10, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_payments", - "created_at": "2021-07-21T05:47:53.384404Z", - "points_of_interest": null - }, - "name": "payment_id", - "fingerprint_version": 5, - "has_field_values": "none", - "settings": null, - "caveats": null, - "fk_target_field_id": null, - "dimensions": [], - "updated_at": "2021-07-21T07:30:35.191434Z", - "custom_position": 0, - "effective_type": "type/Integer", - "active": true, - "parent_id": null, - "id": 74, - "last_analyzed": "2021-07-21T05:47:54.560768Z", - "position": 0, - "visibility_type": "normal", - "preview_display": true, - "display_name": "payment_id", - "database_position": 0, - "name_field": null, - "fingerprint": { - "global": { - "distinct-count": 113, - "nil%": 0.0 - }, - "type": { - "type/Number": { - "min": 1.0, - "q1": 28.75, - "q3": 85.25, - "max": 113.0, - "sd": 32.76097144469315, - "avg": 57.0 - } - } - }, - "created_at": "2021-07-21T05:47:53.570339Z", - "base_type": "type/Integer", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/metric.json b/tests/fixtures/api/metric.json deleted file mode 100644 index 0637a088..00000000 --- a/tests/fixtures/api/metric.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/fixtures/api/table.json b/tests/fixtures/api/table.json index 0f0a7219..430cfd92 100644 --- a/tests/fixtures/api/table.json +++ b/tests/fixtures/api/table.json @@ -1,530 +1,850 @@ [ { - "description": null, + "description": "This table has basic information about a customer, as well as some derived facts based on a customer's orders", "entity_type": "entity/GenericTable", + "view_count": 2, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, - "name": "CUSTOMERS", + "name": "customers", "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 7, + "id": 12, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "clients", + "created_at": "2024-06-19T11:49:38.617718Z", + "estimated_row_count": 100, "points_of_interest": null }, { - "description": null, + "description": "This table has basic information about orders, as well as some derived facts based on payments", "entity_type": "entity/TransactionTable", + "view_count": 1, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "entity_name": null, + "caveats": "Some facts are derived from payments", + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 6, + "id": 10, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Orders", + "created_at": "2024-06-19T11:49:38.600376Z", + "estimated_row_count": 99, + "points_of_interest": "Basic information only" }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "raw_customers", "caveats": null, - "updated_at": "2021-07-21T07:30:35.166218Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 9, + "id": 13, "db_id": 2, "visibility_type": null, "field_order": "database", - "display_name": "raw_customers", - "created_at": "2021-07-21T05:47:53.380782Z", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Raw Customers", + "created_at": "2024-06-19T11:49:38.633775Z", + "estimated_row_count": 100, "points_of_interest": null }, { "description": null, "entity_type": "entity/TransactionTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "raw_orders", "caveats": null, - "updated_at": "2021-07-21T07:30:35.170459Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 12, + "id": 14, "db_id": 2, "visibility_type": null, "field_order": "database", - "display_name": "raw_orders", - "created_at": "2021-07-21T05:47:53.391873Z", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Raw Orders", + "created_at": "2024-06-19T11:49:38.648208Z", + "estimated_row_count": 99, "points_of_interest": null }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "raw_payments", "caveats": null, - "updated_at": "2021-07-21T07:30:35.173953Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, "id": 11, "db_id": 2, "visibility_type": null, "field_order": "database", - "display_name": "raw_payments", - "created_at": "2021-07-21T05:47:53.388179Z", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Raw Payments", + "created_at": "2024-06-19T11:49:38.607177Z", + "estimated_row_count": 113, "points_of_interest": null }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "stg_customers", "caveats": null, - "updated_at": "2021-07-21T07:30:35.176617Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 8, + "id": 16, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "stg_customers", - "created_at": "2021-07-21T05:47:53.376525Z", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Stg Customers", + "created_at": "2024-06-19T11:49:38.669615Z", + "estimated_row_count": null, "points_of_interest": null }, { "description": null, "entity_type": "entity/TransactionTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "stg_orders", "caveats": null, - "updated_at": "2021-07-21T07:30:35.179323Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 5, + "id": 15, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "stg_orders", - "created_at": "2021-07-21T05:47:53.363321Z", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Stg Orders", + "created_at": "2024-06-19T11:49:38.659111Z", + "estimated_row_count": null, "points_of_interest": null }, { "description": null, "entity_type": "entity/GenericTable", + "view_count": 0, "schema": "public", + "database_require_filter": null, "db": { + "uploads_schema_name": null, "description": null, "features": [ + "index-info", "full-join", + "window-functions/cumulative", "basic-aggregations", + "temporal-extract", + "actions/custom", + "window-functions/offset", + "now", + "convert-timezone", + "nested-field-columns", "standard-deviation-aggregations", + "test/jvm-timezone-setting", + "date-arithmetics", + "persist-models", + "actions", "expression-aggregations", "percentile-aggregations", + "connection-impersonation", "foreign-keys", + "table-privileges", "right-join", "left-join", "native-parameters", + "schemas", "nested-queries", "expressions", + "uploads", "set-timezone", "regex", "case-sensitivity-string-filter-options", "binning", + "metadata/key-constraints", + "datetime-diff", + "upload-with-auto-pk", "inner-join", - "advanced-math-expressions" + "advanced-math-expressions", + "fingerprint" ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", + "uploads_table_prefix": null, + "cache_field_values_schedule": "0 0 5 * * ? *", + "timezone": "Etc/UTC", "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", + "metadata_sync_schedule": "0 11 * * * ? *", + "name": "dbtmetabase", + "settings": null, "caveats": null, + "creator_id": 1, "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", + "updated_at": "2024-06-20T05:33:42.131951Z", + "cache_ttl": null, "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", "ssl": false, - "additional-options": null, - "tunnel-enabled": false + "password": "**MetabasePass**", + "port": 5432, + "advanced-options": false, + "schema-filters-type": "all", + "dbname": "dbtmetabase", + "host": "postgres", + "tunnel-enabled": false, + "user": "dbtmetabase" }, "is_sample": false, "id": 2, "is_on_demand": false, - "options": null, "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", + "initial_sync_status": "complete", + "is_audit": false, + "dbms_version": { + "flavor": "PostgreSQL", + "version": "16.1 (Debian 16.1-1.pgdg120+1)", + "semantic-version": [ + 16, + 1 + ] + }, + "uploads_enabled": false, + "refingerprint": false, + "created_at": "2024-06-19T11:49:38.313316Z", "points_of_interest": null }, "show_in_getting_started": false, "name": "stg_payments", "caveats": null, - "updated_at": "2021-07-21T07:30:35.181929Z", - "entity_name": null, + "updated_at": "2024-06-20T06:02:33.283724Z", "active": true, - "id": 10, + "id": 9, "db_id": 2, "visibility_type": null, - "field_order": "database", - "display_name": "stg_payments", - "created_at": "2021-07-21T05:47:53.384404Z", + "field_order": "custom", + "is_upload": false, + "initial_sync_status": "complete", + "display_name": "Stg Payments", + "created_at": "2024-06-19T11:49:38.586822Z", + "estimated_row_count": null, "points_of_interest": null } ] \ No newline at end of file diff --git a/tests/fixtures/api/table/10.json b/tests/fixtures/api/table/10.json deleted file mode 100644 index e9b877d7..00000000 --- a/tests/fixtures/api/table/10.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.181929Z", - "pk_field": null, - "entity_name": null, - "active": true, - "id": 10, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_payments", - "created_at": "2021-07-21T05:47:53.384404Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/11.json b/tests/fixtures/api/table/11.json deleted file mode 100644 index c05ca64d..00000000 --- a/tests/fixtures/api/table/11.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_payments", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.173953Z", - "pk_field": 62, - "entity_name": null, - "active": true, - "id": 11, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_payments", - "created_at": "2021-07-21T05:47:53.388179Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/12.json b/tests/fixtures/api/table/12.json deleted file mode 100644 index dcb53439..00000000 --- a/tests/fixtures/api/table/12.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.170459Z", - "pk_field": 57, - "entity_name": null, - "active": true, - "id": 12, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_orders", - "created_at": "2021-07-21T05:47:53.391873Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/5.json b/tests/fixtures/api/table/5.json deleted file mode 100644 index f4b9d2a0..00000000 --- a/tests/fixtures/api/table/5.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.179323Z", - "pk_field": null, - "entity_name": null, - "active": true, - "id": 5, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_orders", - "created_at": "2021-07-21T05:47:53.363321Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/6.json b/tests/fixtures/api/table/6.json deleted file mode 100644 index fb10e645..00000000 --- a/tests/fixtures/api/table/6.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/TransactionTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "orders", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.162732Z", - "pk_field": null, - "entity_name": null, - "active": true, - "id": 6, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "orders", - "created_at": "2021-07-21T05:47:53.368244Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/7.json b/tests/fixtures/api/table/7.json deleted file mode 100644 index 3c0e9455..00000000 --- a/tests/fixtures/api/table/7.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.159586Z", - "pk_field": null, - "entity_name": null, - "active": true, - "id": 7, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "customers", - "created_at": "2021-07-21T05:47:53.372467Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/8.json b/tests/fixtures/api/table/8.json deleted file mode 100644 index 41981606..00000000 --- a/tests/fixtures/api/table/8.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "stg_customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.176617Z", - "pk_field": null, - "entity_name": null, - "active": true, - "id": 8, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "stg_customers", - "created_at": "2021-07-21T05:47:53.376525Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/table/9.json b/tests/fixtures/api/table/9.json deleted file mode 100644 index 77dddbc8..00000000 --- a/tests/fixtures/api/table/9.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": null, - "entity_type": "entity/GenericTable", - "schema": "public", - "db": { - "description": null, - "features": [ - "full-join", - "basic-aggregations", - "standard-deviation-aggregations", - "expression-aggregations", - "percentile-aggregations", - "foreign-keys", - "right-join", - "left-join", - "native-parameters", - "nested-queries", - "expressions", - "set-timezone", - "regex", - "case-sensitivity-string-filter-options", - "binning", - "inner-join", - "advanced-math-expressions" - ], - "cache_field_values_schedule": "0 0 22 * * ? *", - "timezone": "UTC", - "auto_run_queries": true, - "metadata_sync_schedule": "0 46 * * * ? *", - "name": "unit_testing", - "caveats": null, - "is_full_sync": true, - "updated_at": "2021-07-21T07:05:13.699978Z", - "details": { - "host": "postgres", - "port": null, - "dbname": "test", - "user": "postgres", - "password": "**MetabasePass**", - "ssl": false, - "additional-options": null, - "tunnel-enabled": false - }, - "is_sample": false, - "id": 2, - "is_on_demand": false, - "options": null, - "engine": "postgres", - "refingerprint": null, - "created_at": "2021-07-21T05:38:53.637091Z", - "points_of_interest": null - }, - "show_in_getting_started": false, - "name": "raw_customers", - "caveats": null, - "updated_at": "2021-07-21T07:30:35.166218Z", - "pk_field": 55, - "entity_name": null, - "active": true, - "id": 9, - "db_id": 2, - "visibility_type": null, - "field_order": "database", - "display_name": "raw_customers", - "created_at": "2021-07-21T05:47:53.380782Z", - "points_of_interest": null -} \ No newline at end of file diff --git a/tests/fixtures/api/user.json b/tests/fixtures/api/user.json deleted file mode 100644 index 5f6cb950..00000000 --- a/tests/fixtures/api/user.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "email": "user@example.com", - "ldap_auth": false, - "first_name": "dbtmetabase", - "locale": null, - "last_login": "2021-07-21T19:25:28.6083Z", - "is_active": true, - "is_qbnewb": false, - "updated_at": "2021-07-21T19:25:28.6083", - "group_ids": [ - 1, - 2 - ], - "is_superuser": true, - "login_attributes": null, - "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "personal_collection_id": 1, - "common_name": "dbtmetabase", - "google_auth": false - } -] \ No newline at end of file diff --git a/tests/fixtures/api/user/1.json b/tests/fixtures/api/user/1.json index 907c5be0..f49fde95 100644 --- a/tests/fixtures/api/user/1.json +++ b/tests/fixtures/api/user/1.json @@ -1,21 +1,24 @@ { - "email": "user@example.com", - "ldap_auth": false, + "email": "dbtmetabase@example.com", "first_name": "dbtmetabase", "locale": null, - "last_login": "2021-07-21T19:25:28.6083Z", + "last_login": "2024-06-20T06:03:33.519227Z", "is_active": true, - "is_qbnewb": false, - "updated_at": "2021-07-21T19:25:28.6083", - "group_ids": [ - 1, - 2 + "user_group_memberships": [ + { + "id": 1 + }, + { + "id": 2 + } ], + "is_qbnewb": false, + "updated_at": "2024-06-20T06:03:33.519227Z", "is_superuser": true, "login_attributes": null, "id": 1, - "last_name": "", - "date_joined": "2021-07-21T05:38:53.637091Z", - "common_name": "dbtmetabase", - "google_auth": false + "last_name": null, + "date_joined": "2024-06-19T11:49:37.507897Z", + "sso_source": null, + "common_name": "dbtmetabase" } \ No newline at end of file diff --git a/tests/fixtures/exposure/collection/a_look_at_your_customers_table.yml b/tests/fixtures/exposure/collection/a_look_at_your_customers_table.yml deleted file mode 100644 index 4cb66bf0..00000000 --- a/tests/fixtures/exposure/collection/a_look_at_your_customers_table.yml +++ /dev/null @@ -1,370 +0,0 @@ -version: 2 -exposures: - - name: a_look_at_your_customers_table - label: A look at your customers table - description: '### Dashboard Cards: 18 - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __1__ - - - Created On: __2021-07-21T08:01:37.328519Z__' - type: dashboard - url: http://localhost:3000/dashboard/1 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customer_lifetime_value_over_time - label: Customer_lifetime_value over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __11__ - - - Created On: __2021-07-21T08:01:38.52841Z__' - type: analysis - url: http://localhost:3000/card/11 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customer_lifetime_value_over_time_1 - label: Customer_lifetime_value over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __9__ - - - Created On: __2021-07-21T08:01:38.189846Z__' - type: analysis - url: http://localhost:3000/card/9 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_added_in_the_last_30_days - label: Customers added in the last 30 days - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __4__ - - - Created On: __2021-07-21T08:01:37.535187Z__' - type: analysis - url: http://localhost:3000/card/4 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_added_in_the_last_30_days_1 - label: Customers added in the last 30 days - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __5__ - - - Created On: __2021-07-21T08:01:37.630969Z__' - type: analysis - url: http://localhost:3000/card/5 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_by_customer_lifetime_value - label: Customers by customer_lifetime_value - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __7__ - - - Created On: __2021-07-21T08:01:37.858387Z__' - type: analysis - url: http://localhost:3000/card/7 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_by_number_of_orders - label: Customers by number_of_orders - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __6__ - - - Created On: __2021-07-21T08:01:37.754606Z__' - type: analysis - url: http://localhost:3000/card/6 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: number_of_orders_over_time - label: Number_of_orders over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __8__ - - - Created On: __2021-07-21T08:01:38.016244Z__' - type: analysis - url: http://localhost:3000/card/8 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: number_of_orders_over_time_1 - label: Number_of_orders over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __10__ - - - Created On: __2021-07-21T08:01:38.347535Z__' - type: analysis - url: http://localhost:3000/card/10 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_day_of_the_week - label: Timestamp by day of the week - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __12__ - - - Created On: __2021-07-21T08:01:38.662485Z__' - type: analysis - url: http://localhost:3000/card/12 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_day_of_the_week_1 - label: Timestamp by day of the week - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __13__ - - - Created On: __2021-07-21T08:01:38.808186Z__' - type: analysis - url: http://localhost:3000/card/13 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_month_of_the_year - label: Timestamp by month of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __15__ - - - Created On: __2021-07-21T08:01:39.084258Z__' - type: analysis - url: http://localhost:3000/card/15 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_month_of_the_year_1 - label: Timestamp by month of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __14__ - - - Created On: __2021-07-21T08:01:38.938688Z__' - type: analysis - url: http://localhost:3000/card/14 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_quarter_of_the_year - label: Timestamp by quarter of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __17__ - - - Created On: __2021-07-21T08:01:39.371067Z__' - type: analysis - url: http://localhost:3000/card/17 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_quarter_of_the_year_1 - label: Timestamp by quarter of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __16__ - - - Created On: __2021-07-21T08:01:39.228965Z__' - type: analysis - url: http://localhost:3000/card/16 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: total_customers - label: Total customers - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __3__ - - - Created On: __2021-07-21T08:01:37.434243Z__' - type: analysis - url: http://localhost:3000/card/3 - maturity: medium - owner: - name: '' - email: '' - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/collection/our_analytics.yml b/tests/fixtures/exposure/collection/our_analytics.yml index cc17be76..f312f851 100644 --- a/tests/fixtures/exposure/collection/our_analytics.yml +++ b/tests/fixtures/exposure/collection/our_analytics.yml @@ -1,54 +1,109 @@ version: 2 exposures: - - name: customers__sum_of_number_of_orders_and_average_of_number_of_orders__grouped_by_most_recent_order__day_ - label: Customers, Sum of Number Of Orders and Average of Number Of Orders, Grouped - by Most Recent Order (day) - description: '### Visualization: Line + - name: completed_orders_cte_sql + label: Completed Orders CTE SQL + description: "### Visualization: Table\n\nCTE SQL\n\n#### Query\n\n```\nwith completed_orders\ + \ as (\n select * from Orders where status = 'completed'\n)\nselect * from\ + \ completed_orders\n```\n\n#### Metadata\n\nMetabase ID: __32__\n\nCreated On:\ + \ __2024-06-20T06:01:34.470497Z__" + type: analysis + url: http://localhost:3000/card/32 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: + - ref('orders') + - name: dummy + label: Dummy + description: '### Visualization: Table - No description provided in Metabase + Dummy 1 + + + #### Query + + + ``` + + select 1; + + ``` #### Metadata - Metabase ID: __1__ + Metabase ID: __30__ - Created On: __2021-07-21T08:00:47.453351Z__' + Created On: __2024-06-20T05:56:33.051625Z__' type: analysis - url: http://localhost:3000/card/1 + url: http://localhost:3000/card/30 maturity: medium owner: name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: orders__count - label: Orders, Count - description: '### Visualization: Scalar + email: dbtmetabase@example.com + depends_on: [] + - name: dummy_1 + label: Dummy + description: '### Visualization: Table + + + Dummy 2 + + #### Query - Nice KPI + + ``` + + select 2; + + ``` #### Metadata - Metabase ID: __2__ + Metabase ID: __31__ - Created On: __2021-07-21T08:01:14.290572Z__' + Created On: __2024-06-20T05:56:45.033599Z__' type: analysis - url: http://localhost:3000/card/2 + url: http://localhost:3000/card/31 maturity: medium owner: name: dbtmetabase - email: user@example.com + email: dbtmetabase@example.com + depends_on: [] + - name: orders___customers + label: Orders + Customers + description: '### Visualization: Table + + + Orders and customers + + + #### Metadata + + + Metabase ID: __27__ + + + Created On: __2024-06-19T11:57:35.85999Z__' + type: analysis + url: http://localhost:3000/card/27 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com depends_on: + - ref('customers') - ref('orders') - - name: orders_customers - label: Orders Customers + - name: orders___customers__filtered_by_status_is_completed + label: Orders + Customers, Filtered by Status is completed description: '### Visualization: Table @@ -58,38 +113,57 @@ exposures: #### Metadata - Metabase ID: __23__ + Metabase ID: __28__ - Created On: __2024-01-26T23:34:25.436685__' + Created On: __2024-06-19T11:58:35.060527Z__' type: analysis - url: http://localhost:3000/card/23 + url: http://localhost:3000/card/28 maturity: medium owner: name: dbtmetabase email: dbtmetabase@example.com depends_on: + - ref('customers') + - ref('orders') + - name: returned_order_count_sql + label: Returned Order Count SQL + description: "### Visualization: Scalar\n\nNo description provided in Metabase\n\ + \n#### Query\n\n```\nselect\n count(*)\nfrom STG_payments as p\n left\ + \ join STG_orders as o on p.order_id = o.order_id\nwhere o.status = 'returned'\n\ + ;\n```\n\n#### Metadata\n\nMetabase ID: __29__\n\nCreated On: __2024-06-19T12:03:01.905927Z__" + type: analysis + url: http://localhost:3000/card/29 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: + - ref('stg_orders') - ref('stg_payments') - - name: orders_customers_filtered - label: Orders Customers Filtered - description: '### Visualization: Table + - name: the_dashboard + label: The Dashboard + description: '### Dashboard Cards: 3 - No description provided in Metabase + Dashboard is a dashboard is a dashboard #### Metadata - Metabase ID: __24__ + Metabase ID: __2__ - Created On: __2024-01-26T23:35:08.864176__' - type: analysis - url: http://localhost:3000/card/24 + Created On: __2024-06-19T11:57:43.675681Z__' + type: dashboard + url: http://localhost:3000/dashboard/2 maturity: medium owner: name: dbtmetabase email: dbtmetabase@example.com depends_on: - ref('customers') + - ref('orders') + - ref('stg_orders') + - ref('stg_payments') diff --git a/tests/fixtures/exposure/default/exposures.yml b/tests/fixtures/exposure/default/exposures.yml index 65a7743d..f312f851 100644 --- a/tests/fixtures/exposure/default/exposures.yml +++ b/tests/fixtures/exposure/default/exposures.yml @@ -1,216 +1,110 @@ version: 2 exposures: - - name: a_look_at_your_customers_table - label: A look at your customers table - description: '### Dashboard Cards: 18 - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __1__ - - - Created On: __2021-07-21T08:01:37.328519Z__' - type: dashboard - url: http://localhost:3000/dashboard/1 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customer_lifetime_value_over_time - label: Customer_lifetime_value over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __11__ - - - Created On: __2021-07-21T08:01:38.52841Z__' + - name: completed_orders_cte_sql + label: Completed Orders CTE SQL + description: "### Visualization: Table\n\nCTE SQL\n\n#### Query\n\n```\nwith completed_orders\ + \ as (\n select * from Orders where status = 'completed'\n)\nselect * from\ + \ completed_orders\n```\n\n#### Metadata\n\nMetabase ID: __32__\n\nCreated On:\ + \ __2024-06-20T06:01:34.470497Z__" type: analysis - url: http://localhost:3000/card/11 + url: http://localhost:3000/card/32 maturity: medium owner: name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customer_lifetime_value_over_time_1 - label: Customer_lifetime_value over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __9__ - - - Created On: __2021-07-21T08:01:38.189846Z__' - type: analysis - url: http://localhost:3000/card/9 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers__sum_of_number_of_orders_and_average_of_number_of_orders__grouped_by_most_recent_order__day_ - label: Customers, Sum of Number Of Orders and Average of Number Of Orders, Grouped - by Most Recent Order (day) - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __1__ - - - Created On: __2021-07-21T08:00:47.453351Z__' - type: analysis - url: http://localhost:3000/card/1 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com + email: dbtmetabase@example.com depends_on: - - ref('customers') - - name: customers_added_in_the_last_30_days - label: Customers added in the last 30 days - description: '### Visualization: Scalar - + - ref('orders') + - name: dummy + label: Dummy + description: '### Visualization: Table - No description provided in Metabase + Dummy 1 - #### Metadata + #### Query - Metabase ID: __4__ + ``` - Created On: __2021-07-21T08:01:37.535187Z__' - type: analysis - url: http://localhost:3000/card/4 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_added_in_the_last_30_days_1 - label: Customers added in the last 30 days - description: '### Visualization: Scalar + select 1; - - No description provided in Metabase + ``` #### Metadata - Metabase ID: __5__ + Metabase ID: __30__ - Created On: __2021-07-21T08:01:37.630969Z__' + Created On: __2024-06-20T05:56:33.051625Z__' type: analysis - url: http://localhost:3000/card/5 + url: http://localhost:3000/card/30 maturity: medium owner: name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_by_customer_lifetime_value - label: Customers by customer_lifetime_value - description: '### Visualization: Bar - + email: dbtmetabase@example.com + depends_on: [] + - name: dummy_1 + label: Dummy + description: '### Visualization: Table - No description provided in Metabase + Dummy 2 - #### Metadata + #### Query - Metabase ID: __7__ + ``` - Created On: __2021-07-21T08:01:37.858387Z__' - type: analysis - url: http://localhost:3000/card/7 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: customers_by_number_of_orders - label: Customers by number_of_orders - description: '### Visualization: Bar + select 2; - - No description provided in Metabase + ``` #### Metadata - Metabase ID: __6__ + Metabase ID: __31__ - Created On: __2021-07-21T08:01:37.754606Z__' + Created On: __2024-06-20T05:56:45.033599Z__' type: analysis - url: http://localhost:3000/card/6 + url: http://localhost:3000/card/31 maturity: medium owner: name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: number_of_orders_over_time - label: Number_of_orders over time - description: '### Visualization: Line + email: dbtmetabase@example.com + depends_on: [] + - name: orders___customers + label: Orders + Customers + description: '### Visualization: Table - No description provided in Metabase + Orders and customers #### Metadata - Metabase ID: __8__ + Metabase ID: __27__ - Created On: __2021-07-21T08:01:38.016244Z__' + Created On: __2024-06-19T11:57:35.85999Z__' type: analysis - url: http://localhost:3000/card/8 + url: http://localhost:3000/card/27 maturity: medium owner: name: dbtmetabase - email: user@example.com + email: dbtmetabase@example.com depends_on: - ref('customers') - - name: number_of_orders_over_time_1 - label: Number_of_orders over time - description: '### Visualization: Line + - ref('orders') + - name: orders___customers__filtered_by_status_is_completed + label: Orders + Customers, Filtered by Status is completed + description: '### Visualization: Table No description provided in Metabase @@ -219,245 +113,57 @@ exposures: #### Metadata - Metabase ID: __10__ + Metabase ID: __28__ - Created On: __2021-07-21T08:01:38.347535Z__' + Created On: __2024-06-19T11:58:35.060527Z__' type: analysis - url: http://localhost:3000/card/10 + url: http://localhost:3000/card/28 maturity: medium owner: name: dbtmetabase - email: user@example.com + email: dbtmetabase@example.com depends_on: - ref('customers') - - name: orders__count - label: Orders, Count - description: '### Visualization: Scalar - - - Nice KPI - - - #### Metadata - - - Metabase ID: __2__ - - - Created On: __2021-07-21T08:01:14.290572Z__' - type: analysis - url: http://localhost:3000/card/2 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - ref('orders') - - name: orders_customers - label: Orders Customers - description: '### Visualization: Table - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __23__ - - - Created On: __2024-01-26T23:34:25.436685__' + - name: returned_order_count_sql + label: Returned Order Count SQL + description: "### Visualization: Scalar\n\nNo description provided in Metabase\n\ + \n#### Query\n\n```\nselect\n count(*)\nfrom STG_payments as p\n left\ + \ join STG_orders as o on p.order_id = o.order_id\nwhere o.status = 'returned'\n\ + ;\n```\n\n#### Metadata\n\nMetabase ID: __29__\n\nCreated On: __2024-06-19T12:03:01.905927Z__" type: analysis - url: http://localhost:3000/card/23 + url: http://localhost:3000/card/29 maturity: medium owner: name: dbtmetabase email: dbtmetabase@example.com depends_on: + - ref('stg_orders') - ref('stg_payments') - - name: orders_customers_filtered - label: Orders Customers Filtered - description: '### Visualization: Table + - name: the_dashboard + label: The Dashboard + description: '### Dashboard Cards: 3 - No description provided in Metabase + Dashboard is a dashboard is a dashboard #### Metadata - Metabase ID: __24__ + Metabase ID: __2__ - Created On: __2024-01-26T23:35:08.864176__' - type: analysis - url: http://localhost:3000/card/24 + Created On: __2024-06-19T11:57:43.675681Z__' + type: dashboard + url: http://localhost:3000/dashboard/2 maturity: medium owner: name: dbtmetabase email: dbtmetabase@example.com depends_on: - ref('customers') - - name: timestamp_by_day_of_the_week - label: Timestamp by day of the week - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __12__ - - - Created On: __2021-07-21T08:01:38.662485Z__' - type: analysis - url: http://localhost:3000/card/12 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_day_of_the_week_1 - label: Timestamp by day of the week - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __13__ - - - Created On: __2021-07-21T08:01:38.808186Z__' - type: analysis - url: http://localhost:3000/card/13 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_month_of_the_year - label: Timestamp by month of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __15__ - - - Created On: __2021-07-21T08:01:39.084258Z__' - type: analysis - url: http://localhost:3000/card/15 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_month_of_the_year_1 - label: Timestamp by month of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __14__ - - - Created On: __2021-07-21T08:01:38.938688Z__' - type: analysis - url: http://localhost:3000/card/14 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_quarter_of_the_year - label: Timestamp by quarter of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __17__ - - - Created On: __2021-07-21T08:01:39.371067Z__' - type: analysis - url: http://localhost:3000/card/17 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: timestamp_by_quarter_of_the_year_1 - label: Timestamp by quarter of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __16__ - - - Created On: __2021-07-21T08:01:39.228965Z__' - type: analysis - url: http://localhost:3000/card/16 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') - - name: total_customers - label: Total customers - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __3__ - - - Created On: __2021-07-21T08:01:37.434243Z__' - type: analysis - url: http://localhost:3000/card/3 - maturity: medium - owner: - name: '' - email: '' - depends_on: - - ref('customers') + - ref('orders') + - ref('stg_orders') + - ref('stg_payments') diff --git a/tests/fixtures/exposure/type/card/1.yml b/tests/fixtures/exposure/type/card/1.yml deleted file mode 100644 index 97f91542..00000000 --- a/tests/fixtures/exposure/type/card/1.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: 2 -exposures: - - name: customers__sum_of_number_of_orders_and_average_of_number_of_orders__grouped_by_most_recent_order__day_ - label: Customers, Sum of Number Of Orders and Average of Number Of Orders, Grouped - by Most Recent Order (day) - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __1__ - - - Created On: __2021-07-21T08:00:47.453351Z__' - type: analysis - url: http://localhost:3000/card/1 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/10.yml b/tests/fixtures/exposure/type/card/10.yml deleted file mode 100644 index 4ce71e35..00000000 --- a/tests/fixtures/exposure/type/card/10.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: number_of_orders_over_time_1 - label: Number_of_orders over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __10__ - - - Created On: __2021-07-21T08:01:38.347535Z__' - type: analysis - url: http://localhost:3000/card/10 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/11.yml b/tests/fixtures/exposure/type/card/11.yml deleted file mode 100644 index b3af317b..00000000 --- a/tests/fixtures/exposure/type/card/11.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: customer_lifetime_value_over_time - label: Customer_lifetime_value over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __11__ - - - Created On: __2021-07-21T08:01:38.52841Z__' - type: analysis - url: http://localhost:3000/card/11 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/12.yml b/tests/fixtures/exposure/type/card/12.yml deleted file mode 100644 index f0a8c15d..00000000 --- a/tests/fixtures/exposure/type/card/12.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: timestamp_by_day_of_the_week - label: Timestamp by day of the week - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __12__ - - - Created On: __2021-07-21T08:01:38.662485Z__' - type: analysis - url: http://localhost:3000/card/12 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/13.yml b/tests/fixtures/exposure/type/card/13.yml deleted file mode 100644 index f4d781cb..00000000 --- a/tests/fixtures/exposure/type/card/13.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: timestamp_by_day_of_the_week_1 - label: Timestamp by day of the week - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __13__ - - - Created On: __2021-07-21T08:01:38.808186Z__' - type: analysis - url: http://localhost:3000/card/13 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/14.yml b/tests/fixtures/exposure/type/card/14.yml deleted file mode 100644 index 677577ce..00000000 --- a/tests/fixtures/exposure/type/card/14.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: timestamp_by_month_of_the_year_1 - label: Timestamp by month of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __14__ - - - Created On: __2021-07-21T08:01:38.938688Z__' - type: analysis - url: http://localhost:3000/card/14 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/15.yml b/tests/fixtures/exposure/type/card/15.yml deleted file mode 100644 index 52b6e213..00000000 --- a/tests/fixtures/exposure/type/card/15.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: timestamp_by_month_of_the_year - label: Timestamp by month of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __15__ - - - Created On: __2021-07-21T08:01:39.084258Z__' - type: analysis - url: http://localhost:3000/card/15 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/16.yml b/tests/fixtures/exposure/type/card/16.yml deleted file mode 100644 index 42cacd75..00000000 --- a/tests/fixtures/exposure/type/card/16.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: timestamp_by_quarter_of_the_year_1 - label: Timestamp by quarter of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __16__ - - - Created On: __2021-07-21T08:01:39.228965Z__' - type: analysis - url: http://localhost:3000/card/16 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/17.yml b/tests/fixtures/exposure/type/card/17.yml deleted file mode 100644 index 0179970f..00000000 --- a/tests/fixtures/exposure/type/card/17.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: timestamp_by_quarter_of_the_year - label: Timestamp by quarter of the year - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __17__ - - - Created On: __2021-07-21T08:01:39.371067Z__' - type: analysis - url: http://localhost:3000/card/17 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/2.yml b/tests/fixtures/exposure/type/card/2.yml deleted file mode 100644 index 9547d4b1..00000000 --- a/tests/fixtures/exposure/type/card/2.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: orders__count - label: Orders, Count - description: '### Visualization: Scalar - - - Nice KPI - - - #### Metadata - - - Metabase ID: __2__ - - - Created On: __2021-07-21T08:01:14.290572Z__' - type: analysis - url: http://localhost:3000/card/2 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('orders') diff --git a/tests/fixtures/exposure/type/card/27.yml b/tests/fixtures/exposure/type/card/27.yml new file mode 100644 index 00000000..4bb48130 --- /dev/null +++ b/tests/fixtures/exposure/type/card/27.yml @@ -0,0 +1,26 @@ +version: 2 +exposures: + - name: orders___customers + label: Orders + Customers + description: '### Visualization: Table + + + Orders and customers + + + #### Metadata + + + Metabase ID: __27__ + + + Created On: __2024-06-19T11:57:35.85999Z__' + type: analysis + url: http://localhost:3000/card/27 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: + - ref('customers') + - ref('orders') diff --git a/tests/fixtures/exposure/type/card/24.yml b/tests/fixtures/exposure/type/card/28.yml similarity index 52% rename from tests/fixtures/exposure/type/card/24.yml rename to tests/fixtures/exposure/type/card/28.yml index 1b6ef96c..c4ddef35 100644 --- a/tests/fixtures/exposure/type/card/24.yml +++ b/tests/fixtures/exposure/type/card/28.yml @@ -1,7 +1,7 @@ version: 2 exposures: - - name: orders_customers_filtered - label: Orders Customers Filtered + - name: orders___customers__filtered_by_status_is_completed + label: Orders + Customers, Filtered by Status is completed description: '### Visualization: Table @@ -11,15 +11,16 @@ exposures: #### Metadata - Metabase ID: __24__ + Metabase ID: __28__ - Created On: __2024-01-26T23:35:08.864176__' + Created On: __2024-06-19T11:58:35.060527Z__' type: analysis - url: http://localhost:3000/card/24 + url: http://localhost:3000/card/28 maturity: medium owner: name: dbtmetabase email: dbtmetabase@example.com depends_on: - ref('customers') + - ref('orders') diff --git a/tests/fixtures/exposure/type/card/29.yml b/tests/fixtures/exposure/type/card/29.yml new file mode 100644 index 00000000..cb57633e --- /dev/null +++ b/tests/fixtures/exposure/type/card/29.yml @@ -0,0 +1,17 @@ +version: 2 +exposures: + - name: returned_order_count_sql + label: Returned Order Count SQL + description: "### Visualization: Scalar\n\nNo description provided in Metabase\n\ + \n#### Query\n\n```\nselect\n count(*)\nfrom STG_payments as p\n left\ + \ join STG_orders as o on p.order_id = o.order_id\nwhere o.status = 'returned'\n\ + ;\n```\n\n#### Metadata\n\nMetabase ID: __29__\n\nCreated On: __2024-06-19T12:03:01.905927Z__" + type: analysis + url: http://localhost:3000/card/29 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: + - ref('stg_orders') + - ref('stg_payments') diff --git a/tests/fixtures/exposure/type/card/3.yml b/tests/fixtures/exposure/type/card/3.yml deleted file mode 100644 index e6b1210c..00000000 --- a/tests/fixtures/exposure/type/card/3.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: total_customers - label: Total customers - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __3__ - - - Created On: __2021-07-21T08:01:37.434243Z__' - type: analysis - url: http://localhost:3000/card/3 - maturity: medium - owner: - name: '' - email: '' - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/30.yml b/tests/fixtures/exposure/type/card/30.yml new file mode 100644 index 00000000..f43d96a2 --- /dev/null +++ b/tests/fixtures/exposure/type/card/30.yml @@ -0,0 +1,34 @@ +version: 2 +exposures: + - name: dummy + label: Dummy + description: '### Visualization: Table + + + Dummy 1 + + + #### Query + + + ``` + + select 1; + + ``` + + + #### Metadata + + + Metabase ID: __30__ + + + Created On: __2024-06-20T05:56:33.051625Z__' + type: analysis + url: http://localhost:3000/card/30 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: [] diff --git a/tests/fixtures/exposure/type/card/31.yml b/tests/fixtures/exposure/type/card/31.yml new file mode 100644 index 00000000..df222eb1 --- /dev/null +++ b/tests/fixtures/exposure/type/card/31.yml @@ -0,0 +1,34 @@ +version: 2 +exposures: + - name: dummy_1 + label: Dummy + description: '### Visualization: Table + + + Dummy 2 + + + #### Query + + + ``` + + select 2; + + ``` + + + #### Metadata + + + Metabase ID: __31__ + + + Created On: __2024-06-20T05:56:45.033599Z__' + type: analysis + url: http://localhost:3000/card/31 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: [] diff --git a/tests/fixtures/exposure/type/card/32.yml b/tests/fixtures/exposure/type/card/32.yml new file mode 100644 index 00000000..18b46bba --- /dev/null +++ b/tests/fixtures/exposure/type/card/32.yml @@ -0,0 +1,16 @@ +version: 2 +exposures: + - name: completed_orders_cte_sql + label: Completed Orders CTE SQL + description: "### Visualization: Table\n\nCTE SQL\n\n#### Query\n\n```\nwith completed_orders\ + \ as (\n select * from Orders where status = 'completed'\n)\nselect * from\ + \ completed_orders\n```\n\n#### Metadata\n\nMetabase ID: __32__\n\nCreated On:\ + \ __2024-06-20T06:01:34.470497Z__" + type: analysis + url: http://localhost:3000/card/32 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: + - ref('orders') diff --git a/tests/fixtures/exposure/type/card/4.yml b/tests/fixtures/exposure/type/card/4.yml deleted file mode 100644 index aabce70d..00000000 --- a/tests/fixtures/exposure/type/card/4.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: customers_added_in_the_last_30_days - label: Customers added in the last 30 days - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __4__ - - - Created On: __2021-07-21T08:01:37.535187Z__' - type: analysis - url: http://localhost:3000/card/4 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/5.yml b/tests/fixtures/exposure/type/card/5.yml deleted file mode 100644 index 08c10bfd..00000000 --- a/tests/fixtures/exposure/type/card/5.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: customers_added_in_the_last_30_days_1 - label: Customers added in the last 30 days - description: '### Visualization: Scalar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __5__ - - - Created On: __2021-07-21T08:01:37.630969Z__' - type: analysis - url: http://localhost:3000/card/5 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/6.yml b/tests/fixtures/exposure/type/card/6.yml deleted file mode 100644 index 23f2b7ba..00000000 --- a/tests/fixtures/exposure/type/card/6.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: customers_by_number_of_orders - label: Customers by number_of_orders - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __6__ - - - Created On: __2021-07-21T08:01:37.754606Z__' - type: analysis - url: http://localhost:3000/card/6 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/7.yml b/tests/fixtures/exposure/type/card/7.yml deleted file mode 100644 index 1e478c01..00000000 --- a/tests/fixtures/exposure/type/card/7.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: customers_by_customer_lifetime_value - label: Customers by customer_lifetime_value - description: '### Visualization: Bar - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __7__ - - - Created On: __2021-07-21T08:01:37.858387Z__' - type: analysis - url: http://localhost:3000/card/7 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/8.yml b/tests/fixtures/exposure/type/card/8.yml deleted file mode 100644 index db0f2975..00000000 --- a/tests/fixtures/exposure/type/card/8.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: number_of_orders_over_time - label: Number_of_orders over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __8__ - - - Created On: __2021-07-21T08:01:38.016244Z__' - type: analysis - url: http://localhost:3000/card/8 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/card/9.yml b/tests/fixtures/exposure/type/card/9.yml deleted file mode 100644 index 0e39c065..00000000 --- a/tests/fixtures/exposure/type/card/9.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: customer_lifetime_value_over_time_1 - label: Customer_lifetime_value over time - description: '### Visualization: Line - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __9__ - - - Created On: __2021-07-21T08:01:38.189846Z__' - type: analysis - url: http://localhost:3000/card/9 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/dashboard/1.yml b/tests/fixtures/exposure/type/dashboard/1.yml deleted file mode 100644 index 636868ef..00000000 --- a/tests/fixtures/exposure/type/dashboard/1.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 2 -exposures: - - name: a_look_at_your_customers_table - label: A look at your customers table - description: '### Dashboard Cards: 18 - - - No description provided in Metabase - - - #### Metadata - - - Metabase ID: __1__ - - - Created On: __2021-07-21T08:01:37.328519Z__' - type: dashboard - url: http://localhost:3000/dashboard/1 - maturity: medium - owner: - name: dbtmetabase - email: user@example.com - depends_on: - - ref('customers') diff --git a/tests/fixtures/exposure/type/dashboard/2.yml b/tests/fixtures/exposure/type/dashboard/2.yml new file mode 100644 index 00000000..946fc444 --- /dev/null +++ b/tests/fixtures/exposure/type/dashboard/2.yml @@ -0,0 +1,28 @@ +version: 2 +exposures: + - name: the_dashboard + label: The Dashboard + description: '### Dashboard Cards: 3 + + + Dashboard is a dashboard is a dashboard + + + #### Metadata + + + Metabase ID: __2__ + + + Created On: __2024-06-19T11:57:43.675681Z__' + type: dashboard + url: http://localhost:3000/dashboard/2 + maturity: medium + owner: + name: dbtmetabase + email: dbtmetabase@example.com + depends_on: + - ref('customers') + - ref('orders') + - ref('stg_orders') + - ref('stg_payments') diff --git a/tests/test_exposures.py b/tests/test_exposures.py index dab8c693..322ac448 100644 --- a/tests/test_exposures.py +++ b/tests/test_exposures.py @@ -44,14 +44,8 @@ def test_exposures_collection_grouping(self): output_grouping="collection", ) - self._assert_exposures( - fixtures_path / "a_look_at_your_customers_table.yml", - output_path / "a_look_at_your_customers_table.yml", - ) - self._assert_exposures( - fixtures_path / "our_analytics.yml", - output_path / "our_analytics.yml", - ) + for file in fixtures_path.iterdir(): + self._assert_exposures(file, output_path / file.name) def test_exposures_grouping_type(self): fixtures_path = FIXTURES_PATH / "exposure" / "type" @@ -61,17 +55,11 @@ def test_exposures_grouping_type(self): output_grouping="type", ) - for i in [*range(1, 18), 24]: - self._assert_exposures( - fixtures_path / "card" / f"{i}.yml", - output_path / "card" / f"{i}.yml", - ) - - for i in range(1, 2): - self._assert_exposures( - fixtures_path / "dashboard" / f"{i}.yml", - output_path / "dashboard" / f"{i}.yml", - ) + for file in (fixtures_path / "card").iterdir(): + self._assert_exposures(file, output_path / "card" / file.name) + + for file in (fixtures_path / "dashboard").iterdir(): + self._assert_exposures(file, output_path / "dashboard" / file.name) def test_exposures_aliased_ref(self): for model in self.c.manifest.read_models(): diff --git a/tests/test_metabase.py b/tests/test_metabase.py index 40389199..65541b95 100644 --- a/tests/test_metabase.py +++ b/tests/test_metabase.py @@ -8,33 +8,33 @@ def setUp(self): self.metabase = MockMetabase(url="http://localhost") def test_metabase_find_database(self): - db = self.metabase.find_database(name="unit_testing") + db = self.metabase.find_database(name="dbtmetabase") assert db self.assertEqual(2, db["id"]) self.assertIsNone(self.metabase.find_database(name="foo")) def test_metabase_get_collections(self): excluded = self.metabase.get_collections(exclude_personal=True) - self.assertEqual(3, len(excluded)) + self.assertEqual(1, len(excluded)) included = self.metabase.get_collections(exclude_personal=False) - self.assertEqual(4, len(included)) + self.assertEqual(2, len(included)) def test_metabase_get_collection_items(self): cards = self.metabase.get_collection_items( - uid="3", + uid="root", models=("card",), ) self.assertEqual({"card"}, {item["model"] for item in cards}) dashboards = self.metabase.get_collection_items( - uid="3", + uid="root", models=("dashboard",), ) self.assertEqual({"dashboard"}, {item["model"] for item in dashboards}) both = self.metabase.get_collection_items( - uid="3", + uid="root", models=("card", "dashboard"), ) self.assertEqual({"card", "dashboard"}, {item["model"] for item in both}) diff --git a/tests/test_models.py b/tests/test_models.py index 35c9b296..340d046f 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -11,7 +11,7 @@ def setUp(self): def test_export(self): self.c.export_models( - metabase_database="unit_testing", + metabase_database="dbtmetabase", skip_sources=True, sync_timeout=0, order_fields=True, @@ -34,18 +34,23 @@ def test_build_lookups(self): "CUSTOMER_ID", "ORDER_DATE", "STATUS", + "AMOUNT", "CREDIT_CARD_AMOUNT", "COUPON_AMOUNT", "BANK_TRANSFER_AMOUNT", "GIFT_CARD_AMOUNT", - "AMOUNT", ], "PUBLIC.RAW_CUSTOMERS": ["ID", "FIRST_NAME", "LAST_NAME"], "PUBLIC.RAW_ORDERS": ["ID", "USER_ID", "ORDER_DATE", "STATUS"], "PUBLIC.RAW_PAYMENTS": ["ID", "ORDER_ID", "PAYMENT_METHOD", "AMOUNT"], - "PUBLIC.STG_CUSTOMERS": ["CUSTOMER_ID"], - "PUBLIC.STG_ORDERS": ["ORDER_ID", "STATUS"], - "PUBLIC.STG_PAYMENTS": ["PAYMENT_ID", "PAYMENT_METHOD"], + "PUBLIC.STG_CUSTOMERS": ["CUSTOMER_ID", "FIRST_NAME", "LAST_NAME"], + "PUBLIC.STG_ORDERS": ["ORDER_ID", "STATUS", "ORDER_DATE", "CUSTOMER_ID"], + "PUBLIC.STG_PAYMENTS": [ + "PAYMENT_ID", + "PAYMENT_METHOD", + "ORDER_ID", + "AMOUNT", + ], } actual_tables = self.c._ModelsMixin__get_tables(database_id="2") # type: ignore