chore: import upstream snapshot with attribution
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": null,
|
||||
"name": "ecommerce_db",
|
||||
"description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.",
|
||||
"service": {
|
||||
"id": "b946d870-03b2-4d33-a075-13665a7a76b9",
|
||||
"type": "SAMPLEDATA"
|
||||
},
|
||||
"sourceUrl": "https://www.ecommerce-db.com/ecommerce_db"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": null,
|
||||
"name": "shopify",
|
||||
"description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.",
|
||||
"service": {
|
||||
"id": "b946d870-03b2-4d33-a075-13665a7a76b9",
|
||||
"type": "BIGQUERY"
|
||||
},
|
||||
"sourceUrl": "https://www.ecommerce-db.com/shopify"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"type": "bigquery",
|
||||
"serviceName": "sample_data",
|
||||
"serviceConnection": {
|
||||
"config": {
|
||||
"type": "BigQuery",
|
||||
"hostPort": "localhost:1234",
|
||||
"credentials": {
|
||||
"gcpConfig": {
|
||||
"type": "service_account",
|
||||
"projectId": ["projectID"],
|
||||
"privateKeyId": "privateKeyId",
|
||||
"privateKey": "privateKey",
|
||||
"clientEmail": "clientEmail",
|
||||
"clientId": "clientId",
|
||||
"authUri": "https://accounts.google.com/o/oauth2/auth",
|
||||
"tokenUri": "https://oauth2.googleapis.com/token",
|
||||
"authProviderX509CertUrl": "https://www.googleapis.com/oauth2/v1/certs",
|
||||
"clientX509CertUrl": "https://cert.url"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceConfig": {
|
||||
"config": {
|
||||
"type": "DatabaseMetadata"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,357 @@
|
||||
{
|
||||
"storedProcedures": [
|
||||
{
|
||||
"name": "update_dim_address_table",
|
||||
"description": "This stored procedure updates dim_address table",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1638354087391,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE output_message(message VARCHAR)\nRETURNS VARCHAR NOT NULL\nLANGUAGE SQL\nAS\n$$\nBEGIN\n RETURN message;\nEND;\n$$\n;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_orders_table",
|
||||
"description": "This stored procedure is written java script to update the orders table",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1638354087391,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "JavaScript",
|
||||
"code": "create or replace procedure read_result_set()\n returns float not null\n language javascript\n as \n $$ \n var my_sql_command = \"select * from table1\";\n var statement1 = snowflake.createStatement( {sqlText: my_sql_command} );\n var result_set1 = statement1.execute();\n // Loop through the results, processing one row at a time... \n while (result_set1.next()) {\n var column1 = result_set1.getColumnValue(1);\n var column2 = result_set1.getColumnValue(2);\n // Do something with the retrieved values...\n }\n return 0.0; // Replace with something more useful.\n $$\n ;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "calculate_average",
|
||||
"description": "Procedure to calculate average",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1638354087391,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "insert_user_data",
|
||||
"description": "Procedure to Insert User Data",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1646500478000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE insert_user_data(user_name varchar, email varchar, age int) RETURNS int NOT NULL LANGUAGE SQL AS $$DECLARE user_id INT;BEGIN\n INSERT INTO users\n (\n NAME,\n email,\n age\n )\n VALUES\n (\n user_name,\n email,\n age\n )\n returning id\n INTO user_id;\n\n RETURN user_id;\nEND;$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "get_employee_details",
|
||||
"description": "Procedure get employee details",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1647253512000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE get_employee_details(employee_id int) RETURNS JSON NOT NULL LANGUAGE SQL AS $$DECLARE employee_record JSON;BEGIN\n SELECT Row_to_json(e) INTO employee_record FROM employees e WHERE e.id = employee_id;\n RETURN employee_record;\nEND;$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "delete_records",
|
||||
"description": "Procedure delete the records",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1648937554000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE delete_records(table_name VARCHAR, condition VARCHAR) RETURNS INT NOT NULL LANGUAGE SQL AS $$\nDECLARE\n rows_deleted INT;\nBEGIN\n EXECUTE 'DELETE FROM ' || table_name || ' WHERE ' || condition INTO rows_deleted;\n RETURN rows_deleted;\nEND;\n$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "calculate_interest",
|
||||
"description": "Procedure to calculate interest",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1650615609000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE calculate_interest(principal FLOAT, rate FLOAT, time_period INT) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$\nDECLARE interest FLOAT;\nBEGIN\n interest := (principal * rate * time_period) / 100.0;\n RETURN interest;\nEND;\n$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "generate_random_password",
|
||||
"description": "Procedure to generate random password",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1651451037000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE generate_random_password(length INT) RETURNS VARCHAR NOT NULL LANGUAGE SQL AS $$DECLARE characters VARCHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; random_password VARCHAR = '';BEGIN\n FOR i IN 1..length\n LOOP random_password := random_password || substr(characters, ceil(random() * length(characters)), 1);\n END LOOP;\n RETURN random_password;\nEND;\n$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_product_price",
|
||||
"description": "Procedure to update product price",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1652586518000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE update_product_price(product_id INT, new_price DECIMAL) RETURNS VOID LANGUAGE SQL AS $$\nBEGIN\n UPDATE products\n SET price = new_price\n WHERE id = product_id;\nEND;\n$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_dim_address_clean_from_dim_address",
|
||||
"description": "Procedure to update dim_address clean table",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1654112579000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE UpdateDimAddressCleanFromDimAddress()\nLANGUAGE plpgsql\nAS $$\nBEGIN\nUPDATE dim_address_clean AS dc\nSET\n street = da.street,\n city = da.city,\n state = da.state,\n postal_code = da.postal_code\nFROM dim_address AS da\nWHERE dc.address_id = da.address_id;\n\nCOMMIT;\nEND;\n$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "transform_and_load_data",
|
||||
"description": "Procedure to clean the customers data before loading",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1656043991000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE FUNCTION TransformAndLoadData() RETURNS VOID AS $$ BEGIN\n DELETE FROM dim_customer;\n INSERT INTO dim_customer (dim_customer_name, dim_customer_email)\n SELECT\n TRIM(raw_customer_name),\n LOWER(raw_customer_email)\n FROM raw_customer;\n COMMIT;\n END; $$ LANGUAGE plpgsql;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_fact_order_from_raw_order",
|
||||
"description": "Procedure to update fact order from raw order table",
|
||||
"version": 0.1,
|
||||
"updatedAt": 1657845268000,
|
||||
"updatedBy": "anonymous",
|
||||
"href": "http://localhost:8585/api/v1/tables/3cda8ecb-f4c6-4ed4-8506-abe965b54b86",
|
||||
"storedProcedureCode": {
|
||||
"langauge": "SQL",
|
||||
"code": "CREATE OR REPLACE PROCEDURE UpdateFactOrderFromRawOrder()\nLANGUAGE plpgsql AS $$\nBEGIN\n TRUNCATE fact_order;\n INSERT INTO fact_order (Month, TotalQuantity)\n SELECT DATE_TRUNC('month', OrderDate) AS Month, SUM(Quantity) AS TotalQuantity\n FROM raw_order\n GROUP BY DATE_TRUNC('month', OrderDate);\nEND;\n$$;"
|
||||
},
|
||||
"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": [],
|
||||
"followers": [],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
],
|
||||
"lineage":[
|
||||
{
|
||||
"from_table_fqn": "sample_data.ecommerce_db.shopify.raw_order",
|
||||
"stored_procedure_fqn": "sample_data.ecommerce_db.shopify.update_fact_order_from_raw_order",
|
||||
"to_table_fqn": "sample_data.ecommerce_db.shopify.fact_order"
|
||||
},
|
||||
{
|
||||
"from_table_fqn": "sample_data.ecommerce_db.shopify.raw_customer",
|
||||
"stored_procedure_fqn": "sample_data.ecommerce_db.shopify.transform_and_load_data",
|
||||
"to_table_fqn": "sample_data.ecommerce_db.shopify.dim_customer"
|
||||
},
|
||||
{
|
||||
"from_table_fqn": "sample_data.ecommerce_db.shopify.dim_address",
|
||||
"stored_procedure_fqn": "sample_data.ecommerce_db.shopify.update_dim_address_clean_from_dim_address",
|
||||
"to_table_fqn": "sample_data.ecommerce_db.shopify.dim_address_clean"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
[
|
||||
{
|
||||
"table": "sample_data.ecommerce_db.shopify.dim_staff",
|
||||
"tableTests": [
|
||||
{
|
||||
"description": "Rows should always be 100 because of something",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"value": "120"
|
||||
},
|
||||
"tableTestType": "tableRowCountToEqual"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Failed",
|
||||
"result": "Found 100.0 rows vs. the expected 120"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Rows should always be 100 because of something",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"value": "120"
|
||||
},
|
||||
"tableTestType": "tableRowCountToEqual"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found 120.0 rows vs. the expected 120"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "We expect certain columns",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"value": "5"
|
||||
},
|
||||
"tableTestType": "tableColumnCountToEqual"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found 5.0 columns vs. the expected 5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Rows should always be 100 because of something",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"minValue": "100",
|
||||
"maxValue": "200"
|
||||
},
|
||||
"tableTestType": "tableRowCountToBeBetween"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found 120.0 rows vs. the expected range [100, 200]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Rows should always be 100 because of something",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"minValue": "100",
|
||||
"maxValue": "200"
|
||||
},
|
||||
"tableTestType": "tableRowCountToBeBetween"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found 120.0 rows vs. the expected range [100, 200]"
|
||||
}
|
||||
}
|
||||
],
|
||||
"columnTests": [
|
||||
{
|
||||
"columnName": "user_id",
|
||||
"description": "user_id should be positive",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"minValue": "0"
|
||||
},
|
||||
"columnTestType": "columnValuesToBeBetween"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found min=1.0 vs. the expected min=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "user_id",
|
||||
"description": "user_id should be positive",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"minValue": "0"
|
||||
},
|
||||
"columnTestType": "columnValuesToBeBetween"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found min=1.0 vs. the expected min=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "email",
|
||||
"description": "emails should be unique",
|
||||
"testCase": {
|
||||
"config": {},
|
||||
"columnTestType": "columnValuesToBeUnique"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found uniqueCount=100.0 vs. valuesCount=100.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "email",
|
||||
"description": "emails should be unique",
|
||||
"testCase": {
|
||||
"config": {},
|
||||
"columnTestType": "columnValuesToBeUnique"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found uniqueCount=100.0 vs. valuesCount=100.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "user_id",
|
||||
"description": "user_id should be not null",
|
||||
"testCase": {
|
||||
"config": {},
|
||||
"columnTestType": "columnValuesToBeNotNull"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found nullCount=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "user_id",
|
||||
"description": "user_id should be not null",
|
||||
"testCase": {
|
||||
"config": {},
|
||||
"columnTestType": "columnValuesToBeNotNull"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found nullCount=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "last_name",
|
||||
"description": "last_name should match a regex",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"regex": "%something%"
|
||||
},
|
||||
"columnTestType": "columnValuesToMatchRegex"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Failed",
|
||||
"result": "Found likeCount=0. Nothing matches %something%"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "last_name",
|
||||
"description": "last_name should match a regex",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"regex": "%something%"
|
||||
},
|
||||
"columnTestType": "columnValuesToMatchRegex"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Failed",
|
||||
"result": "Found likeCount=0. Nothing matches %something%"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "first_name",
|
||||
"description": "Some description...",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"missingCountValue": "10"
|
||||
},
|
||||
"columnTestType": "columnValuesMissingCountToBeEqual"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Failed",
|
||||
"result": "Found nullCount=0.0 vs. the expected nullCount=10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "first_name",
|
||||
"description": "Some description...",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"missingCountValue": "10"
|
||||
},
|
||||
"columnTestType": "columnValuesMissingCountToBeEqual"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Failed",
|
||||
"result": "Found nullCount=0.0 vs. the expected nullCount=10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "email",
|
||||
"description": "email should have a fixed length",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"minValue": "6",
|
||||
"maxValue": "30"
|
||||
},
|
||||
"columnTestType": "columnValuesToBeBetween"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found min=1.0 vs. the expected min=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "email",
|
||||
"description": "email should have a fixed length",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"minValue": "6",
|
||||
"maxValue": "30"
|
||||
},
|
||||
"columnTestType": "columnValuesToBeBetween"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found min=1.0 vs. the expected min=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "last_name",
|
||||
"description": "We have reserved last names",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"forbiddenValues": [
|
||||
"forbidden",
|
||||
"random"
|
||||
]
|
||||
},
|
||||
"columnTestType": "columnValuesToBeNotInSet"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646220190,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found countInSet=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"columnName": "last_name",
|
||||
"description": "We have reserved last names",
|
||||
"testCase": {
|
||||
"config": {
|
||||
"forbiddenValues": [
|
||||
"forbidden",
|
||||
"random"
|
||||
]
|
||||
},
|
||||
"columnTestType": "columnValuesToBeNotInSet"
|
||||
},
|
||||
"executionFrequency": "Daily",
|
||||
"result": {
|
||||
"timestamp": 1646221199,
|
||||
"testCaseStatus": "Success",
|
||||
"result": "Found countInSet=0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user