From 9ca7a75e2d2d19c35d480f410c7892a1fb0192d3 Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Thu, 30 Jun 2022 12:16:06 +0200 Subject: [PATCH] Add col lineage in sample usage (#5790) --- .../examples/sample_data/datasets/query_log | 3 +- .../examples/sample_data/datasets/tables.json | 335 ++++++++++++++++++ 2 files changed, 337 insertions(+), 1 deletion(-) diff --git a/ingestion/examples/sample_data/datasets/query_log b/ingestion/examples/sample_data/datasets/query_log index 53b12eab926..2a62e1093ee 100644 --- a/ingestion/examples/sample_data/datasets/query_log +++ b/ingestion/examples/sample_data/datasets/query_log @@ -14,4 +14,5 @@ query "select * from shopify.raw_customer" "select * from shopify.raw_customer" "select * from shopify.raw_customer" -"select * from shopify.raw_customer" \ No newline at end of file +"select * from shopify.raw_customer" +"create table shopify.dim_address_clean as select address_id, shop_id, first_name, last_name, address1 as address, company, city, region, zip, country, phone from shopify.dim_address" \ No newline at end of file diff --git a/ingestion/examples/sample_data/datasets/tables.json b/ingestion/examples/sample_data/datasets/tables.json index 7b4af1655a9..7d57306a56f 100644 --- a/ingestion/examples/sample_data/datasets/tables.json +++ b/ingestion/examples/sample_data/datasets/tables.json @@ -1043,6 +1043,341 @@ "href": "http://localhost:8585/api/v1/databaseSchemas/d7be1e2c-b3dc-11ec-b909-0242ac120002" } }, + { + "id": "1cda9ecb-f4c6-4ed4-8506-abe965b64c87", + "name": "dim_address_clean", + "description": "Created from dim_address after a small cleanup.", + "version": 0.1, + "updatedAt": 1638354087591, + "updatedBy": "anonymous", + "href": "http://localhost:8585/api/v1/tables/1cda9ecb-f4c6-4ed4-8506-abe965b64c87", + "tableType": "Regular", + "columns": [ + { + "name": "address_id", + "dataType": "NUMERIC", + "dataTypeDisplay": "numeric", + "description": "Unique identifier for the address.", + "tags": [], + "ordinalPosition": 1 + }, + { + "name": "shop_id", + "dataType": "NUMERIC", + "dataTypeDisplay": "numeric", + "description": "The ID of the store. This column is a foreign key reference to the shop_id column in the dim_shop table.", + "tags": [], + "ordinalPosition": 2 + }, + { + "name": "first_name", + "dataType": "VARCHAR", + "dataLength": 100, + "dataTypeDisplay": "varchar", + "description": "First name of the customer.", + "tags": [], + "ordinalPosition": 3 + }, + { + "name": "last_name", + "dataType": "VARCHAR", + "dataLength": 100, + "dataTypeDisplay": "varchar", + "description": "Last name of the customer.", + "tags": [], + "ordinalPosition": 4 + }, + { + "name": "address", + "dataType": "VARCHAR", + "dataLength": 500, + "dataTypeDisplay": "varchar", + "description": "Clean address", + "tags": [], + "ordinalPosition": 5 + }, + { + "name": "company", + "dataType": "VARCHAR", + "dataLength": 100, + "dataTypeDisplay": "varchar", + "description": "The name of the customer's business, if one exists.", + "tags": [], + "ordinalPosition": 7 + }, + { + "name": "city", + "dataType": "VARCHAR", + "dataLength": 100, + "dataTypeDisplay": "varchar", + "description": "The name of the city. For example, Palo Alto.", + "tags": [], + "ordinalPosition": 8 + }, + { + "name": "region", + "dataType": "VARCHAR", + "dataLength": 512, + "dataTypeDisplay": "varchar", + "description": "The name of the region, such as a province or state, where the customer is located. For example, Ontario or New York. This column is the same as CustomerAddress.province in the Admin API.", + "tags": [], + "ordinalPosition": 9 + }, + { + "name": "zip", + "dataType": "VARCHAR", + "dataLength": 10, + "dataTypeDisplay": "varchar", + "description": "The ZIP or postal code. For example, 90210.", + "tags": [], + "ordinalPosition": 10 + }, + { + "name": "country", + "dataType": "VARCHAR", + "dataLength": 50, + "dataTypeDisplay": "varchar", + "description": "The full name of the country. For example, Canada.", + "tags": [], + "ordinalPosition": 11 + }, + { + "name": "phone", + "dataType": "VARCHAR", + "dataLength": 15, + "dataTypeDisplay": "varchar", + "description": "The phone number of the customer.", + "tags": [], + "ordinalPosition": 12 + } + ], + "tableConstraints": [ + { + "constraintType": "PRIMARY_KEY", + "columns": [ + "address_id", + "shop_id" + ] + } + ], + "database": { + "id": "50da1ff8-4e1d-4967-8931-45edbf4dd908", + "type": "database", + "name": "sample_data.ecommerce_db", + "description": "This **mock** database contains tables related to shopify sales and orders with related dimension tables.", + "href": "http://localhost:8585/api/v1/databases/50da1ff8-4e1d-4967-8931-45edbf4dd908" + }, + "tags": [], + "usageSummary": { + "dailyStats": { + "count": 100, + "percentileRank": 45 + }, + "weeklyStats": { + "count": 100, + "percentileRank": 45 + }, + "monthlyStats": { + "count": 100, + "percentileRank": 45 + }, + "date": "2021-12-01" + }, + "followers": [], + "sampleData": { + "columns": [ + "address_id", + "shop_id", + "first_name", + "last_name", + "address", + "company", + "city", + "region", + "zip", + "country", + "phone" + ], + "rows": [ + [ + "bc35100e-2da5-48bb-bfc8-667dafe66532", + "70424951-bc97-4b20-9ce7-be37c4619361", + "Zachary", + "Brett", + "9054 Maria Circle Apt. 296", + "Robinson Inc", + "Stephanieport", + "048 Moore Turnpike Apt. 061", + "30839", + "Latvia", + "(381)575-6692" + ], + [ + "d9a5b1a0-bf92-4b71-884d-9818308d040d", + "ffdc81e4-b0dc-47b2-8240-8540ba6c3029", + "Melissa", + "Amy", + "6212 William Plaza Suite 362", + "Todd, Henderson and Jenkins", + "Petersonstad", + "363 Gary Mills", + "91794", + "Lesotho", + "828-855-9883" + ], + [ + "facf92d7-05ea-43d2-ba2a-067d63dee60c", + "a8d30187-1409-4606-9259-322a4f6caf74", + "Amber", + "Albert", + "3170 Warren Orchard Apt. 834", + "Davila-Snyder", + "Nicoleland", + "023 Paul Course", + "14086", + "Sweden", + "438-959-1151" + ], + [ + "bab9a506-e23d-4c53-9402-d070e7704376", + "e02e1fac-b650-4db8-8c9d-5fa5edf5d863", + "Heidi", + "Kelly", + "30942 Gonzalez Stravenue", + "Moore PLC", + "West Erica", + "6294 Elliott Ville", + "07418", + "Saint Martin", + "(830)112-9566x8681" + ], + [ + "67ff12ae-5d40-4795-9a82-3afa62a4aea1", + "bf45dc22-8d23-49d9-9d87-7b4bd2dd1762", + "Adam", + "Anna", + "986 Walker Unions", + "Schultz, Allen and Price", + "West Brandyton", + "07379 Alejandra Manors", + "09192", + "Cambodia", + "(859)222-9872x9188" + ], + [ + "97831db3-23df-424e-b2e3-19f196874002", + "cfc3c305-748b-4992-9fef-ddd0aa7ce927", + "Tracey", + "Kaitlin", + "1810 Fletcher Islands", + "Patel-Evans", + "Powellbury", + "8856 Lambert Forest Apt. 010", + "49826", + "Turks and Caicos Islands", + "195.384.1264x84605" + ], + [ + "a405990b-732f-431e-b3ad-0ce05a484671", + "f53ff51f-3365-4029-ae67-a679e1dca626", + "Carmen", + "Jessica", + "58361 Audrey Parks Apt. 128", + "Perez Inc", + "Laurieshire", + "407 Nicole Greens", + "06175", + "Kenya", + "(565)853-4978x18062" + ], + [ + "d3be5a1e-10f0-46e6-8033-d15766e73047", + "ffeea1b4-eb28-452a-8b06-2408e36b1a94", + "Melinda", + "Paul", + "09590 Gonzales Camp Apt. 092", + "Mills Ltd", + "South Wendy", + "6273 Victor Springs Apt. 655", + "68154", + "United Arab Emirates", + "(209)678-7748x53000" + ], + [ + "52636d10-1505-4f0a-894a-52a194cdba26", + "8c021bf4-f33a-4d41-b55f-78d801a45d5e", + "Jacob", + "Jamie", + "0952 Colon Greens", + "Sullivan Group", + "Longbury", + "03714 April Landing", + "74874", + "Turkey", + "(038)859-4310x9693" + ], + [ + "b2a1279b-392f-404f-88e0-f755d2bd3c14", + "2351209a-94b2-4b20-a517-1eef888c0d5b", + "Allen", + "Dean", + "8492 Smith Plains Apt. 986", + "Thornton-Mcknight", + "Gregoryborough", + "56904 Tony Branch Suite 945", + "88544", + "Mauritania", + "001-198-032-8011x00683" + ], + [ + "3a7cc826-4e7d-46de-a13d-895d5319a881", + "1a03bf40-3f40-460e-b170-2fadea8bdbee", + "Jill", + "Diana", + "092 Jose Unions", + "Wilson and Sons", + "North Justinchester", + "750 Contreras Bridge Apt. 456", + "77859", + "Kazakhstan", + "311.331.9899x4838" + ], + [ + "d4891b70-a002-41a9-a072-a1d3ef99c4d9", + "e49ad3aa-2c30-4148-81f8-4e2980467d1c", + "Jonathan", + "Lauren", + "4416 Christina Ville", + "Bennett, Hicks and Davidson", + "Lake Kendra", + "67281 Lee Drive Suite 987", + "27227", + "Jersey", + "950.930.9189x591" + ], + [ + "fbc3eeda-75b3-41f6-91a3-d671e3cc17d6", + "c3c73e91-020d-4fee-a1a9-e9781d684d9a", + "Gary", + "Jonathan", + "71309 Theresa Trail", + "Mccarthy-Huang", + "Lake Amanda", + "000 William Ranch", + "93218", + "Kazakhstan", + "001-109-449-4210x33965" + ] + ] + }, + "databaseSchema": { + "id": "d7be1e2c-b3dc-11ec-b909-0242ac120002", + "type": "databaseSchema", + "name": "sample_data.ecommerce_db.shopify", + "description": "This **mock** Schema contains tables related to shopify sales and orders with related dimension tables.", + "href": "http://localhost:8585/api/v1/databaseSchemas/d7be1e2c-b3dc-11ec-b909-0242ac120002" + } + }, { "id": "753833e0-f526-47b6-8555-97f5bb2882d5", "name": "dim.api/client",