From bdb34a330983f825587272552fd9488550f3fbd3 Mon Sep 17 00:00:00 2001 From: Cal Herries <39073188+calherries@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:21:54 +0300 Subject: [PATCH] Sample content (#40753) --- .../metabase_enterprise/serialization/cmd.clj | 8 +- .../serialization/v2/entity_ids.clj | 12 +- .../serialization/test_util.clj | 2 +- .../migrations/001_update_migrations.yaml | 8 + resources/sample-content.edn | 3983 +++++++++++++++++ src/metabase/api/database.clj | 2 +- src/metabase/cmd/copy.clj | 11 +- src/metabase/cmd/reset_password.clj | 2 +- src/metabase/cmd/rotate_encryption_key.clj | 2 +- src/metabase/config.clj | 6 + src/metabase/core.clj | 17 +- src/metabase/db.clj | 10 +- src/metabase/db/custom_migrations.clj | 231 +- src/metabase/db/setup.clj | 20 +- src/metabase/public_settings.clj | 13 + src/metabase/sample_data.clj | 33 +- test/metabase/api/permissions_test.clj | 4 +- test/metabase/cmd/load_from_h2_test.clj | 2 +- test/metabase/db/schema_migrations_test.clj | 40 + test/metabase/db/setup_test.clj | 32 +- test/metabase/models/user_test.clj | 2 +- test/metabase/setup_test.clj | 21 +- test/metabase/test/data.clj | 2 +- test/metabase/test/data/h2.clj | 2 +- test/metabase/test/data/interface.clj | 2 +- test/metabase/test/initialize/db.clj | 2 +- 26 files changed, 4333 insertions(+), 136 deletions(-) create mode 100644 resources/sample-content.edn diff --git a/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj b/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj index 05cf8622e25..5f9038b78d4 100644 --- a/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj +++ b/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj @@ -57,7 +57,7 @@ "Load serialized metabase instance as created by [[dump]] command from directory `path`." [path context :- Context] (plugins/load-plugins!) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (check-premium-token!) (when-not (load/compatible? path) (log/warn "Dump was produced using a different version of Metabase. Things may break!")) @@ -91,7 +91,7 @@ & {:keys [token-check?] :or {token-check? true}}] (plugins/load-plugins!) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (when token-check? (check-premium-token!)) ; TODO This should be restored, but there's no manifest or other meta file written by v2 dumps. @@ -184,7 +184,7 @@ "Legacy Metabase app data dump" [path {:keys [state user include-entity-id] :or {state :active} :as opts}] (log/infof "BEGIN DUMP to %s via user %s" path user) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (check-premium-token!) (t2/select User) ;; TODO -- why??? [editor's note: this comment originally from Cam] (let [users (if user @@ -228,7 +228,7 @@ "Exports Metabase app data to directory at path" [path {:keys [collection-ids] :as opts}] (log/infof "Exporting Metabase to %s" path) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (check-premium-token!) (t2/select User) ;; TODO -- why??? [editor's note: this comment originally from Cam] (let [f (io/file path)] diff --git a/enterprise/backend/src/metabase_enterprise/serialization/v2/entity_ids.clj b/enterprise/backend/src/metabase_enterprise/serialization/v2/entity_ids.clj index ed39bf3b57d..88645f86702 100644 --- a/enterprise/backend/src/metabase_enterprise/serialization/v2/entity_ids.clj +++ b/enterprise/backend/src/metabase_enterprise/serialization/v2/entity_ids.clj @@ -114,7 +114,7 @@ Returns truthy if all missing entity IDs were created successfully, and falsey if there were any errors." [] (log/info "Seeding Entity IDs") - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (let [{:keys [error-count]} (transduce (map seed-entity-ids-for-model!) (completing (partial merge-with +)) @@ -139,10 +139,10 @@ Returns truthy if all entity IDs were removed successfully, and falsey if there were any errors." [] (log/info "Dropping Entity IDs") - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (let [{:keys [error-count]} (transduce - (map drop-entity-ids-for-model!) - (completing (partial merge-with +)) - {:update-count 0, :error-count 0} - (entity-id-models))] + (map drop-entity-ids-for-model!) + (completing (partial merge-with +)) + {:update-count 0, :error-count 0} + (entity-id-models))] (zero? error-count))) diff --git a/enterprise/backend/test/metabase_enterprise/serialization/test_util.clj b/enterprise/backend/test/metabase_enterprise/serialization/test_util.clj index f006b9461a7..24ac1e18bbc 100644 --- a/enterprise/backend/test/metabase_enterprise/serialization/test_util.clj +++ b/enterprise/backend/test/metabase_enterprise/serialization/test_util.clj @@ -72,7 +72,7 @@ data-source (mdb.data-source/raw-connection-string->DataSource connection-string)] ;; DB should stay open as long as `conn` is held open. (with-open [_conn (.getConnection data-source)] - (with-db data-source (mdb/setup-db!)) + (with-db data-source (mdb/setup-db! :create-sample-content? false)) ; skip sample content for speedy tests. this doesn't reflect production (f data-source)))) (defn do-with-dbs diff --git a/resources/migrations/001_update_migrations.yaml b/resources/migrations/001_update_migrations.yaml index 1ecda60717a..fae5a37e5ae 100644 --- a/resources/migrations/001_update_migrations.yaml +++ b/resources/migrations/001_update_migrations.yaml @@ -6129,6 +6129,14 @@ databaseChangeLog: constraints: nullable: true + - changeSet: + id: v50.2024-04-09T15:55:22 + author: calherries + comment: Create sample content + changes: + - customChange: + class: "metabase.db.custom_migrations.CreateSampleContent" + - changeSet: id: v50.2024-04-09T15:55:23 author: piranha diff --git a/resources/sample-content.edn b/resources/sample-content.edn new file mode 100644 index 00000000000..1026dc95793 --- /dev/null +++ b/resources/sample-content.edn @@ -0,0 +1,3983 @@ +{:metabase_database + ({:description "Some example data for you to play around with.", + :cache_field_values_schedule "0 0 17 * * ? *", + :timezone "UTC", + :auto_run_queries true, + :metadata_sync_schedule "0 26 * * * ? *", + :name "Sample Database", + :settings nil, + :caveats + "You probably don't want to use this for your business-critical analyses, but hey, it's your world, we're just living in it.", + :creator_id nil, + :is_full_sync true, + :updated_at #t "2024-04-11T12:41:26.866003Z", + :cache_ttl nil, + :details + "{}", + :is_sample true, + :id 1, + :is_on_demand false, + :engine "h2", + :initial_sync_status "complete", + :is_audit false, + :dbms_version "{}", + :refingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :points_of_interest + "You can find all sorts of different joinable tables ranging from products to people to reviews here."}), + :report_dashboard + ({:description + "Quickly take an overview of an e-commerce reseller business and dive into separate tabs that focus on top selling products and demographic insights. Each vendor can log in as a tenant and see their own data sandboxed from all the others.", + :archived false, + :collection_position 2, + :initially_published_at nil, + :enable_embedding false, + :collection_id 1, + :show_in_getting_started false, + :name "E-commerce insights", + :width "full", + :caveats nil, + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:20.141559Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :id 1, + :position nil, + :entity_id "DlK2jXoIHPXyVkEuo6Uy6", + :parameters + "[{\"id\":\"fc2cd1be\",\"isMultiSelect\":false,\"name\":\"Vendor\",\"sectionId\":\"string\",\"slug\":\"vendor\",\"type\":\"string/=\"},{\"id\":\"afa56954\",\"name\":\"Date Range\",\"sectionId\":\"date\",\"slug\":\"date_range\",\"type\":\"date/range\"},{\"id\":\"5eeec658\",\"name\":\"Category\",\"sectionId\":\"string\",\"slug\":\"category\",\"type\":\"string/=\",\"values_query_type\":\"list\"},{\"id\":\"512c560a\",\"name\":\"Location\",\"sectionId\":\"location\",\"slug\":\"location\",\"type\":\"string/=\",\"values_query_type\":\"none\"}]", + :auto_apply_filters true, + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil, + :points_of_interest nil}), + :metabase_table + ({:description + "Piespace does some anonymous analytics tracking on how users interact with their platform. They’ve only had time to implement a few events, but you know how it is. Pies come first.", + :entity_type "entity/EventTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "ANALYTIC_EVENTS", + :caveats + "Piespace has cracked time travel, so keep in mind that some events may have already happened in the future.", + :updated_at #t "2024-04-11T12:41:26.910262Z", + :active true, + :id 1, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Analytic Events", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? We’ll let you be the judge of that."} + {:description + "With each order of pies sent out, Piespace includes a place for customers to submit feedback and review their order.", + :entity_type "entity/GenericTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "FEEDBACK", + :caveats + "Not every account feels inclined to submit feedback. That’s cool. There’s still quite a few responses here.", + :updated_at #t "2024-04-11T12:41:26.916987Z", + :active true, + :id 2, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Feedback", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? We’ll let you be the judge of that."} + {:description "Information on the user accounts registered with Sample Company.", + :entity_type "entity/UserTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "PEOPLE", + :caveats "Note that employees and customer support staff will have accounts.", + :updated_at #t "2024-04-11T12:41:26.883435Z", + :active true, + :id 3, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "People", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? You tell us!"} + {:description "Reviews that Sample Company customers have left on our products.", + :entity_type "entity/GenericTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "REVIEWS", + :caveats + "These reviews aren't tied to orders so it is possible people have reviewed products they did not purchase from us.", + :updated_at #t "2024-04-11T12:41:26.889211Z", + :active true, + :id 4, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Reviews", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? You tell us!"} + {:description "Confirmed Sample Company orders for a product, from a user.", + :entity_type "entity/TransactionTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "ORDERS", + :caveats + "You can join this on the Products and Orders table using the ID fields. Discount is left null if not applicable.", + :updated_at #t "2024-04-11T12:41:26.880693Z", + :active true, + :id 5, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Orders", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? You tell us!"} + {:description + "Information on customer accounts registered with Piespace. Each account represents a new organization signing up for on-demand pies.", + :entity_type "entity/UserTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "ACCOUNTS", + :caveats + "Piespace’s business operates with a two week trial period. If you see that “Canceled At†is null then that account is still happily paying for their pies.", + :updated_at #t "2024-04-11T12:41:26.904036Z", + :active true, + :id 6, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Accounts", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? We’ll let you be the judge of that."} + {:description + "Confirmed payments from Piespace’s customers. Most accounts pay for their pie subscription on a monthly basis.", + :entity_type "entity/GenericTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "INVOICES", + :caveats + "You can group by “Account ID†to see all the payments from an account and unveil information like total amount paid to date.", + :updated_at #t "2024-04-11T12:41:26.901935Z", + :active true, + :id 7, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Invoices", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? We’ll let you be the judge of that."} + {:description "Includes a catalog of all the products ever sold by the famed Sample Company.", + :entity_type "entity/ProductTable", + :schema "PUBLIC", + :database_require_filter nil, + :show_in_getting_started false, + :name "PRODUCTS", + :caveats "The rating column is an integer from 1-5 where 1 is dreadful and 5 is the best thing ever.", + :updated_at #t "2024-04-11T12:41:26.878228Z", + :active true, + :id 8, + :db_id 1, + :visibility_type nil, + :field_order "database", + :is_upload false, + :initial_sync_status "complete", + :display_name "Products", + :created_at #t "2024-04-11T12:41:25.429317Z", + :estimated_row_count nil, + :points_of_interest "Is it? You tell us!"}), + :report_dashboardcard + ({:size_x 24, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:44:20.141559Z", + :col 0, + :id 1, + :parameter_mappings "[]", + :card_id 7, + :entity_id "T3G6Is3XniVtrqzKbZ2vx", + :visualization_settings + "{\"card.title\":\"Value of orders over time (before taxes)\",\"column_settings\":null,\"graph.dimensions\":[\"CREATED_AT\",\"CATEGORY\"],\"graph.metrics\":[\"sum\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.x_axis.labels_enabled\":false,\"series_settings\":{\"Doohickey\":{\"color\":\"#7172AD\"},\"Gadget\":{\"color\":\"#A989C5\"},\"Gizmo\":{\"color\":\"#C7EAEA\"},\"Widget\":{\"color\":\"#227FD2\"}},\"stackable.stack_type\":\"stacked\"}", + :size_y 7, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 15} + {:size_x 24, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:44:20.141559Z", + :col 0, + :id 2, + :parameter_mappings "[]", + :card_id 16, + :entity_id "gXkQgKfsYghl-XjDpSefW", + :visualization_settings + "{\"card.description\":\"Orders placed per quarter broken down by source and formatted to highlight best and worst quarters\",\"column_settings\":null,\"graph.dimensions\":[\"CREATED_AT\",\"SOURCE\"],\"graph.metrics\":[\"sum\"],\"graph.series_labels\":[null],\"pivot.show_row_totals\":true,\"pivot_table.column_split\":{\"columns\":[[\"field\",45,{\"base-type\":\"type/Text\",\"source-field\":43}]],\"rows\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}]],\"values\":[[\"aggregation\",0]]},\"pivot_table.column_widths\":{\"leftHeaderWidths\":[141],\"totalLeftHeaderWidths\":141,\"valueHeaderWidths\":{\"0\":234,\"1\":263,\"2\":254,\"3\":236.3636474609375,\"4\":227,\"5\":170}},\"stackable.stack_type\":\"stacked\",\"table.column_formatting\":[{\"color\":\"#FBE499\",\"colors\":[\"#ED6E6E\",\"#FFFFFF\",\"#84BB4C\"],\"columns\":[\"sum\"],\"highlight_row\":false,\"max_type\":null,\"max_value\":100,\"min_type\":null,\"min_value\":0,\"operator\":\"<\",\"type\":\"range\",\"value\":1000}]}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 9} + {:size_x 24, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 3, + :parameter_mappings "[]", + :card_id nil, + :entity_id "Cb92ioon7vWaER-4OcdDS", + :visualization_settings + "{\"column_settings\":null,\"dashcard.background\":false,\"text\":\"Overall business health\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"heading\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 1, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 0} + {:size_x 15, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 9, + :id 4, + :parameter_mappings "[]", + :card_id 4, + :entity_id "vJZR2mN2xRrXiqqwAc0eb", + :visualization_settings + "{\"graph.y_axis.title_text\":\"Buyers\",\"graph.series_order_dimension\":null,\"graph.x_axis.title_text\":\"Age\",\"card.title\":\"Buyers by age group\",\"graph.metrics\":[\"count_2\"],\"graph.series_order\":null,\"card.description\":\"Shows a distribution of our customers in age groups\",\"series_settings\":{\"count\":{\"color\":\"#A989C5\"},\"count_2\":{\"color\":\"#999AC4\"}},\"graph.x_axis.scale\":\"ordinal\",\"graph.dimensions\":[\"count\"]}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 24, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 5, + :parameter_mappings "[]", + :card_id nil, + :entity_id "s2ZdKLKOql1B0gCbOh3XO", + :visualization_settings + "{\"column_settings\":null,\"dashcard.background\":false,\"text\":\"Top performing products\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"heading\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 1, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 0} + {:size_x 7, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 17, + :id 6, + :parameter_mappings "[]", + :card_id 6, + :entity_id "C3ByFOdgRYsNwwXVTGfY-", + :visualization_settings + "{\"card.description\":\"Breaks down the overall performance of each of the product categories \",\"card.title\":\"Total orders by category\",\"column_settings\":null,\"pie.colors\":{\"Doohickey\":\"#7172AD\",\"Gadget\":\"#A989C5\",\"Gizmo\":\"#C7EAEA\",\"Widget\":\"#227FD2\"}}", + :size_y 5, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 13} + {:size_x 17, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 7, + :parameter_mappings "[]", + :card_id 14, + :entity_id "ndNZEBY96LMGGWefgnG3o", + :visualization_settings + "{\"card.description\":\"Compares the orders of each category quarter over quarter\",\"card.title\":\"Numbers of orders by category per quarter\",\"column_settings\":null,\"graph.dimensions\":[\"CREATED_AT\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"graph.x_axis.labels_enabled\":false,\"graph.x_axis.title_text\":\"Created At\",\"graph.y_axis.title_text\":\"Number of orders\",\"series_settings\":{\"Doohickey\":{\"color\":\"#7172AD\"},\"Gadget\":{\"color\":\"#A989C5\"},\"Gizmo\":{\"color\":\"#C7EAEA\"},\"Widget\":{\"color\":\"#227FD2\"}}}", + :size_y 5, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 13} + {:size_x 7, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 17, + :id 8, + :parameter_mappings "[]", + :card_id 1, + :entity_id "g6Z9N7QjvtdQbEHaAgxhY", + :visualization_settings + "{\"card.description\":\"Compares the total number of orders placed for this product this month with the previous period\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 3} + {:size_x 7, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 17, + :id 9, + :parameter_mappings "[]", + :card_id 5, + :entity_id "Q4sD1F6XrD8dVPD2JHV1Z", + :visualization_settings + "{\"card.description\":\"Compares the total number of orders placed for this product this month with the previous period\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 6} + {:size_x 7, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 17, + :id 10, + :parameter_mappings "[]", + :card_id 8, + :entity_id "3d1iG7J48euO467UN-hCL", + :visualization_settings + "{\"card.description\":\"Compares the total number of orders placed for this product this month with the previous period\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 9} + {:size_x 7, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 17, + :id 11, + :parameter_mappings "[]", + :card_id nil, + :entity_id "Jtd-7AGoT0MNS4CxhVjei", + :visualization_settings + "{\"text\":\"### Top three all-time products \\nMoM performance\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"text\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 2, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 24, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 12, + :parameter_mappings "[]", + :card_id nil, + :entity_id "xmP43pM4LHbrbRP-rjT-j", + :visualization_settings + "{\"column_settings\":null,\"dashcard.background\":false,\"text\":\"Who and where are our customers\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"heading\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 1, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 0} + {:size_x 15, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 9, + :id 13, + :parameter_mappings "[]", + :card_id 17, + :entity_id "f-hh5qVJwpgrj3_JWDtpX", + :visualization_settings + "{\"card.description\":\"Shows a distribution of orders broken down by product category across our customers' age groups\",\"card.title\":\"Product category orders per individual age\",\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.x_axis.scale\":\"ordinal\",\"graph.y_axis.title_text\":\"Orders by category\",\"series_settings\":{\"Doohickey\":{\"color\":\"#7172AD\"},\"Gadget\":{\"color\":\"#A989C5\"},\"Gizmo\":{\"color\":\"#C7EAEA\"},\"Widget\":{\"color\":\"#227FD2\"}},\"stackable.stack_type\":\"normalized\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 14} + {:size_x 15, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 9, + :id 14, + :parameter_mappings "[]", + :card_id 25, + :entity_id "VjAahFlVkOA0hp1LVBrH5", + :visualization_settings + "{\"card.description\":\"Shows a distribution of revenue in age groups\",\"card.title\":\"Revenue per individual age\",\"column_settings\":null,\"graph.dimensions\":[\"Age\"],\"graph.label_value_formatting\":\"compact\",\"graph.metrics\":[\"sum\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"graph.x_axis.scale\":\"ordinal\",\"graph.y_axis.title_text\":\"Total revenue\",\"stackable.stack_type\":\"stacked\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 8} + {:size_x 17, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 15, + :parameter_mappings "[]", + :card_id 23, + :entity_id "zfSwuSU-8e6O3eqyt9r16", + :visualization_settings + "{\"card.description\":\"An ordered list of our most successful products\",\"card.title\":\"Best selling products\",\"column_settings\":null,\"graph.dimensions\":[\"TITLE\"],\"graph.metrics\":[\"count\"],\"graph.x_axis.labels_enabled\":false,\"graph.x_axis.title_text\":\"Products\",\"graph.y_axis.title_text\":\"number of orders\",\"series_settings\":{\"count\":{\"color\":\"#999AC4\"}},\"table.pivot\":false}", + :size_y 11, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 24, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 16, + :parameter_mappings "[]", + :card_id nil, + :entity_id "tNvUvy6ezg0rUhV9baI0O", + :visualization_settings + "{\"column_settings\":null,\"dashcard.background\":false,\"text\":\"Product category insights\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"heading\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 1, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 12} + {:size_x 17, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 17, + :parameter_mappings "[]", + :card_id 19, + :entity_id "OMCqqRP9CQTT3pSp6sfo5", + :visualization_settings + "{\"card.description\":\"Shows the distribution of the product categories along the scale of customer ratings\",\"card.title\":\"Customer Satisfaction per category\",\"column_settings\":null,\"graph.dimensions\":[\"RATING\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.x_axis.title_text\":\"Customer Ratings\",\"graph.y_axis.auto_range\":true,\"graph.y_axis.title_text\":\"Orders by category\",\"series_settings\":{\"Doohickey\":{\"color\":\"#7172AD\"},\"Gadget\":{\"color\":\"#A989C5\"},\"Gizmo\":{\"color\":\"#C7EAEA\"},\"Widget\":{\"color\":\"#227FD2\"},\"count\":{\"color\":\"#999AC4\"}},\"stackable.stack_type\":\"stacked\",\"table.pivot\":false}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 19} + {:size_x 7, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 17, + :id 18, + :parameter_mappings "[]", + :card_id 22, + :entity_id "iSUCvbFniuVFlN5NDV3Y7", + :visualization_settings + "{\"card.description\":\"Indicates the average customer review of our products\",\"card.title\":\"Average product rating overall\",\"column_settings\":null,\"gauge.segments\":[{\"color\":\"#EF8C8C\",\"label\":\"awful\",\"max\":1,\"min\":0},{\"color\":\"#F2A86F\",\"label\":\"bad\",\"max\":2,\"min\":1},{\"color\":\"#F9D45C\",\"label\":\"alright\",\"max\":3,\"min\":2},{\"color\":\"#A7D07C\",\"label\":\"good\",\"max\":4,\"min\":3},{\"color\":\"#689636\",\"label\":\"great\",\"max\":5,\"min\":4}],\"table.cell_column\":\"avg\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 19} + {:size_x 15, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 9, + :id 19, + :parameter_mappings "[]", + :card_id 21, + :entity_id "s_DDqee44Wp_gHh16bAuR", + :visualization_settings + "{\"card.description\":\"Shows a distribution of orders broken down by source across our customers' age groups\",\"card.title\":\"Orders by source per individual age\",\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"SOURCE\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.x_axis.axis_enabled\":true,\"graph.x_axis.scale\":\"ordinal\",\"graph.y_axis.title_text\":\"Orders by Sources\",\"stackable.stack_type\":\"normalized\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 20} + {:size_x 24, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 20, + :parameter_mappings "[]", + :card_id nil, + :entity_id "P37ixkaPafIr47ep0oypD", + :visualization_settings + "{\"column_settings\":null,\"dashcard.background\":false,\"text\":\"Age insights breakdowns\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"heading\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 1, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 7} + {:size_x 18, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 6, + :id 21, + :parameter_mappings "[]", + :card_id 12, + :entity_id "Cc0jFy1OZZbmC1CEA4eu2", + :visualization_settings + "{\"card.description\":\"Matches the cumulative revenue month over month with the number of orders placed each month\",\"column_settings\":null,\"graph.dimensions\":[\"CREATED_AT\"],\"graph.metrics\":[\"sum\",\"sum_2\"],\"graph.show_trendline\":false,\"graph.x_axis.labels_enabled\":false,\"graph.x_axis.title_text\":\"Orders date\",\"graph.y_axis.labels_enabled\":false,\"graph.y_axis.title_text\":\"Revenue\",\"series_settings\":{\"sum\":{\"display\":\"line\",\"line.interpolate\":\"linear\",\"line.marker_enabled\":false,\"show_series_values\":true,\"title\":\"Revenue\"},\"sum_2\":{\"color\":\"#51528D\",\"title\":\"Number of orders\"}}}", + :size_y 5, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 4} + {:size_x 24, + :dashboard_tab_id 2, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 22, + :parameter_mappings "[]", + :card_id nil, + :entity_id "wRqWXKjFJ_d3t34HXl7Vg", + :visualization_settings + "{\"column_settings\":null,\"dashcard.background\":false,\"text\":\"Customer satisfaction insights\",\"virtual_card\":{\"archived\":false,\"dataset_query\":{},\"display\":\"heading\",\"name\":null,\"visualization_settings\":{}}}", + :size_y 1, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 18} + {:size_x 6, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 12, + :id 23, + :parameter_mappings "[]", + :card_id 20, + :entity_id "xZFChb3ro-2jzg7I767yY", + :visualization_settings + "{\"card.description\":\"Compares the total number of orders placed this month with the previous period\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 6, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 6, + :id 24, + :parameter_mappings "[]", + :card_id 18, + :entity_id "NGar3mVnCROw5p7djSBa3", + :visualization_settings + "{\"card.description\":\"Compares the total discount given this quarter with the previous period\",\"card.title\":\"Discount given per quarter\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 6, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 25, + :parameter_mappings "[]", + :card_id 15, + :entity_id "dX_lc-n9uNhVcRmbhZfdQ", + :visualization_settings + "{\"card.description\":\"Compares the total revenue this quarter with the previous period\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 6, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 18, + :id 26, + :parameter_mappings "[]", + :card_id 24, + :entity_id "1mSLJrWPvehXkcIzoK1Yq", + :visualization_settings + "{\"card.description\":\"Compares the number of unique customers placing orders this month with the previous period\",\"card.title\":\"Unique customers per month\",\"column_settings\":null}", + :size_y 3, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 6, + :dashboard_tab_id 1, + :action_id nil, + :updated_at #t "2024-04-11T12:44:20.141559Z", + :col 0, + :id 27, + :parameter_mappings "[]", + :card_id 13, + :entity_id "e-8h-dZx-B9RYybRoZzci", + :visualization_settings + "{\"card.description\":\"Compares the current total in revenue with the set goal for the quarter\",\"progress.goal\":250000,\"column_settings\":{\"[\\\"name\\\",\\\"sum\\\"]\":{\"number_style\":\"currency\"}}}", + :size_y 5, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 4} + {:size_x 9, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 28, + :parameter_mappings "[]", + :card_id 9, + :entity_id "M89Lh2AQnAunejYWXNUeT", + :visualization_settings "{\"column_settings\":null}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 1} + {:size_x 9, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 29, + :parameter_mappings "[]", + :card_id 11, + :entity_id "3f4Uo5mlklic7PBxY32DZ", + :visualization_settings + "{\"graph.show_values\":true,\"graph.x_axis.labels_enabled\":true,\"table.cell_column\":\"SUBTOTAL\",\"graph.series_order_dimension\":null,\"graph.x_axis.axis_enabled\":true,\"graph.y_axis.labels_enabled\":false,\"card.title\":\"Product category orders per age group\",\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"series_settings\":{\"Doohickey\":{\"color\":\"#7172AD\"},\"Gadget\":{\"color\":\"#A989C5\"},\"Gizmo\":{\"color\":\"#C7EAEA\"},\"Widget\":{\"color\":\"#227FD2\"}},\"graph.y_axis.auto_range\":true,\"graph.x_axis.scale\":\"ordinal\",\"graph.dimensions\":[\"Age\",\"CATEGORY\"],\"stackable.stack_type\":\"stacked\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 14} + {:size_x 9, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 30, + :parameter_mappings + "[{\"card_id\":3,\"parameter_id\":\"afa56954\",\"target\":[\"dimension\",[\"field\",41,{\"base-type\":\"type/DateTime\"}]]},{\"card_id\":3,\"parameter_id\":\"512c560a\",\"target\":[\"dimension\",[\"field\",48,{\"base-type\":\"type/Text\",\"source-field\":43}]]},{\"card_id\":3,\"parameter_id\":\"5eeec658\",\"target\":[\"dimension\",[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}]]},{\"card_id\":3,\"parameter_id\":\"fc2cd1be\",\"target\":[\"dimension\",[\"field\",60,{\"base-type\":\"type/Text\",\"source-field\":40}]]}]", + :card_id 3, + :entity_id "h_f6hPOFg0FN3m6VA5B03", + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\"],\"graph.metrics\":[\"sum\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"graph.x_axis.scale\":\"ordinal\",\"stackable.stack_type\":\"stacked\",\"table.cell_column\":\"SUBTOTAL\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 8} + {:size_x 9, + :dashboard_tab_id 3, + :action_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :col 0, + :id 31, + :parameter_mappings "[]", + :card_id 10, + :entity_id "JDDgMLIDoRDC24ufF2yeI", + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"SOURCE\"],\"graph.label_value_formatting\":\"compact\",\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"graph.x_axis.axis_enabled\":true,\"graph.x_axis.labels_enabled\":true,\"graph.x_axis.scale\":\"ordinal\",\"graph.y_axis.auto_range\":true,\"graph.y_axis.labels_enabled\":false,\"graph.y_axis.title_text\":\"Orders\",\"stackable.stack_type\":\"stacked\",\"table.cell_column\":\"SUBTOTAL\"}", + :size_y 6, + :dashboard_id 1, + :created_at #t "2024-04-11T12:41:25.429317Z", + :row 20}), + :dashboard_tab + ({:id 1, + :dashboard_id 1, + :name "Overview", + :position 0, + :entity_id "PS7GW5IfD3ov0haogAPLu", + :created_at #t "2024-04-11T12:41:25.429317Z", + :updated_at #t "2024-04-11T12:41:25.429317Z"} + {:id 2, + :dashboard_id 1, + :name "Portfolio performance", + :position 1, + :entity_id "z5IymDhXzRY2kF79LxQIN", + :created_at #t "2024-04-11T12:41:25.429317Z", + :updated_at #t "2024-04-11T12:41:25.429317Z"} + {:id 3, + :dashboard_id 1, + :name "Demographics", + :position 2, + :entity_id "TKyJ0onLUPOuZgVfwZfU1", + :created_at #t "2024-04-11T12:41:25.429317Z", + :updated_at #t "2024-04-11T12:41:25.429317Z"}), + :metabase_field + ({:description nil, + :database_type "INTEGER", + :semantic_type nil, + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "SEATS", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 1, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 6, + :visibility_type "normal", + :preview_display true, + :display_name "Seats", + :database_position 6, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":102,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":1.0,\"q1\":2.4309856865966593,\"q3\":10.553778422458695,\"max\":1325.0,\"sd\":51.198301031505444,\"avg\":16.21763527054108}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil} + {:description nil, + :database_type "TIMESTAMP", + :semantic_type nil, + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "TRIAL_ENDS_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 2, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 8, + :visibility_type "normal", + :preview_display true, + :display_name "Trial Ends At", + :database_position 8, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":1712,\"nil%\":0.001202404809619238},\"type\":{\"type/DateTime\":{\"earliest\":\"2020-09-30T12:00:00Z\",\"latest\":\"2031-10-25T12:00:00Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description nil, + :database_type "TIMESTAMP", + :semantic_type "type/CancelationTimestamp", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "CANCELED_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 3, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 9, + :visibility_type "normal", + :preview_display true, + :display_name "Canceled At", + :database_position 9, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2021,\"nil%\":0.1859719438877756},\"type\":{\"type/DateTime\":{\"earliest\":\"2020-10-01T15:43:40Z\",\"latest\":\"2032-06-03T14:01:15Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Category", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "PLAN", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 4, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Plan", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":3,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":5.1062124248497}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "BOOLEAN", + :semantic_type "type/Category", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "ACTIVE_SUBSCRIPTION", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Boolean", + :active true, + :nfc_path nil, + :parent_id nil, + :id 5, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 11, + :visibility_type "normal", + :preview_display true, + :display_name "Active Subscription", + :database_position 11, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":2,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Boolean", + :points_of_interest nil} + {:description nil, + :database_type "DOUBLE PRECISION", + :semantic_type "type/Latitude", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "LATITUDE", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 6, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 13, + :visibility_type "normal", + :preview_display true, + :display_name "Latitude", + :database_position 13, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2472,\"nil%\":4.008016032064128E-4},\"type\":{\"type/Number\":{\"min\":-48.75,\"q1\":19.430679334308675,\"q3\":47.24585743676113,\"max\":69.23111,\"sd\":23.492041679980137,\"avg\":31.35760681046913}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 6, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 7, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required true, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "BOOLEAN", + :semantic_type "type/Category", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "LEGACY_PLAN", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Boolean", + :active true, + :nfc_path nil, + :parent_id nil, + :id 8, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 12, + :visibility_type "normal", + :preview_display true, + :display_name "Legacy Plan", + :database_position 12, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":2,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Boolean", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Name", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "FIRST_NAME", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 9, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "First Name", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":1687,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.001603206412825651,\"average-length\":5.997595190380761}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Name", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "LAST_NAME", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 10, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Last Name", + :database_position 3, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":473,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":6.536673346693386}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Source", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "SOURCE", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 11, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Source", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":5,\"nil%\":0.3346693386773547},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":4.4705410821643286}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Email", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "EMAIL", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 12, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Email", + :database_position 1, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2494,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":1.0,\"percent-state\":0.0,\"average-length\":28.185971943887775}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "TIMESTAMP", + :semantic_type "type/CreationTimestamp", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "CREATED_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 13, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 7, + :visibility_type "normal", + :preview_display true, + :display_name "Created At", + :database_position 7, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2495,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2020-09-15T16:11:50Z\",\"latest\":\"2031-10-10T19:14:48Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description nil, + :database_type "BOOLEAN", + :semantic_type "type/Category", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "TRIAL_CONVERTED", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Boolean", + :active true, + :nfc_path nil, + :parent_id nil, + :id 14, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 10, + :visibility_type "normal", + :preview_display true, + :display_name "Trial Converted", + :database_position 10, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":2,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Boolean", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER", + :semantic_type "type/Country", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "COUNTRY", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 15, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 15, + :visibility_type "normal", + :preview_display true, + :display_name "Country", + :database_position 15, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":134,\"nil%\":8.016032064128256E-4},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.1130260521042084,\"average-length\":1.9983967935871743}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "DOUBLE PRECISION", + :semantic_type "type/Longitude", + :table_id 6, + :coercion_strategy nil, + :database_indexed false, + :name "LONGITUDE", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 16, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 14, + :visibility_type "normal", + :preview_display true, + :display_name "Longitude", + :database_position 14, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2484,\"nil%\":4.008016032064128E-4},\"type\":{\"type/Number\":{\"min\":-175.06667,\"q1\":-55.495929410727236,\"q3\":28.627359769389155,\"max\":176.21667,\"sd\":68.51011002740533,\"avg\":2.6042336031796345}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Category", + :table_id 1, + :coercion_strategy nil, + :database_indexed false, + :name "EVENT", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 17, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Event", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":11.3906}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/URL", + :table_id 1, + :coercion_strategy nil, + :database_indexed false, + :name "PAGE_URL", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 18, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Page URL", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":6,\"nil%\":0.1302},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":22.2674}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Category", + :table_id 1, + :coercion_strategy nil, + :database_indexed false, + :name "BUTTON_LABEL", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 19, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Button Label", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":6,\"nil%\":0.8698},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":1.0552}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 1, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 20, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required true, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/FK", + :table_id 1, + :coercion_strategy nil, + :database_indexed true, + :name "ACCOUNT_ID", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id 7, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 21, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Account ID", + :database_position 1, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":589,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "TIMESTAMP", + :semantic_type nil, + :table_id 1, + :coercion_strategy nil, + :database_indexed false, + :name "TIMESTAMP", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 22, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Timestamp", + :database_position 3, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":8576,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-03-15T00:18:25Z\",\"latest\":\"2022-04-11T20:24:02Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description nil, + :database_type "SMALLINT", + :semantic_type "type/Score", + :table_id 2, + :coercion_strategy nil, + :database_indexed false, + :name "RATING", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 23, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Rating", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":5,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":1.0,\"q1\":2.7545289729206877,\"q3\":4.004191340512663,\"max\":5.0,\"sd\":0.8137255616667736,\"avg\":3.3629283489096573}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 2, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 24, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required true, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/FK", + :table_id 2, + :coercion_strategy nil, + :database_indexed true, + :name "ACCOUNT_ID", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id 7, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 25, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Account ID", + :database_position 1, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":642,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Email", + :table_id 2, + :coercion_strategy nil, + :database_indexed false, + :name "EMAIL", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 26, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Email", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":642,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":1.0,\"percent-state\":0.0,\"average-length\":28.327102803738317}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER LARGE OBJECT", + :semantic_type nil, + :table_id 2, + :coercion_strategy nil, + :database_indexed false, + :name "BODY", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 27, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 6, + :visibility_type "normal", + :preview_display false, + :display_name "Body", + :database_position 6, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":642,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":438.15264797507785}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Category", + :table_id 2, + :coercion_strategy nil, + :database_indexed false, + :name "RATING_MAPPED", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 28, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Rating Mapped", + :database_position 5, + :database_required false, + :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\":6.453271028037383}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "TIMESTAMP", + :semantic_type nil, + :table_id 2, + :coercion_strategy nil, + :database_indexed false, + :name "DATE_RECEIVED", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 29, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Date Received", + :database_position 3, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":576,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2020-11-20T00:00:00Z\",\"latest\":\"2031-12-01T00:00:00Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description nil, + :database_type "CHARACTER VARYING", + :semantic_type "type/Category", + :table_id 7, + :coercion_strategy nil, + :database_indexed false, + :name "PLAN", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 30, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Plan", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":3,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":5.2931}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 7, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 31, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required true, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "BIGINT", + :semantic_type "type/FK", + :table_id 7, + :coercion_strategy nil, + :database_indexed true, + :name "ACCOUNT_ID", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id 7, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 32, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Account ID", + :database_position 1, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":1449,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description nil, + :database_type "TIMESTAMP", + :semantic_type nil, + :table_id 7, + :coercion_strategy nil, + :database_indexed false, + :name "DATE_RECEIVED", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 33, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Date Received", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":714,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2020-09-30T00:00:00Z\",\"latest\":\"2027-05-02T00:00:00Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description nil, + :database_type "DOUBLE PRECISION", + :semantic_type nil, + :table_id 7, + :coercion_strategy nil, + :database_indexed false, + :name "PAYMENT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 34, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Payment", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":707,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":13.7,\"q1\":233.1870107122195,\"q3\":400.5965814842149,\"max\":33714.6,\"sd\":763.7961603932441,\"avg\":519.4153400000004}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description nil, + :database_type "BOOLEAN", + :semantic_type "type/Category", + :table_id 7, + :coercion_strategy nil, + :database_indexed false, + :name "EXPECTED_INVOICE", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :custom_position 0, + :effective_type "type/Boolean", + :active true, + :nfc_path nil, + :parent_id nil, + :id 35, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Expected Invoice", + :database_position 3, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":2,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Boolean", + :points_of_interest nil} + {:description "Discount amount.", + :database_type "DOUBLE PRECISION", + :semantic_type "type/Discount", + :table_id 5, + :coercion_strategy nil, + :database_indexed false, + :name "DISCOUNT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.736796Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 36, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 6, + :visibility_type "normal", + :preview_display true, + :display_name "Discount", + :database_position 6, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":701,\"nil%\":0.898},\"type\":{\"type/Number\":{\"min\":0.17088996672584322,\"q1\":2.9786226681458743,\"q3\":7.338187788658235,\"max\":61.69684269960571,\"sd\":3.053663125001991,\"avg\":5.161255547580326}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description + "This is a unique ID for the product. It is also called the “Invoice number†or “Confirmation number†in customer facing emails and screens.", + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 5, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.726002Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 37, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment true, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required false, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description + "This is the amount of local and federal taxes that are collected on the purchase. Note that other governmental fees on some products are not included here, but instead are accounted for in the subtotal.", + :database_type "DOUBLE PRECISION", + :semantic_type nil, + :table_id 5, + :coercion_strategy nil, + :database_indexed false, + :name "TAX", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.716247Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 38, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Tax", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":797,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":0.0,\"q1\":2.273340386603857,\"q3\":5.337275338216307,\"max\":11.12,\"sd\":2.3206651358900316,\"avg\":3.8722100000000004}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description "Number of products bought.", + :database_type "INTEGER", + :semantic_type "type/Quantity", + :table_id 5, + :coercion_strategy nil, + :database_indexed false, + :name "QUANTITY", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.732699Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 39, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 8, + :visibility_type "normal", + :preview_display true, + :display_name "Quantity", + :database_position 8, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":62,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":0.0,\"q1\":1.755882607764982,\"q3\":4.882654507928044,\"max\":100.0,\"sd\":4.214258386403798,\"avg\":3.7015}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil} + {:description "The product ID. This is an internal identifier for the product, NOT the SKU.", + :database_type "INTEGER", + :semantic_type "type/FK", + :table_id 5, + :coercion_strategy nil, + :database_indexed true, + :name "PRODUCT_ID", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id 62, + :updated_at #t "2024-04-11T12:41:26.705647Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 40, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Product ID", + :database_position 2, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":200,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil} + {:description "The date and time an order was submitted.", + :database_type "TIMESTAMP", + :semantic_type "type/CreationTimestamp", + :table_id 5, + :coercion_strategy nil, + :database_indexed false, + :name "CREATED_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.739781Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 41, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 7, + :visibility_type "normal", + :preview_display true, + :display_name "Created At", + :database_position 7, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description "The total billed amount.", + :database_type "DOUBLE PRECISION", + :semantic_type nil, + :table_id 5, + :coercion_strategy nil, + :database_indexed false, + :name "TOTAL", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.719186Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 42, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Total", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":4426,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":8.93914247937167,\"q1\":51.34535490743823,\"q3\":110.29428389265787,\"max\":159.34900526552292,\"sd\":34.26469575709948,\"avg\":80.35871658771228}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description + "The id of the user who made this order. Note that in some cases where an order was created on behalf of a customer who phoned the order in, this might be the employee who handled the request.", + :database_type "INTEGER", + :semantic_type "type/FK", + :table_id 5, + :coercion_strategy nil, + :database_indexed true, + :name "USER_ID", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id 46, + :updated_at #t "2024-04-11T12:41:26.729187Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 43, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "User ID", + :database_position 1, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":929,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil} + {:description + "The raw, pre-tax cost of the order. Note that this might be different in the future from the product price due to promotions, credits, etc.", + :database_type "DOUBLE PRECISION", + :semantic_type nil, + :table_id 5, + :coercion_strategy nil, + :database_indexed false, + :name "SUBTOTAL", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.712183Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 44, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Subtotal", + :database_position 3, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":340,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":15.691943673970439,\"q1\":49.74894519060184,\"q3\":105.42965746993103,\"max\":148.22900526552291,\"sd\":32.53705013056317,\"avg\":77.01295465356547}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description + "The channel through which we acquired this user. Valid values include: Affiliate, Facebook, Google, Organic and Twitter", + :database_type "CHARACTER VARYING", + :semantic_type "type/Source", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "SOURCE", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.771246Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 45, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 8, + :visibility_type "normal", + :preview_display true, + :display_name "Source", + :database_position 8, + :database_required false, + :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\":7.4084}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "A unique identifier given to each user.", + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 3, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.779523Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 46, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment true, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required false, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description "The name of the user who owns an account", + :database_type "CHARACTER VARYING", + :semantic_type "type/Name", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "NAME", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.756198Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 47, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Name", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2499,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":13.532}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The state or province of the account’s billing address", + :database_type "CHARACTER", + :semantic_type "type/State", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "STATE", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.768935Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 48, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 7, + :visibility_type "normal", + :preview_display true, + :display_name "State", + :database_position 7, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":49,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":1.0,\"average-length\":2.0}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The date of birth of the user", + :database_type "DATE", + :semantic_type nil, + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "BIRTH_DATE", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.773847Z", + :custom_position 0, + :effective_type "type/Date", + :active true, + :nfc_path nil, + :parent_id nil, + :id 49, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 9, + :visibility_type "normal", + :preview_display true, + :display_name "Birth Date", + :database_position 9, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2308,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"1958-04-26\",\"latest\":\"2000-04-03\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Date", + :points_of_interest nil} + {:description + "This is the longitude of the user on sign-up. It might be updated in the future to the last seen location.", + :database_type "DOUBLE PRECISION", + :semantic_type "type/Longitude", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "LONGITUDE", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.765587Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 50, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 6, + :visibility_type "normal", + :preview_display true, + :display_name "Longitude", + :database_position 6, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2491,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":-166.5425726,\"q1\":-101.58350792373135,\"q3\":-84.65289348288829,\"max\":-67.96735199999999,\"sd\":15.399698968175663,\"avg\":-95.18741780363999}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description "The contact email for the account.", + :database_type "CHARACTER VARYING", + :semantic_type "type/Email", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "EMAIL", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.748893Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 51, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Email", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":1.0,\"percent-state\":0.0,\"average-length\":24.1824}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The street address of the account’s billing address", + :database_type "CHARACTER VARYING", + :semantic_type nil, + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "ADDRESS", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.746315Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 52, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Address", + :database_position 1, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2490,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":20.85}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "This is the salted password of the user. It should not be visible", + :database_type "CHARACTER VARYING", + :semantic_type nil, + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "PASSWORD", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.753313Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 53, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Password", + :database_position 3, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":36.0}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The postal code of the account’s billing address", + :database_type "CHARACTER", + :semantic_type "type/ZipCode", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "ZIP", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.848536Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 54, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 10, + :visibility_type "normal", + :preview_display true, + :display_name "Zip", + :database_position 10, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2234,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":5.0}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The city of the account’s billing address", + :database_type "CHARACTER VARYING", + :semantic_type "type/City", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "CITY", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.759886Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 55, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "City", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":1966,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.002,\"average-length\":8.284}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The date the user record was created. Also referred to as the user’s \"join date\"", + :database_type "TIMESTAMP", + :semantic_type "type/CreationTimestamp", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "CREATED_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.784647Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 56, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 12, + :visibility_type "normal", + :preview_display true, + :display_name "Created At", + :database_position 12, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-19T21:35:18.752Z\",\"latest\":\"2025-04-19T14:06:27.3Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description + "This is the latitude of the user on sign-up. It might be updated in the future to the last seen location.", + :database_type "DOUBLE PRECISION", + :semantic_type "type/Latitude", + :table_id 3, + :coercion_strategy nil, + :database_indexed false, + :name "LATITUDE", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.781886Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 57, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 11, + :visibility_type "normal", + :preview_display true, + :display_name "Latitude", + :database_position 11, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":2491,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":25.775827,\"q1\":35.302705923023126,\"q3\":43.773802584662,\"max\":70.6355001,\"sd\":6.390832341883712,\"avg\":39.87934670484002}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description "The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget", + :database_type "CHARACTER VARYING", + :semantic_type "type/Category", + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "CATEGORY", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.789290Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 58, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Category", + :database_position 3, + :database_required false, + :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\":6.375}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description + "The list price of the product. Note that this is not always the price the product sold for due to discounts, promotions, etc.", + :database_type "DOUBLE PRECISION", + :semantic_type nil, + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "PRICE", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.804265Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 59, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Price", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":170,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":15.691943673970439,\"q1\":37.25154462926434,\"q3\":75.45898071609447,\"max\":98.81933684368194,\"sd\":21.711481557852057,\"avg\":55.74639966792074}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description "The source of the product.", + :database_type "CHARACTER VARYING", + :semantic_type "type/Company", + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "VENDOR", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.812925Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 60, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Vendor", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":200,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":20.6}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The average rating users have given the product. This ranges from 1 - 5", + :database_type "DOUBLE PRECISION", + :semantic_type "type/Score", + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "RATING", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.807683Z", + :custom_position 0, + :effective_type "type/Float", + :active true, + :nfc_path nil, + :parent_id nil, + :id 61, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 6, + :visibility_type "normal", + :preview_display true, + :display_name "Rating", + :database_position 6, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":23,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":0.0,\"q1\":3.5120465053408525,\"q3\":4.216124969497314,\"max\":5.0,\"sd\":1.3605488657451452,\"avg\":3.4715}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Float", + :points_of_interest nil} + {:description + "The numerical product number. Only used internally. All external communication should use the title or EAN.", + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 8, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.798389Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 62, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment true, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required false, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description "The international article number. A 13 digit number uniquely identifying the product.", + :database_type "CHARACTER", + :semantic_type nil, + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "EAN", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.794637Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 63, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Ean", + :database_position 1, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":200,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":13.0}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The date the product was added to our catalog.", + :database_type "TIMESTAMP", + :semantic_type "type/CreationTimestamp", + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "CREATED_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.792161Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 64, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 7, + :visibility_type "normal", + :preview_display true, + :display_name "Created At", + :database_position 7, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":200,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-26T19:29:55.147Z\",\"latest\":\"2025-04-15T13:34:19.931Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description "The name of the product as it should be displayed to customers.", + :database_type "CHARACTER VARYING", + :semantic_type "type/Title", + :table_id 8, + :coercion_strategy nil, + :database_indexed false, + :name "TITLE", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.810462Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 65, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Title", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":199,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":21.495}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The rating (on a scale of 1-5) the user left.", + :database_type "SMALLINT", + :semantic_type "type/Score", + :table_id 4, + :coercion_strategy nil, + :database_indexed false, + :name "RATING", + :fingerprint_version 5, + :has_field_values "auto-list", + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.840249Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 66, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 3, + :visibility_type "normal", + :preview_display true, + :display_name "Rating", + :database_position 3, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":5,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":1.0,\"q1\":3.54744353181696,\"q3\":4.764807071650455,\"max\":5.0,\"sd\":1.0443899855660577,\"avg\":3.987410071942446}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil} + {:description "The review the user left. Limited to 2000 characters.", + :database_type "CHARACTER VARYING", + :semantic_type "type/Description", + :table_id 4, + :coercion_strategy nil, + :database_indexed false, + :name "BODY", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.852069Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 67, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 4, + :visibility_type "normal", + :preview_display true, + :display_name "Body", + :database_position 4, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":1112,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":177.41996402877697}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "A unique internal identifier for the review. Should not be used externally.", + :database_type "BIGINT", + :semantic_type "type/PK", + :table_id 4, + :coercion_strategy nil, + :database_indexed true, + :name "ID", + :fingerprint_version 0, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.831020Z", + :custom_position 0, + :effective_type "type/BigInteger", + :active true, + :nfc_path nil, + :parent_id nil, + :id 68, + :last_analyzed nil, + :database_partitioned nil, + :database_is_auto_increment true, + :json_unfolding false, + :position 0, + :visibility_type "normal", + :preview_display true, + :display_name "ID", + :database_position 0, + :database_required false, + :fingerprint nil, + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/BigInteger", + :points_of_interest nil} + {:description "The day and time a review was written by a user.", + :database_type "TIMESTAMP", + :semantic_type "type/CreationTimestamp", + :table_id 4, + :coercion_strategy nil, + :database_indexed false, + :name "CREATED_AT", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.825635Z", + :custom_position 0, + :effective_type "type/DateTime", + :active true, + :nfc_path nil, + :parent_id nil, + :id 69, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 5, + :visibility_type "normal", + :preview_display true, + :display_name "Created At", + :database_position 5, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":1112,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-06-03T00:37:05.818Z\",\"latest\":\"2026-04-19T14:15:25.677Z\"}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/DateTime", + :points_of_interest nil} + {:description "The user who left the review", + :database_type "CHARACTER VARYING", + :semantic_type nil, + :table_id 4, + :coercion_strategy nil, + :database_indexed false, + :name "REVIEWER", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id nil, + :updated_at #t "2024-04-11T12:41:26.844636Z", + :custom_position 0, + :effective_type "type/Text", + :active true, + :nfc_path nil, + :parent_id nil, + :id 70, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 2, + :visibility_type "normal", + :preview_display true, + :display_name "Reviewer", + :database_position 2, + :database_required false, + :fingerprint + "{\"global\":{\"distinct-count\":1076,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.001798561151079137,\"average-length\":9.972122302158274}}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Text", + :points_of_interest nil} + {:description "The product the review was for", + :database_type "INTEGER", + :semantic_type "type/FK", + :table_id 4, + :coercion_strategy nil, + :database_indexed true, + :name "PRODUCT_ID", + :fingerprint_version 5, + :has_field_values nil, + :settings nil, + :caveats nil, + :fk_target_field_id 62, + :updated_at #t "2024-04-11T12:41:26.835319Z", + :custom_position 0, + :effective_type "type/Integer", + :active true, + :nfc_path nil, + :parent_id nil, + :id 71, + :last_analyzed #t "2024-04-11T12:41:25.429317Z", + :database_partitioned nil, + :database_is_auto_increment false, + :json_unfolding false, + :position 1, + :visibility_type "normal", + :preview_display true, + :display_name "Product ID", + :database_position 1, + :database_required false, + :fingerprint "{\"global\":{\"distinct-count\":176,\"nil%\":0.0}}", + :created_at #t "2024-04-11T12:41:25.429317Z", + :base_type "type/Integer", + :points_of_interest nil}), + :report_card + ({:cache_invalidated_at nil, + :description "Compares the total number of orders placed for this product this month with the previous period", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Quantity\",\"semantic_type\":\"type/Quantity\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":7,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":1.0,\"q1\":3.25,\"q3\":6.0,\"max\":74.0,\"sd\":22.086949389477336,\"avg\":11.5}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Aerodynamic Copper Knife trend", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.887027Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",39,{\"base-type\":\"type/Integer\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}]],\"source-table\":5,\"filter\":[\"and\",[\"between\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],\"2021-01-01\",\"2024-01-23\"],[\"=\",[\"field\",62,{\"base-type\":\"type/BigInteger\",\"source-field\":40}],165]]}}", + :id 1, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "oShRjudlgUvJRezvGTQTD", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description nil, + :archived false, + :collection_position 1, + :table_id 5, + :result_metadata + "[{\"description\":\"This is a unique ID for the product. It is also called the “Invoice number†or “Confirmation number†in customer facing emails and screens.\",\"semantic_type\":\"type/PK\",\"coercion_strategy\":null,\"name\":\"ID\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",37,null],\"effective_type\":\"type/BigInteger\",\"id\":37,\"visibility_type\":\"normal\",\"display_name\":\"ID\",\"fingerprint\":null,\"base_type\":\"type/BigInteger\"},{\"description\":\"The id of the user who made this order. Note that in some cases where an order was created on behalf of a customer who phoned the order in, this might be the employee who handled the request.\",\"semantic_type\":\"type/FK\",\"coercion_strategy\":null,\"name\":\"USER_ID\",\"settings\":null,\"fk_target_field_id\":46,\"field_ref\":[\"field\",43,null],\"effective_type\":\"type/Integer\",\"id\":43,\"visibility_type\":\"normal\",\"display_name\":\"User ID\",\"fingerprint\":{\"global\":{\"distinct-count\":929,\"nil%\":0}},\"base_type\":\"type/Integer\"},{\"description\":\"The product ID. This is an internal identifier for the product, NOT the SKU.\",\"semantic_type\":\"type/FK\",\"coercion_strategy\":null,\"name\":\"PRODUCT_ID\",\"settings\":null,\"fk_target_field_id\":62,\"field_ref\":[\"field\",40,null],\"effective_type\":\"type/Integer\",\"id\":40,\"visibility_type\":\"normal\",\"display_name\":\"Product ID\",\"fingerprint\":{\"global\":{\"distinct-count\":200,\"nil%\":0}},\"base_type\":\"type/Integer\"},{\"description\":\"The raw, pre-tax cost of the order. Note that this might be different in the future from the product price due to promotions, credits, etc.\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"SUBTOTAL\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",44,null],\"effective_type\":\"type/Float\",\"id\":44,\"visibility_type\":\"normal\",\"display_name\":\"Subtotal\",\"fingerprint\":{\"global\":{\"distinct-count\":340,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":15.691943673970439,\"q1\":49.74894519060184,\"q3\":105.42965746993103,\"max\":148.22900526552291,\"sd\":32.53705013056317,\"avg\":77.01295465356547}}},\"base_type\":\"type/Float\"},{\"description\":\"This is the amount of local and federal taxes that are collected on the purchase. Note that other governmental fees on some products are not included here, but instead are accounted for in the subtotal.\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"TAX\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",38,null],\"effective_type\":\"type/Float\",\"id\":38,\"visibility_type\":\"normal\",\"display_name\":\"Tax\",\"fingerprint\":{\"global\":{\"distinct-count\":797,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":0,\"q1\":2.273340386603857,\"q3\":5.337275338216307,\"max\":11.12,\"sd\":2.3206651358900316,\"avg\":3.8722100000000004}}},\"base_type\":\"type/Float\"},{\"description\":\"The total billed amount.\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"TOTAL\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",42,null],\"effective_type\":\"type/Float\",\"id\":42,\"visibility_type\":\"normal\",\"display_name\":\"Total\",\"fingerprint\":{\"global\":{\"distinct-count\":4426,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":8.93914247937167,\"q1\":51.34535490743823,\"q3\":110.29428389265787,\"max\":159.34900526552292,\"sd\":34.26469575709948,\"avg\":80.35871658771228}}},\"base_type\":\"type/Float\"},{\"description\":\"Discount amount.\",\"semantic_type\":\"type/Discount\",\"coercion_strategy\":null,\"name\":\"DISCOUNT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",36,null],\"effective_type\":\"type/Float\",\"id\":36,\"visibility_type\":\"normal\",\"display_name\":\"Discount\",\"fingerprint\":{\"global\":{\"distinct-count\":701,\"nil%\":0.898},\"type\":{\"type/Number\":{\"min\":0.17088996672584322,\"q1\":2.9786226681458743,\"q3\":7.338187788658235,\"max\":61.69684269960571,\"sd\":3.053663125001991,\"avg\":5.161255547580326}}},\"base_type\":\"type/Float\"},{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"default\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"temporal-unit\":\"default\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"description\":\"Number of products bought.\",\"semantic_type\":\"type/Quantity\",\"coercion_strategy\":null,\"name\":\"QUANTITY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",39,null],\"effective_type\":\"type/Integer\",\"id\":39,\"visibility_type\":\"normal\",\"display_name\":\"Quantity\",\"fingerprint\":{\"global\":{\"distinct-count\":62,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":0,\"q1\":1.755882607764982,\"q3\":4.882654507928044,\"max\":100,\"sd\":4.214258386403798,\"avg\":3.7015}}},\"base_type\":\"type/Integer\"},{\"display_name\":\"Age\",\"field_ref\":[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\"}],\"name\":\"Age\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":24,\"q1\":33.36752836803635,\"q3\":55.20362176071121,\"max\":65,\"sd\":12.063315373018085,\"avg\":44.572}}},\"semantic_type\":null}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Orders with People", + :type "model", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"expressions\":{\"Age\":[\"datetime-diff\",[\"field\",49,{\"base-type\":\"type/Date\",\"join-alias\":\"People - User\"}],[\"now\"],\"year\"]},\"joins\":[{\"alias\":\"People - User\",\"strategy\":\"left-join\",\"condition\":[\"=\",[\"field\",43,{\"base-type\":\"type/Integer\"}],[\"field\",46,{\"base-type\":\"type/BigInteger\",\"join-alias\":\"People - User\"}]],\"source-table\":3}],\"source-table\":5}}", + :id 2, + :parameter_mappings "[]", + :display "table", + :entity_id "hjNoawcRfsDrC32g7LSOE", + :collection_preview true, + :visualization_settings + "{\"table.column_widths\":[null,null,null,null,null,null,null,null,null,164],\"graph.show_values\":true,\"table.cell_column\":\"SUBTOTAL\",\"graph.series_order_dimension\":null,\"graph.metrics\":[],\"graph.series_order\":null,\"table.pivot_column\":\"Age\",\"graph.dimensions\":[\"Age\"],\"stackable.stack_type\":\"stacked\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows the revenue distributed by age group", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"field_ref\":[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10,\"min-value\":20.0,\"max-value\":65.0,\"bin-width\":5.0}}],\"base_type\":\"type/BigInteger\",\"name\":\"Age\",\"effective_type\":\"type/BigInteger\",\"display_name\":\"Age\",\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":24,\"q1\":33.36752836803635,\"q3\":55.20362176071121,\"max\":65,\"sd\":12.063315373018085,\"avg\":44.572}}},\"binning_info\":{\"num_bins\":10,\"min_value\":20.0,\"max_value\":65.0,\"bin_width\":5.0,\"binning_strategy\":\"num-bins\"},\"source\":\"breakout\"},{\"base_type\":\"type/Float\",\"name\":\"sum\",\"display_name\":\"Sum of Total\",\"source\":\"aggregation\",\"field_ref\":[\"aggregation\",0],\"aggregation_index\":0}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Revenue per age group", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",\"TOTAL\",{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10}}]],\"source-table\":\"card__2\"}}", + :id 3, + :parameter_mappings "[]", + :display "bar", + :entity_id "rqxxsDv8zhSBXgJmVjyWa", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\"],\"graph.metrics\":[\"sum\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"stackable.stack_type\":\"stacked\",\"table.cell_column\":\"SUBTOTAL\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows a distribution of our customers in age groups", + :archived false, + :collection_position nil, + :table_id 3, + :result_metadata + "[{\"display_name\":\"Age\",\"field_ref\":[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10,\"min-value\":20,\"max-value\":65,\"bin-width\":5}}],\"name\":\"Age\",\"base_type\":\"type/Decimal\",\"effective_type\":\"type/Decimal\",\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":24,\"q1\":33.340572873934306,\"q3\":55.17166516756599,\"max\":65,\"sd\":12.263883782175668,\"avg\":44.434}}},\"semantic_type\":null},{\"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\":9,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":61,\"q1\":270,\"q3\":304,\"max\":334,\"sd\":99.91663191547909,\"avg\":250}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Buyers by age group", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10}}]],\"source-table\":\"card__27\"}}", + :id 4, + :parameter_mappings "[]", + :display "bar", + :entity_id "qj0jT7SXwEUezz1wSjtaZ", + :collection_preview true, + :visualization_settings + "{\"graph.dimensions\":[\"Age\"],\"series_settings\":{\"count\":{\"color\":\"#A989C5\"}},\"graph.series_order_dimension\":null,\"graph.series_order\":null,\"graph.metrics\":[\"count\"],\"graph.y_axis.title_text\":\"Buyers\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the total number of orders placed for this product this month with the previous period", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Quantity\",\"semantic_type\":\"type/Quantity\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":7,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":1.0,\"q1\":2.5,\"q3\":9.414213562373096,\"max\":10.0,\"sd\":3.693623849670827,\"avg\":5.75}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Heavy-Duty Silk Chair trend", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.888114Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",39,{\"base-type\":\"type/Integer\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}]],\"source-table\":5,\"filter\":[\"and\",[\"between\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],\"2021-01-01\",\"2024-01-23\"],[\"=\",[\"field\",62,{\"base-type\":\"type/BigInteger\",\"source-field\":40}],86]]}}", + :id 5, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "nhFZBIIZA_KnK6RuLp36z", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Breaks down the overall performance of each of the product categories", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":58,\"visibility_type\":\"normal\",\"display_name\":\"Product → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\"},{\"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.0},\"type\":{\"type/Number\":{\"min\":3976.0,\"q1\":4380.0,\"q3\":5000.0,\"max\":5061.0,\"sd\":489.3103990992493,\"avg\":4690.0}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Total orders by category", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.804222Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}]],\"source-table\":5}}", + :id 6, + :parameter_mappings "[]", + :display "pie", + :entity_id "1aVGgD6-onGIPUeWCLiMA", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"pie.colors\":{\"Doohickey\":\"#7172AD\",\"Gadget\":\"#A989C5\",\"Gizmo\":\"#C7EAEA\",\"Widget\":\"#227FD2\"}}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description nil, + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":58,\"visibility_type\":\"normal\",\"display_name\":\"Product → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\"},{\"display_name\":\"Sum of Subtotal\",\"semantic_type\":null,\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":93,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":49.535942579421324,\"q1\":1576.1156909160813,\"q3\":5008.064005433067,\"max\":9916.756091906076,\"sd\":2607.627182107555,\"avg\":3702.8891825614783}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Value of orders over time (before taxes)", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:22.050973Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",44,{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-24,\"month\"]}}", + :id 7, + :parameter_mappings "[]", + :display "bar", + :entity_id "f9RqS8HspKvcsGEH24_Af", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"CREATED_AT\",\"CATEGORY\"],\"graph.metrics\":[\"sum\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"stackable.stack_type\":\"stacked\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the total number of orders placed for this product this month with the previous period", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Quantity\",\"semantic_type\":\"type/Quantity\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":11,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":3.0,\"q1\":4.76393202250021,\"q3\":17.0,\"max\":21.0,\"sd\":6.199964551476116,\"avg\":10.142857142857142}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Enormous Wool Car trend", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.886267Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",39,{\"base-type\":\"type/Integer\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}]],\"source-table\":5,\"filter\":[\"and\",[\"between\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],\"2021-01-01\",\"2024-01-23\"],[\"=\",[\"field\",62,{\"base-type\":\"type/BigInteger\",\"source-field\":40}],17]]}}", + :id 8, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "BP4o72CSvPOTLe5Nk6twf", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description nil, + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The state or province of the account’s billing address\",\"semantic_type\":\"type/State\",\"coercion_strategy\":null,\"name\":\"STATE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",48,{\"base-type\":\"type/Text\",\"source-field\":43}],\"effective_type\":\"type/Text\",\"id\":48,\"visibility_type\":\"normal\",\"display_name\":\"User → State\",\"fingerprint\":{\"global\":{\"distinct-count\":49,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":1.0,\"average-length\":2.0}}},\"base_type\":\"type/Text\"},{\"display_name\":\"Sum of Total\",\"semantic_type\":null,\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":48,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":1358.6880585850759,\"q1\":14606.102496036605,\"q3\":45423.71594332504,\"max\":108466.5974651383,\"sd\":21267.69039176716,\"avg\":31471.285063554824}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Revenue by state", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:55.320716Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",42,{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"field\",48,{\"base-type\":\"type/Text\",\"source-field\":43}]],\"source-table\":5}}", + :id 9, + :parameter_mappings "[]", + :display "map", + :entity_id "hBnes5i3LGSYZeoGIYwvm", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"map.colors\":[\"#e5e5f1\",\"#c0c0da\",\"#9b9cc3\",\"#7677ab\",\"hsl(239, 29.5%, 39.3%)\"]}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows a distribution of orders broken down by source across our customers' age groups", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"field_ref\":[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10,\"min-value\":20.0,\"max-value\":65.0,\"bin-width\":5.0}}],\"base_type\":\"type/BigInteger\",\"name\":\"Age\",\"effective_type\":\"type/BigInteger\",\"display_name\":\"Age\",\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":24,\"q1\":33.36752836803635,\"q3\":55.20362176071121,\"max\":65,\"sd\":12.063315373018085,\"avg\":44.572}}},\"binning_info\":{\"num_bins\":10,\"min_value\":20.0,\"max_value\":65.0,\"bin_width\":5.0,\"binning_strategy\":\"num-bins\"},\"source\":\"breakout\"},{\"description\":\"The channel through which we acquired this user. Valid values include: Affiliate, Facebook, Google, Organic and Twitter\",\"semantic_type\":\"type/Source\",\"table_id\":3,\"coercion_strategy\":null,\"name\":\"SOURCE\",\"settings\":null,\"source\":\"breakout\",\"fk_target_field_id\":null,\"field_ref\":[\"field\",45,{\"base-type\":\"type/Text\",\"join-alias\":\"People - User\"}],\"effective_type\":\"type/Text\",\"nfc_path\":null,\"parent_id\":null,\"id\":45,\"position\":8,\"visibility_type\":\"normal\",\"display_name\":\"People - User → Source\",\"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\":7.4084}}},\"base_type\":\"type/Text\",\"source_alias\":\"People - User\"},{\"base_type\":\"type/Integer\",\"name\":\"count\",\"display_name\":\"Count\",\"semantic_type\":\"type/Quantity\",\"source\":\"aggregation\",\"field_ref\":[\"aggregation\",0],\"aggregation_index\":0}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Orders by source per age group", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10}}],[\"field\",45,{\"base-type\":\"type/Text\",\"join-alias\":\"People - User\"}]],\"joins\":[{\"alias\":\"People - User\",\"fields\":\"all\",\"strategy\":\"left-join\",\"condition\":[\"=\",[\"field\",\"USER_ID\",{\"base-type\":\"type/Integer\"}],[\"field\",46,{\"base-type\":\"type/BigInteger\",\"join-alias\":\"People - User\"}]],\"source-table\":3}],\"source-table\":\"card__2\"}}", + :id 10, + :parameter_mappings "[]", + :display "bar", + :entity_id "t1rQijQdCIZoQI6bhwBEG", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"SOURCE\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"graph.x_axis.axis_enabled\":true,\"graph.x_axis.labels_enabled\":true,\"graph.x_axis.scale\":\"ordinal\",\"graph.y_axis.auto_range\":true,\"stackable.stack_type\":\"stacked\",\"table.cell_column\":\"SUBTOTAL\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows a distribution of orders broken down by product categories across our customers' age groups", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"field_ref\":[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10,\"min-value\":20.0,\"max-value\":65.0,\"bin-width\":5.0}}],\"base_type\":\"type/BigInteger\",\"name\":\"Age\",\"effective_type\":\"type/BigInteger\",\"display_name\":\"Age\",\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0},\"type\":{\"type/Number\":{\"min\":24,\"q1\":33.36752836803635,\"q3\":55.20362176071121,\"max\":65,\"sd\":12.063315373018085,\"avg\":44.572}}},\"binning_info\":{\"num_bins\":10,\"min_value\":20.0,\"max_value\":65.0,\"bin_width\":5.0,\"binning_strategy\":\"num-bins\"},\"source\":\"breakout\"},{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"table_id\":8,\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"source\":\"breakout\",\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"join-alias\":\"Products\"}],\"effective_type\":\"type/Text\",\"nfc_path\":null,\"parent_id\":null,\"id\":58,\"position\":3,\"visibility_type\":\"normal\",\"display_name\":\"Products → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\",\"source_alias\":\"Products\"},{\"base_type\":\"type/Integer\",\"name\":\"count\",\"display_name\":\"Count\",\"semantic_type\":\"type/Quantity\",\"source\":\"aggregation\",\"field_ref\":[\"aggregation\",0],\"aggregation_index\":0}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Product category orders per age group", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",\"Age\",{\"base-type\":\"type/BigInteger\",\"binning\":{\"strategy\":\"num-bins\",\"num-bins\":10}}],[\"field\",58,{\"base-type\":\"type/Text\",\"join-alias\":\"Products\"}]],\"joins\":[{\"alias\":\"Products\",\"fields\":\"all\",\"strategy\":\"left-join\",\"condition\":[\"=\",[\"field\",\"PRODUCT_ID\",{\"base-type\":\"type/Integer\"}],[\"field\",62,{\"base-type\":\"type/BigInteger\",\"join-alias\":\"Products\"}]],\"source-table\":8}],\"source-table\":\"card__2\"}}", + :id 11, + :parameter_mappings "[]", + :display "bar", + :entity_id "avC199ZiYvp1aIWdejfFf", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"graph.x_axis.axis_enabled\":true,\"graph.x_axis.labels_enabled\":true,\"graph.x_axis.scale\":\"ordinal\",\"graph.y_axis.auto_range\":true,\"stackable.stack_type\":\"stacked\",\"table.cell_column\":\"SUBTOTAL\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Matches the cumulative revenue month over month with the number of orders placed each month", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Total\",\"semantic_type\":null,\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":24,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":52.75594257942132,\"q1\":6537.468109917218,\"q3\":19847.25662541695,\"max\":38569.69761756364,\"sd\":10973.472051457778,\"avg\":14938.922863647924}}}},{\"display_name\":\"Sum of Quantity\",\"semantic_type\":\"type/Quantity\",\"settings\":null,\"field_ref\":[\"aggregation\",1],\"name\":\"sum_2\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":24,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":2.0,\"q1\":321.0,\"q3\":1205.5,\"max\":2260.0,\"sd\":647.3464173516148,\"avg\":821.9166666666666}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Revenue and orders over time", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:22.045030Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",42,{\"base-type\":\"type/Float\"}]],[\"sum\",[\"field\",39,{\"base-type\":\"type/Integer\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-24,\"month\"]}}", + :id 12, + :parameter_mappings "[]", + :display "combo", + :entity_id "evd6f3MoDUtTNsoXHwu0T", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"CREATED_AT\"],\"graph.metrics\":[\"sum\",\"sum_2\"],\"graph.show_trendline\":false,\"graph.x_axis.title_text\":\"Orders date\",\"graph.y_axis.title_text\":\"Revenue\",\"series_settings\":{\"sum\":{\"display\":\"line\",\"line.interpolate\":\"linear\",\"line.marker_enabled\":false,\"show_series_values\":true,\"title\":\"Revenue\"},\"sum_2\":{\"color\":\"#51528D\",\"title\":\"Number of orders\"}}}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the current total in revenue with the set goal for the quarter", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"display_name\":\"Cumulative sum of Total\",\"semantic_type\":null,\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":1,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":123889.60365320997,\"q1\":123889.60365320997,\"q3\":123889.60365320997,\"max\":123889.60365320997,\"sd\":null,\"avg\":123889.60365320997}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Revenue goal for this quarter", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:08.602754Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"cum-sum\",[\"field\",42,{\"base-type\":\"type/Float\"}]]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],\"current\",\"quarter\"]}}", + :id 13, + :parameter_mappings "[]", + :display "progress", + :entity_id "Bkb4GEr5dH2_LbDOKhObR", + :collection_preview true, + :visualization_settings "{\"column_settings\":null,\"progress.goal\":120000}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the orders of each category quarter over quarter", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":58,\"visibility_type\":\"normal\",\"display_name\":\"Product → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\"},{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"quarter\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"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\":31,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":13.0,\"q1\":72.5,\"q3\":262.5,\"max\":338.0,\"sd\":106.66460851509004,\"avg\":176.875}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Numbers of orders by category per quarter", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.819884Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-24,\"month\"]}}", + :id 14, + :parameter_mappings "[]", + :display "line", + :entity_id "NdqehUq98ebQ4H_-1d9v3", + :collection_preview true, + :visualization_settings + "{\"graph.dimensions\":[\"CREATED_AT\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"table.pivot_column\":\"CATEGORY\",\"table.cell_column\":\"count\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the total revenue this quarter with the previous period", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"quarter\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Total\",\"semantic_type\":null,\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":2,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":67863.39650548704,\"q1\":67863.39650548704,\"q3\":111121.25780141751,\"max\":111121.25780141751,\"sd\":30587.92706197953,\"avg\":89492.32715345226}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Revenue per quarter", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:08.640172Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",42,{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-2,\"quarter\"]}}", + :id 15, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "d3KPtMfbe0IIK0MDrHTNn", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Orders placed per quarter broken down by source and formatted to highlight best and worst quarters", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The channel through which we acquired this user. Valid values include: Affiliate, Facebook, Google, Organic and Twitter\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"pivot-grouping\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"expression\",\"pivot-grouping\"],\"effective_type\":\"type/Text\",\"id\":45,\"visibility_type\":\"normal\",\"display_name\":\"pivot-grouping\",\"fingerprint\":{\"global\":{\"distinct-count\":1,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":3.0,\"q1\":3.0,\"q3\":3.0,\"max\":3.0,\"sd\":null,\"avg\":3.0}}},\"base_type\":\"type/Integer\"},{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"sum\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"aggregation\",0],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Sum of Subtotal\",\"fingerprint\":{\"global\":{\"distinct-count\":1,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":344368.6939782175,\"q1\":344368.6939782175,\"q3\":344368.6939782175,\"max\":344368.6939782175,\"sd\":null,\"avg\":344368.6939782175}}},\"base_type\":\"type/Float\"}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Orders according to sources per quarter", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:59.603468Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",44,{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"field\",45,{\"base-type\":\"type/Text\",\"source-field\":43}],[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-24,\"month\"]}}", + :id 16, + :parameter_mappings "[]", + :display "pivot", + :entity_id "-mfPjg0QOoIKbqJS0SYne", + :collection_preview true, + :visualization_settings + "{\"graph.dimensions\":[\"CREATED_AT\",\"SOURCE\"],\"graph.series_labels\":[null],\"pivot_table.column_split\":{\"columns\":[[\"field\",45,{\"base-type\":\"type/Text\",\"source-field\":43}]],\"rows\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}]],\"values\":[[\"aggregation\",0]]},\"pivot_table.column_widths\":{\"leftHeaderWidths\":[141],\"totalLeftHeaderWidths\":141,\"valueHeaderWidths\":{}},\"stackable.stack_type\":\"stacked\",\"table.column_formatting\":[{\"color\":\"#A7D07C\",\"columns\":[\"sum\"],\"highlight_row\":false,\"operator\":\">\",\"type\":\"single\",\"value\":20000}],\"graph.metrics\":[\"sum\"]}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description + "Shows a distribution of orders broken down by product category across our customers' individual age values", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"display_name\":\"Age\",\"field_ref\":[\"expression\",\"Age\"],\"name\":\"Age\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"semantic_type\":null,\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":24.0,\"q1\":34.0,\"q3\":55.0,\"max\":65.0,\"sd\":12.157154567810213,\"avg\":44.5}}}},{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":58,\"visibility_type\":\"normal\",\"display_name\":\"Product → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\"},{\"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\":85,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":56.0,\"q1\":93.94107481830802,\"q3\":126.27924077994388,\"max\":185.0,\"sd\":24.863409868135278,\"avg\":111.66666666666667}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Product category orders per individual age", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:55.441955Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"expression\",\"Age\",{\"base-type\":\"type/Integer\"}],[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}]],\"expressions\":{\"Age\":[\"datetime-diff\",[\"field\",49,{\"base-type\":\"type/Date\",\"join-alias\":\"People - User\"}],[\"now\"],\"year\"]},\"joins\":[{\"alias\":\"People - User\",\"strategy\":\"left-join\",\"condition\":[\"=\",[\"field\",43,{\"base-type\":\"type/Integer\"}],[\"field\",46,{\"base-type\":\"type/BigInteger\",\"join-alias\":\"People - User\"}]],\"source-table\":3}],\"source-table\":5}}", + :id 17, + :parameter_mappings "[]", + :display "bar", + :entity_id "P-shWkp5lozD2nuo5xusW", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"stackable.stack_type\":\"stacked\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the total discount given this quarter with the previous period", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"quarter\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Discount\",\"semantic_type\":\"type/Discount\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":2,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":738.5575011690233,\"q1\":738.5575011690233,\"q3\":795.9833992557524,\"max\":795.9833992557524,\"sd\":40.606241952853686,\"avg\":767.2704502123879}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Discount given per quarter", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:22.028156Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",36,{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"quarter\"}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-2,\"quarter\"]}}", + :id 18, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "wd1PEi_Z217Gr-ceeZSNj", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows the distribution of the product categories along the scale of customer ratings", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The average rating users have given the product. This ranges from 1 - 5\",\"semantic_type\":\"type/Score\",\"coercion_strategy\":null,\"name\":\"RATING\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",61,{\"base-type\":\"type/Float\",\"source-field\":40}],\"effective_type\":\"type/Float\",\"id\":61,\"visibility_type\":\"normal\",\"display_name\":\"Product → Rating\",\"fingerprint\":{\"global\":{\"distinct-count\":23,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":0.0,\"q1\":3.5120465053408525,\"q3\":4.216124969497314,\"max\":5.0,\"sd\":1.3605488657451452,\"avg\":3.4715}}},\"base_type\":\"type/Float\"},{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":58,\"visibility_type\":\"normal\",\"display_name\":\"Product → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\"},{\"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\":57,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":70.0,\"q1\":105.0,\"q3\":370.0,\"max\":1093.0,\"sd\":229.88812521865958,\"avg\":281.6060606060606}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Customer satisfaction per category", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.949918Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",61,{\"base-type\":\"type/Float\",\"source-field\":40}],[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}]],\"order-by\":[[\"desc\",[\"field\",61,{\"base-type\":\"type/Float\",\"source-field\":40}]]],\"source-table\":5,\"filter\":[\"!=\",[\"field\",65,{\"base-type\":\"type/Text\",\"source-field\":40}],\"Incredible Aluminum Knife\"]}}", + :id 19, + :parameter_mappings "[]", + :display "bar", + :entity_id "cO53DQ6k0DueW5Aglwp7Y", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"RATING\",\"CATEGORY\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.x_axis.title_text\":\"Products\",\"graph.y_axis.auto_range\":true,\"graph.y_axis.title_text\":\"total orders\",\"series_settings\":{\"count\":{\"color\":\"#999AC4\"}},\"stackable.stack_type\":\"stacked\",\"table.pivot\":false}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the total number of orders placed this month with the previous period", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The date and time an order was submitted.\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":41,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":10001,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-30T18:56:13.352Z\",\"latest\":\"2026-04-19T14:07:15.657Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Sum of Quantity\",\"semantic_type\":\"type/Quantity\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":2,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":487.0,\"q1\":487.0,\"q3\":696.0,\"max\":696.0,\"sd\":147.78531726798843,\"avg\":591.5}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Number of orders per month", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:08.626644Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",39,{\"base-type\":\"type/Integer\"}]]],\"breakout\":[[\"field\",41,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}]],\"source-table\":5,\"filter\":[\"time-interval\",[\"field\",41,{\"base-type\":\"type/DateTime\"}],-2,\"month\"]}}", + :id 20, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "OouzOUPGIjf6zXJsSDe0f", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows a distribution of orders broken down by source across our customers' individual age values", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"display_name\":\"Age\",\"field_ref\":[\"expression\",\"Age\"],\"name\":\"Age\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"semantic_type\":null,\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":24.0,\"q1\":34.0,\"q3\":55.0,\"max\":65.0,\"sd\":12.149881366699857,\"avg\":44.5}}}},{\"description\":\"The channel through which we acquired this user. Valid values include: Affiliate, Facebook, Google, Organic and Twitter\",\"semantic_type\":\"type/Source\",\"coercion_strategy\":null,\"name\":\"SOURCE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",45,{\"base-type\":\"type/Text\",\"join-alias\":\"People - User\"}],\"effective_type\":\"type/Text\",\"id\":45,\"visibility_type\":\"normal\",\"display_name\":\"People - User → Source\",\"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\":7.4084}}},\"base_type\":\"type/Text\"},{\"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\":109,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":13.0,\"q1\":62.210376013348366,\"q3\":110.44731472906851,\"max\":222.0,\"sd\":37.52978921105031,\"avg\":89.33333333333333}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Orders by source per individual age", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:55.703729Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"expression\",\"Age\",{\"base-type\":\"type/Integer\"}],[\"field\",45,{\"base-type\":\"type/Text\",\"join-alias\":\"People - User\"}]],\"expressions\":{\"Age\":[\"datetime-diff\",[\"field\",49,{\"base-type\":\"type/Date\",\"join-alias\":\"People - User\"}],[\"now\"],\"year\"]},\"joins\":[{\"alias\":\"People - User\",\"strategy\":\"left-join\",\"condition\":[\"=\",[\"field\",43,{\"base-type\":\"type/Integer\"}],[\"field\",46,{\"base-type\":\"type/BigInteger\",\"join-alias\":\"People - User\"}]],\"source-table\":3}],\"source-table\":5}}", + :id 21, + :parameter_mappings "[]", + :display "bar", + :entity_id "DDT6zuq6O7bsnw1UEWtQQ", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\",\"SOURCE\"],\"graph.metrics\":[\"count\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"stackable.stack_type\":\"stacked\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Indicates the average customer review of our products", + :archived false, + :collection_position nil, + :table_id 8, + :result_metadata + "[{\"display_name\":\"Average of Rating\",\"semantic_type\":\"type/Score\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"avg\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":1,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":3.4715,\"q1\":3.4715,\"q3\":3.4715,\"max\":3.4715,\"sd\":null,\"avg\":3.4715}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Average product rating overall", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.919815Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"avg\",[\"field\",61,{\"base-type\":\"type/Float\"}]]],\"source-table\":8}}", + :id 22, + :parameter_mappings "[]", + :display "gauge", + :entity_id "-BcEE22ptXyDOgUNRqyct", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"gauge.segments\":[{\"color\":\"#EF8C8C\",\"label\":\"awful\",\"max\":1,\"min\":0},{\"color\":\"#F2A86F\",\"label\":\"bad\",\"max\":2,\"min\":1},{\"color\":\"#F9D45C\",\"label\":\"alright\",\"max\":3,\"min\":2},{\"color\":\"#A7D07C\",\"label\":\"good\",\"max\":4,\"min\":3},{\"color\":\"#689636\",\"label\":\"great\",\"max\":5,\"min\":4}],\"table.cell_column\":\"avg\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "An ordered list of our most successful products", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The name of the product as it should be displayed to customers.\",\"semantic_type\":\"type/Title\",\"coercion_strategy\":null,\"name\":\"TITLE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",65,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":65,\"visibility_type\":\"normal\",\"display_name\":\"Product → Title\",\"fingerprint\":{\"global\":{\"distinct-count\":199,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":21.495}}},\"base_type\":\"type/Text\"},{\"description\":\"The type of product, valid values include: Doohicky, Gadget, Gizmo and Widget\",\"semantic_type\":\"type/Category\",\"coercion_strategy\":null,\"name\":\"CATEGORY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}],\"effective_type\":\"type/Text\",\"id\":58,\"visibility_type\":\"normal\",\"display_name\":\"Product → Category\",\"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\":6.375}}},\"base_type\":\"type/Text\"},{\"display_name\":\"Count\",\"semantic_type\":\"type/Quantity\",\"field_ref\":[\"field\",\"count\",{\"base-type\":\"type/Integer\"}],\"name\":\"count\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":8,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":109.0,\"q1\":109.36150801752578,\"q3\":117.41886116991581,\"max\":120.0,\"sd\":4.254710813035841,\"avg\":113.53846153846153}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Best selling products", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:57.933042Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"filter\":[\">\",[\"field\",\"count\",{\"base-type\":\"type/Integer\"}],108],\"source-query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",65,{\"base-type\":\"type/Text\",\"source-field\":40}],[\"field\",58,{\"base-type\":\"type/Text\",\"source-field\":40}]],\"order-by\":[[\"desc\",[\"aggregation\",0]]],\"source-table\":5,\"filter\":[\"!=\",[\"field\",65,{\"base-type\":\"type/Text\",\"source-field\":40}],\"Incredible Aluminum Knife\"]}}}", + :id 23, + :parameter_mappings "[]", + :display "row", + :entity_id "dsZMohGmK4P7eQRBdLFmb", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"TITLE\"],\"graph.metrics\":[\"count\"],\"graph.x_axis.title_text\":\"Products\",\"graph.y_axis.title_text\":\"total orders\",\"series_settings\":{\"count\":{\"color\":\"#999AC4\"}},\"table.pivot\":false}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Compares the number of unique customers placing orders this month with the previous period", + :archived false, + :collection_position nil, + :table_id 3, + :result_metadata + "[{\"description\":\"The date the user record was created. Also referred to as the user’s \\\"join date\\\"\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"month\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",56,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}],\"effective_type\":\"type/DateTime\",\"id\":56,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-19T21:35:18.752Z\",\"latest\":\"2025-04-19T14:06:27.3Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Distinct values of Name\",\"semantic_type\":\"type/Quantity\",\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"count\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":2,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":63.0,\"q1\":63.0,\"q3\":70.0,\"max\":70.0,\"sd\":4.949747468305833,\"avg\":66.5}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Unique customers per month", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:22.023666Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"distinct\",[\"field\",47,{\"base-type\":\"type/Text\"}]]],\"breakout\":[[\"field\",56,{\"base-type\":\"type/DateTime\",\"temporal-unit\":\"month\"}]],\"source-table\":3,\"filter\":[\"time-interval\",[\"field\",56,{\"base-type\":\"type/DateTime\"}],-2,\"month\"]}}", + :id 24, + :parameter_mappings "[]", + :display "smartscalar", + :entity_id "fPYpb3KcV2TJZLRw-L841", + :collection_preview true, + :visualization_settings "{\"column_settings\":null}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description "Shows a distribution of revenue per individual age values", + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"display_name\":\"Age\",\"field_ref\":[\"expression\",\"Age\"],\"name\":\"Age\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"semantic_type\":null,\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":24.0,\"q1\":34.0,\"q3\":55.0,\"max\":65.0,\"sd\":12.267844146385297,\"avg\":44.5}}}},{\"display_name\":\"Sum of Total\",\"semantic_type\":null,\"settings\":null,\"field_ref\":[\"aggregation\",0],\"name\":\"sum\",\"base_type\":\"type/Float\",\"effective_type\":\"type/Float\",\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":20757.409343661588,\"q1\":30047.177849902546,\"q3\":39680.66141538831,\"max\":54566.17386646669,\"sd\":6919.511321782037,\"avg\":35967.18292977694}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Revenue per individual age", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:44:55.438307Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"aggregation\":[[\"sum\",[\"field\",42,{\"base-type\":\"type/Float\"}]]],\"breakout\":[[\"expression\",\"Age\",{\"base-type\":\"type/Integer\"}]],\"expressions\":{\"Age\":[\"datetime-diff\",[\"field\",49,{\"base-type\":\"type/Date\",\"join-alias\":\"People - User\"}],[\"now\"],\"year\"]},\"joins\":[{\"alias\":\"People - User\",\"strategy\":\"left-join\",\"condition\":[\"=\",[\"field\",43,{\"base-type\":\"type/Integer\"}],[\"field\",46,{\"base-type\":\"type/BigInteger\",\"join-alias\":\"People - User\"}]],\"source-table\":3}],\"source-table\":5}}", + :id 25, + :parameter_mappings "[]", + :display "bar", + :entity_id "KMq74J_Gh78vIimczx0LH", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"Age\"],\"graph.metrics\":[\"sum\"],\"graph.series_order\":null,\"graph.series_order_dimension\":null,\"graph.show_values\":true,\"stackable.stack_type\":\"stacked\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description nil, + :archived false, + :collection_position nil, + :table_id 5, + :result_metadata + "[{\"description\":\"The numerical product number. Only used internally. All external communication should use the title or EAN.\",\"semantic_type\":\"type/PK\",\"coercion_strategy\":null,\"name\":\"ID\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",62,{\"base-type\":\"type/BigInteger\",\"source-field\":40}],\"effective_type\":\"type/BigInteger\",\"id\":62,\"visibility_type\":\"normal\",\"display_name\":\"Product → ID\",\"fingerprint\":null,\"base_type\":\"type/BigInteger\"},{\"display_name\":\"Count\",\"semantic_type\":\"type/Quantity\",\"field_ref\":[\"field\",\"count\",{\"base-type\":\"type/Integer\"}],\"name\":\"count\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"fingerprint\":{\"global\":{\"distinct-count\":8,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":109.0,\"q1\":109.36150801752578,\"q3\":117.41886116991581,\"max\":120.0,\"sd\":4.254710813035841,\"avg\":113.53846153846153}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "Top selling products", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"query\":{\"filter\":[\">\",[\"field\",\"count\",{\"base-type\":\"type/Integer\"}],108],\"source-query\":{\"aggregation\":[[\"count\"]],\"breakout\":[[\"field\",62,{\"base-type\":\"type/BigInteger\",\"source-field\":40}]],\"order-by\":[[\"desc\",[\"aggregation\",0]]],\"source-table\":5}},\"type\":\"query\"}", + :id 26, + :parameter_mappings "[]", + :display "row", + :entity_id "rzTlzB2AMBeR-Q13EpXrw", + :collection_preview true, + :visualization_settings + "{\"column_settings\":null,\"graph.dimensions\":[\"ID\"],\"graph.metrics\":[\"count\"],\"series_settings\":{\"count\":{\"color\":\"#999AC4\"}},\"table.pivot\":false}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil} + {:cache_invalidated_at nil, + :description nil, + :archived false, + :collection_position nil, + :table_id 3, + :result_metadata + "[{\"description\":\"A unique identifier given to each user.\",\"semantic_type\":\"type/PK\",\"coercion_strategy\":null,\"name\":\"ID\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",46,null],\"effective_type\":\"type/BigInteger\",\"id\":46,\"visibility_type\":\"normal\",\"display_name\":\"ID\",\"fingerprint\":null,\"base_type\":\"type/BigInteger\"},{\"description\":\"The street address of the account’s billing address\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"ADDRESS\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",52,null],\"effective_type\":\"type/Text\",\"id\":52,\"visibility_type\":\"normal\",\"display_name\":\"Address\",\"fingerprint\":{\"global\":{\"distinct-count\":2490,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":20.85}}},\"base_type\":\"type/Text\"},{\"description\":\"The contact email for the account.\",\"semantic_type\":\"type/Email\",\"coercion_strategy\":null,\"name\":\"EMAIL\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",51,null],\"effective_type\":\"type/Text\",\"id\":51,\"visibility_type\":\"normal\",\"display_name\":\"Email\",\"fingerprint\":{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":1.0,\"percent-state\":0.0,\"average-length\":24.1824}}},\"base_type\":\"type/Text\"},{\"description\":\"This is the salted password of the user. It should not be visible\",\"semantic_type\":null,\"coercion_strategy\":null,\"name\":\"PASSWORD\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",53,null],\"effective_type\":\"type/Text\",\"id\":53,\"visibility_type\":\"normal\",\"display_name\":\"Password\",\"fingerprint\":{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":36.0}}},\"base_type\":\"type/Text\"},{\"description\":\"The name of the user who owns an account\",\"semantic_type\":\"type/Name\",\"coercion_strategy\":null,\"name\":\"NAME\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",47,null],\"effective_type\":\"type/Text\",\"id\":47,\"visibility_type\":\"normal\",\"display_name\":\"Name\",\"fingerprint\":{\"global\":{\"distinct-count\":2499,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":13.532}}},\"base_type\":\"type/Text\"},{\"description\":\"The city of the account’s billing address\",\"semantic_type\":\"type/City\",\"coercion_strategy\":null,\"name\":\"CITY\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",55,null],\"effective_type\":\"type/Text\",\"id\":55,\"visibility_type\":\"normal\",\"display_name\":\"City\",\"fingerprint\":{\"global\":{\"distinct-count\":1966,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.002,\"average-length\":8.284}}},\"base_type\":\"type/Text\"},{\"description\":\"This is the longitude of the user on sign-up. It might be updated in the future to the last seen location.\",\"semantic_type\":\"type/Longitude\",\"coercion_strategy\":null,\"name\":\"LONGITUDE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",50,null],\"effective_type\":\"type/Float\",\"id\":50,\"visibility_type\":\"normal\",\"display_name\":\"Longitude\",\"fingerprint\":{\"global\":{\"distinct-count\":2491,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":-166.5425726,\"q1\":-101.58350792373135,\"q3\":-84.65289348288829,\"max\":-67.96735199999999,\"sd\":15.399698968175663,\"avg\":-95.18741780363999}}},\"base_type\":\"type/Float\"},{\"description\":\"The state or province of the account’s billing address\",\"semantic_type\":\"type/State\",\"coercion_strategy\":null,\"name\":\"STATE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",48,null],\"effective_type\":\"type/Text\",\"id\":48,\"visibility_type\":\"normal\",\"display_name\":\"State\",\"fingerprint\":{\"global\":{\"distinct-count\":49,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":1.0,\"average-length\":2.0}}},\"base_type\":\"type/Text\"},{\"description\":\"The channel through which we acquired this user. Valid values include: Affiliate, Facebook, Google, Organic and Twitter\",\"semantic_type\":\"type/Source\",\"coercion_strategy\":null,\"name\":\"SOURCE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",45,null],\"effective_type\":\"type/Text\",\"id\":45,\"visibility_type\":\"normal\",\"display_name\":\"Source\",\"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\":7.4084}}},\"base_type\":\"type/Text\"},{\"description\":\"The date of birth of the user\",\"semantic_type\":null,\"coercion_strategy\":null,\"unit\":\"default\",\"name\":\"BIRTH_DATE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",49,{\"temporal-unit\":\"default\"}],\"effective_type\":\"type/Date\",\"id\":49,\"visibility_type\":\"normal\",\"display_name\":\"Birth Date\",\"fingerprint\":{\"global\":{\"distinct-count\":2308,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"1958-04-26\",\"latest\":\"2000-04-03\"}}},\"base_type\":\"type/Date\"},{\"description\":\"The postal code of the account’s billing address\",\"semantic_type\":\"type/ZipCode\",\"coercion_strategy\":null,\"name\":\"ZIP\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",54,null],\"effective_type\":\"type/Text\",\"id\":54,\"visibility_type\":\"normal\",\"display_name\":\"Zip\",\"fingerprint\":{\"global\":{\"distinct-count\":2234,\"nil%\":0.0},\"type\":{\"type/Text\":{\"percent-json\":0.0,\"percent-url\":0.0,\"percent-email\":0.0,\"percent-state\":0.0,\"average-length\":5.0}}},\"base_type\":\"type/Text\"},{\"description\":\"This is the latitude of the user on sign-up. It might be updated in the future to the last seen location.\",\"semantic_type\":\"type/Latitude\",\"coercion_strategy\":null,\"name\":\"LATITUDE\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",57,null],\"effective_type\":\"type/Float\",\"id\":57,\"visibility_type\":\"normal\",\"display_name\":\"Latitude\",\"fingerprint\":{\"global\":{\"distinct-count\":2491,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":25.775827,\"q1\":35.302705923023126,\"q3\":43.773802584662,\"max\":70.6355001,\"sd\":6.390832341883712,\"avg\":39.87934670484002}}},\"base_type\":\"type/Float\"},{\"description\":\"The date the user record was created. Also referred to as the user’s \\\"join date\\\"\",\"semantic_type\":\"type/CreationTimestamp\",\"coercion_strategy\":null,\"unit\":\"default\",\"name\":\"CREATED_AT\",\"settings\":null,\"fk_target_field_id\":null,\"field_ref\":[\"field\",56,{\"temporal-unit\":\"default\"}],\"effective_type\":\"type/DateTime\",\"id\":56,\"visibility_type\":\"normal\",\"display_name\":\"Created At\",\"fingerprint\":{\"global\":{\"distinct-count\":2500,\"nil%\":0.0},\"type\":{\"type/DateTime\":{\"earliest\":\"2022-04-19T21:35:18.752Z\",\"latest\":\"2025-04-19T14:06:27.3Z\"}}},\"base_type\":\"type/DateTime\"},{\"display_name\":\"Age\",\"field_ref\":[\"expression\",\"Age\"],\"name\":\"Age\",\"base_type\":\"type/BigInteger\",\"effective_type\":\"type/BigInteger\",\"semantic_type\":null,\"fingerprint\":{\"global\":{\"distinct-count\":42,\"nil%\":0.0},\"type\":{\"type/Number\":{\"min\":24.0,\"q1\":33.340572873934306,\"q3\":55.17166516756599,\"max\":65.0,\"sd\":12.263883782175668,\"avg\":44.434}}}}]", + :initially_published_at nil, + :database_id 1, + :enable_embedding false, + :collection_id 1, + :query_type "query", + :name "People with age", + :type "question", + :creator_id 13371338, + :updated_at #t "2024-04-11T12:41:25.429317Z", + :made_public_by_id nil, + :embedding_params nil, + :cache_ttl nil, + :dataset_query + "{\"database\":1,\"type\":\"query\",\"query\":{\"source-table\":3,\"expressions\":{\"Age\":[\"datetime-diff\",[\"field\",49,{\"base-type\":\"type/Date\"}],[\"now\"],\"year\"]}}}", + :id 27, + :parameter_mappings "[]", + :display "table", + :entity_id "lY4hbjNofxepxQGRhJa0s", + :collection_preview true, + :visualization_settings + "{\"graph.dimensions\":[\"age\"],\"graph.metrics\":[\"count\"],\"table.pivot_column\":\"SOURCE\",\"table.cell_column\":\"LONGITUDE\"}", + :metabase_version nil, + :parameters "[]", + :created_at #t "2024-04-11T12:41:25.429317Z", + :public_uuid nil}), + :dashboardcard_series (), + :collection + ({:authority_level nil, + :description nil, + :archived false, + :slug "examples", + :name "Examples", + :personal_owner_id nil, + :type nil, + :id 1, + :entity_id "53YGAg4EE6MC76nxx-f5f", + :location "/", + :namespace nil, + :created_at #t "2024-04-11T12:41:25.429317Z"}), + :parameter_card ()} diff --git a/src/metabase/api/database.clj b/src/metabase/api/database.clj index 024183fc017..60107019141 100644 --- a/src/metabase/api/database.clj +++ b/src/metabase/api/database.clj @@ -849,7 +849,7 @@ "Add the sample database as a new `Database`." [] (api/check-superuser) - (sample-data/add-sample-database!) + (sample-data/extract-and-sync-sample-database!) (t2/select-one Database :is_sample true)) diff --git a/src/metabase/cmd/copy.clj b/src/metabase/cmd/copy.clj index 9ffbfe76c69..0adf2cf7ed2 100644 --- a/src/metabase/cmd/copy.clj +++ b/src/metabase/cmd/copy.clj @@ -195,8 +195,9 @@ 0 results)))) -(defn- assert-db-empty - "Make sure [target] application DB is empty before we start copying data." +(defn- assert-has-no-users + "Make sure [target] application DB has no users set up before we start copying data. This is a safety check to make + sure we're not accidentally copying data into an existing application DB." [data-source] ;; check that there are no Users yet (let [[{:keys [cnt]}] (jdbc/query {:datasource data-source} ["SELECT count(*) AS cnt FROM core_user where not id = ?;" @@ -382,15 +383,15 @@ (classloader/require ns-symb)) ;; make sure the source database is up-do-date (step (trs "Set up {0} source database and run migrations..." (name source-db-type)) - (mdb.setup/setup-db! source-db-type source-data-source true)) + (mdb.setup/setup-db! source-db-type source-data-source true false)) ;; make sure the dest DB is up-to-date ;; ;; don't need or want to run data migrations in the target DB, since the data is already migrated appropriately (step (trs "Set up {0} target database and run migrations..." (name target-db-type)) - (mdb.setup/setup-db! target-db-type target-data-source true)) + (mdb.setup/setup-db! target-db-type target-data-source true false)) ;; make sure target DB is empty (step (trs "Testing if target {0} database is already populated..." (name target-db-type)) - (assert-db-empty target-data-source)) + (assert-has-no-users target-data-source)) ;; clear any rows created by the Liquibase migrations. (step (trs "Clearing default entries created by Liquibase migrations...") (clear-existing-rows! target-db-type target-data-source)) diff --git a/src/metabase/cmd/reset_password.clj b/src/metabase/cmd/reset_password.clj index a30fa5287ba..e1ba2cfc42a 100644 --- a/src/metabase/cmd/reset_password.clj +++ b/src/metabase/cmd/reset_password.clj @@ -19,7 +19,7 @@ (defn reset-password! "Reset the password for EMAIL-ADDRESS, and return the reset token in a format that can be understood by the Mac App." [email-address] - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) (println (str (deferred-trs "Resetting password for {0}..." email-address) "\n")) (try diff --git a/src/metabase/cmd/rotate_encryption_key.clj b/src/metabase/cmd/rotate_encryption_key.clj index c8c1b489a6c..ccd068b3649 100644 --- a/src/metabase/cmd/rotate_encryption_key.clj +++ b/src/metabase/cmd/rotate_encryption_key.clj @@ -14,7 +14,7 @@ [to-key] (when-not (mdb/db-is-set-up?) (log/warnf "Database not found. Metabase will create a new database at %s and proceeed encrypting." "2") - (mdb/setup-db!)) + (mdb/setup-db! :create-sample-content? true)) (log/infof "Connected to: %s | %s" (mdb/db-type) (mdb/db-file)) (let [make-encrypt-fn (fn [maybe-encrypt-fn] (if to-key diff --git a/src/metabase/config.clj b/src/metabase/config.clj index 75be834396a..6325bc6d58b 100644 --- a/src/metabase/config.clj +++ b/src/metabase/config.clj @@ -157,3 +157,9 @@ (def ^:dynamic *disable-setting-cache* "Whether to disable database cache. Here for loading circularity reasons." false) + +(defn load-sample-content? + "Load sample content on fresh installs? + Using this effectively means `MB_LOAD_SAMPLE_CONTENT` defaults to true." + [] + (not (false? (config-bool :mb-load-sample-content)))) diff --git a/src/metabase/core.clj b/src/metabase/core.clj index 9fb524da14b..03f0c9422e1 100644 --- a/src/metabase/core.clj +++ b/src/metabase/core.clj @@ -106,7 +106,11 @@ (settings/validate-settings-formatting!) ;; startup database. validates connection & runs any necessary migrations (log/info "Setting up and migrating Metabase DB. Please sit tight, this may take a minute...") - (mdb/setup-db!) + ;; Cal 2024-04-03: + ;; we have to skip creating sample content if we're running tests, because it causes some tests to timeout + ;; and the test suite can take 2x longer. this is really unfortunate because it could lead to some false + ;; negatives, but for now there's not much we can do + (mdb/setup-db! :create-sample-content? (not config/is-test?)) (init-status/set-progress! 0.5) ;; Set up Prometheus (when (prometheus/prometheus-server-port) @@ -130,11 +134,12 @@ (events/publish-event! :event/install {})) (init-status/set-progress! 0.8) ;; deal with our sample database as needed - (if new-install? - ;; add the sample database DB for fresh installs - (sample-data/add-sample-database!) - ;; otherwise update if appropriate - (sample-data/update-sample-database-if-needed!)) + (when (config/load-sample-content?) + (if new-install? + ;; add the sample database DB for fresh installs + (sample-data/extract-and-sync-sample-database!) + ;; otherwise update if appropriate + (sample-data/update-sample-database-if-needed!))) (init-status/set-progress! 0.9)) (ensure-audit-db-installed!) diff --git a/src/metabase/db.clj b/src/metabase/db.clj index ee5f3644769..49d3eb76f26 100644 --- a/src/metabase/db.clj +++ b/src/metabase/db.clj @@ -53,8 +53,12 @@ (defn setup-db! "Do general preparation of database by validating that we can connect. Caller can specify if we should run any pending - database migrations. If DB is already set up, this function will no-op. Thread-safe." - [] + database migrations. If DB is already set up, this function will no-op. Thread-safe. + Callers must explicitly decide whether or not to create sample content during migrations with the + `create-sample-content?` keyword argument. This should usually be `true` but is `false` for load-from-h2, + serialization imports, and in some tests because the sample content makes tests slow enough to cause timeouts." + [& {:keys [create-sample-content?]}] + {:pre [(some? create-sample-content?)]} (when-not (db-is-set-up?) ;; It doesn't really matter too much what we lock on, as long as the lock is per-application-DB e.g. so we can run ;; setup for DIFFERENT application DBs at the same time, but CAN NOT run it for the SAME application DB. We can just @@ -65,7 +69,7 @@ (let [db-type (db-type) data-source (data-source) auto-migrate? (config/config-bool :mb-db-automigrate)] - (mdb.setup/setup-db! db-type data-source auto-migrate?)) + (mdb.setup/setup-db! db-type data-source auto-migrate? create-sample-content?)) (reset! (:status mdb.connection/*application-db*) ::setup-finished)))) :done) diff --git a/src/metabase/db/custom_migrations.clj b/src/metabase/db/custom_migrations.clj index 0723034c324..94778e040de 100644 --- a/src/metabase/db/custom_migrations.clj +++ b/src/metabase/db/custom_migrations.clj @@ -10,7 +10,9 @@ (:require [cheshire.core :as json] [clojure.core.match :refer [match]] + [clojure.edn :as edn] [clojure.java.io :as io] + [clojure.pprint :as pprint] [clojure.set :as set] [clojure.string :as str] [clojure.walk :as walk] @@ -22,6 +24,7 @@ [metabase.db.connection :as mdb.connection] [metabase.models.interface :as mi] [metabase.plugins.classloader :as classloader] + [metabase.util.date-2 :as u.date] [metabase.util.honey-sql-2 :as h2x] [metabase.util.log :as log] [toucan2.core :as t2] @@ -96,12 +99,11 @@ (when s (.toUpperCase (str s) Locale/US))) - ;; metabase.util/lower-case-en (defn- lower-case-en ^String [s] (when s - (.toLowerCase (str s) Locale/US))) + (.toLowerCase (str s) Locale/US))) ;;; +----------------------------------------------------------------------------------------------------------------+ ;;; | MIGRATIONS | @@ -288,9 +290,9 @@ (t2/reducible-query {:select [:id :result_metadata] :from [:report_card] :where [:or - [:like :result_metadata "%field-id%"] - [:like :result_metadata "%field-literal%"] - [:like :result_metadata "%fk->%"]]}))))) + [:like :result_metadata "%field-id%"] + [:like :result_metadata "%field-literal%"] + [:like :result_metadata "%fk->%"]]}))))) (defn- remove-opts "Removes options from the `field_ref` options map. If the resulting map is empty, it's replaced it with nil." @@ -421,7 +423,7 @@ ;; need to wrap it a try catch in case anything weird could go wrong, for example ;; sizes are string (try - (merge + (merge (dissoc card :sizeX :sizeY) ;; remove those legacy keys if exists {:size_x (- (+ size_x (quot (+ col size_x 1) 3)) @@ -429,8 +431,8 @@ :col (+ col (quot (+ col 1) 3)) :size_y size_y :row row}) - (catch Throwable _ - card)))) + (catch Throwable _ + card)))) (defn- migrate-dashboard-grid-from-24-to-18 "Mirror of the rollback algorithm we have in sql." @@ -439,7 +441,7 @@ ;; new_size_x = size_x - ((size_x + col + 1) // 4 - (col + 1) // 4) ;; new_col = col - (col + 1) // 4 (try - (merge + (merge card {:size_x (if (= size_x 1) 1 @@ -450,8 +452,8 @@ :col (- col (quot (+ col 1) 4)) :size_y size_y :row row}) - (catch Throwable _ - card)))) + (catch Throwable _ + card)))) (define-reversible-migration RevisionDashboardMigrateGridFrom18To24 (let [migrate! (fn [revision] @@ -467,8 +469,8 @@ (let [object (json/parse-string (:object revision) keyword)] (when (seq (:cards object)) (t2/query {:update :revision - :set {:object (json/generate-string (update object :cards #(map migrate-dashboard-grid-from-24-to-18 %)))} - :where [:= :id (:id revision)]}))))] + :set {:object (json/generate-string (update object :cards #(map migrate-dashboard-grid-from-24-to-18 %)))} + :where [:= :id (:id revision)]}))))] (run! roll-back! (t2/reducible-query {:select [:*] :from [:revision] :where [:= :model "Dashboard"]})))) @@ -762,64 +764,64 @@ (let [remove-nil-keys (fn [m] (into {} (remove #(nil? (val %)) m))) existing-fixed (fn [settings] - (-> settings - (m/update-existing "column_settings" - (fn [column_settings] - (m/map-vals - #(select-keys % ["click_behavior"]) - column_settings))) + (-> settings + (m/update-existing "column_settings" + (fn [column_settings] + (m/map-vals + #(select-keys % ["click_behavior"]) + column_settings))) ;; select click behavior top level and in column settings - (select-keys ["column_settings" "click_behavior"]) - (remove-nil-keys))) + (select-keys ["column_settings" "click_behavior"]) + (remove-nil-keys))) fix-top-level (fn [toplevel] - (if (= (get toplevel "click") "link") - (assoc toplevel + (if (= (get toplevel "click") "link") + (assoc toplevel ;; add new shape top level - "click_behavior" - {"type" (get toplevel "click") - "linkType" "url" - "linkTemplate" (get toplevel "click_link_template")}) - toplevel)) + "click_behavior" + {"type" (get toplevel "click") + "linkType" "url" + "linkTemplate" (get toplevel "click_link_template")}) + toplevel)) fix-cols (fn [column-settings] - (reduce-kv - (fn [m col field-settings] - (assoc m col + (reduce-kv + (fn [m col field-settings] + (assoc m col ;; add the click stuff under the new click_behavior entry or keep the ;; field settings as is - (if (and (= (get field-settings "view_as") "link") - (contains? field-settings "link_template")) + (if (and (= (get field-settings "view_as") "link") + (contains? field-settings "link_template")) ;; remove old shape and add new shape under click_behavior - (assoc field-settings - "click_behavior" - {"type" (get field-settings "view_as") - "linkType" "url" - "linkTemplate" (get field-settings "link_template") - "linkTextTemplate" (get field-settings "link_text")}) - field-settings))) - {} - column-settings)) + (assoc field-settings + "click_behavior" + {"type" (get field-settings "view_as") + "linkType" "url" + "linkTemplate" (get field-settings "link_template") + "linkTextTemplate" (get field-settings "link_text")}) + field-settings))) + {} + column-settings)) fixed-card (-> (if (contains? dashcard "click") - (dissoc card "click_behavior") ;; throw away click behavior if dashcard has click + (dissoc card "click_behavior") ;; throw away click behavior if dashcard has click ;; behavior added - (fix-top-level card)) - (update "column_settings" fix-cols) ;; fix columns and then select only the new shape from + (fix-top-level card)) + (update "column_settings" fix-cols) ;; fix columns and then select only the new shape from ;; the settings tree - existing-fixed) + existing-fixed) fixed-dashcard (update (fix-top-level dashcard) "column_settings" fix-cols) final-settings (->> (m/deep-merge fixed-card fixed-dashcard (existing-fixed dashcard)) ;; remove nils and empty maps _AFTER_ deep merging so that the shapes are ;; uniform. otherwise risk not fully clobbering an underlying form if the one going on top ;; doesn't have link text - (walk/postwalk (fn [form] - (if (map? form) - (into {} (for [[k v] form - :when (if (seqable? v) + (walk/postwalk (fn [form] + (if (map? form) + (into {} (for [[k v] form + :when (if (seqable? v) ;; remove keys with empty maps. must be postwalk - (seq v) + (seq v) ;; remove nils - (some? v))] - [k v])) - form))))] + (some? v))] + [k v])) + form))))] (when (not= final-settings dashcard) {:id id :visualization_settings final-settings}))) @@ -878,9 +880,9 @@ [mapping-setting-key] (let [admin-group-id (t2/select-one-pk :permissions_group :name "Administrators") mapping (try - (json/parse-string (raw-setting mapping-setting-key)) - (catch Exception _e - {}))] + (json/parse-string (raw-setting mapping-setting-key)) + (catch Exception _e + {}))] (when-not (empty? mapping) (t2/update! :setting {:key (name mapping-setting-key)} {:value @@ -943,10 +945,10 @@ [db-type table column ttype nullable?] (let [ttype (name ttype) db-type (if (and (= db-type :mysql) - (with-open [conn (.getConnection (mdb.connection/data-source))] - (= "MariaDB" (.getDatabaseProductName (.getMetaData conn))))) - :mariadb - db-type)] + (with-open [conn (.getConnection (mdb.connection/data-source))] + (= "MariaDB" (.getDatabaseProductName (.getMetaData conn))))) + :mariadb + db-type)] (case db-type :postgres (format "ALTER TABLE \"%s\" ALTER COLUMN \"%s\" TYPE %s USING (\"%s\"::%s), ALTER COLUMN %s %s" @@ -1044,7 +1046,7 @@ :mysql (do - (t2/query ["UPDATE revision + (t2/query ["UPDATE revision SET object = JSON_SET( object, '$.dataset', @@ -1053,7 +1055,7 @@ THEN true ELSE false END) WHERE model = 'Card' AND JSON_UNQUOTE(JSON_EXTRACT(object, '$.type')) IS NOT NULL;"]) - (t2/query ["UPDATE revision + (t2/query ["UPDATE revision SET object = JSON_REMOVE(object, '$.type') WHERE model = 'Card' AND JSON_UNQUOTE(JSON_EXTRACT(object, '$.type')) IS NOT NULL;"])) @@ -1113,6 +1115,109 @@ perms-group {:user_id config/internal-mb-user-id :group_id all-users-id}] (t2/query {:insert-into :permissions_group_membership :values [perms-group]})))) +(defn- load-edn + "Loads edn from an EDN file. Parses values tagged with #t into the appropriate `java.time` class" + [file-name] + (with-open [r (io/reader file-name)] + (edn/read {:readers {'t u.date/parse}} (java.io.PushbackReader. r)))) + +(defn- no-user? + "If there is a user that is not the internal user, we know it's not a fresh install." + [] + (zero? (first (vals (t2/query-one {:select [:%count.*] :from :core_user :where [:not= :id config/internal-mb-user-id]}))))) + +(defn- no-db? + "We check there is no database is not present, because the sample database could have been installed from a previous version and be out of + date. In that (rare) case we will be conservative and not add the sample content." + [] + (nil? (t2/query-one {:select [:*] :from :metabase_database}))) + +(def ^:dynamic *create-sample-content* + "If true, we create sample content in the `CreateSampleContent` migration. This is bound to false sometimes in + load-from-h2, during serialization load, and in some tests because the sample content makes tests slow enough to + cause timeouts." + true) + +(define-migration CreateSampleContent + (when *create-sample-content* + (when (and (config/load-sample-content?) + (not (config/config-bool :mb-enable-test-endpoints)) ; skip sample content for e2e tests to avoid coupling the tests to the contents + (no-user?) + (no-db?)) + (let [table-name->raw-rows (load-edn "resources/sample-content.edn") + replace-temporals (fn [v] + (if (isa? (type v) java.time.temporal.Temporal) + :%now + v)) + table-name->rows (fn [table-name] + (->> (table-name->raw-rows table-name) + ;; We sort the rows by id and remove them so that auto-incrementing ids are + ;; generated in the same order. We can't insert the ids directly in H2 without + ;; creating sequences for all the generated id columns. + (sort-by :id) + (map (fn [row] + (dissoc (update-vals row replace-temporals) :id))))) + dbs (table-name->rows :metabase_database) + _ (t2/query {:insert-into :metabase_database :values dbs}) + db-ids (set (map :id (t2/query {:select :id :from :metabase_database}))) + example-dashboard-id 1 + expected-db-ids #{example-dashboard-id}] + ;; If that did not succeed in creating the metabase_database rows we could be reusing a database that + ;; previously had rows in it even if there are no users. in this rare care we delete the metabase_database row + ;; and do nothing else, to be safe. + (if (not= db-ids expected-db-ids) + (when (seq db-ids) + (t2/query {:delete-from :metabase_database :where [:in :id db-ids]})) + (do (doseq [table-name [:collection + :metabase_table + :metabase_field + :report_card + :parameter_card + :report_dashboard + :dashboard_tab + :report_dashboardcard + :dashboardcard_series]] + (when-let [values (seq (table-name->rows table-name))] + (t2/query {:insert-into table-name :values values}))) + (t2/query {:insert-into :setting + :values [{:key "example-dashboard-id" + :value (str example-dashboard-id)}]}))))))) + +(comment + ;; How to create `resources/sample-content.edn` used in `CreateSampleContent` + ;; ----------------------------------------------------------------------------- + ;; Start a fresh metabase instance without the :ee alias + ;; 1. create a collection with dashboards, or import one with (metabase.cmd/import "<path>") + ;; 2. execute the following to spit out the collection to an EDN file: + (let [pretty-spit (fn [file-name data] + (with-open [writer (io/writer file-name)] + (binding [*out* writer] + #_{:clj-kondo/ignore [:discouraged-var]} + (pprint/pprint data)))) + data (into {} + (for [table-name [:collection + :metabase_database + :metabase_table + :metabase_field + :report_dashboard + :report_dashboardcard + :report_card + :parameter_card + :dashboard_tab + :dashboardcard_series] + :let [query (cond-> {:select [:*] :from table-name} + (= table-name :collection) (assoc :where [:and + [:= :namespace nil] ; excludes the analytics namespace + [:= :personal_owner_id nil]]))]] + [table-name (sort-by :id (map #(into {} %) (t2/query query)))]))] + (pretty-spit "resources/sample-content.edn" data)) + ;; (make sure there's no other content in the file) + ;; 3. update the EDN file: + ;; - replace the database details and dbms_version with placeholders e.g. "{}" to make sure they are replaced + ;; - find-replace :creator_id 1, 2, etc with :creator_id 13371338 (the internal user ID) + ;; - replace metabase_version "<version>" with metabase_version nil + ) + ;; This was renamed to TruncateAuditTables, so we need to delete the old job & trigger (define-migration DeleteTruncateAuditLogTask (classloader/the-classloader) diff --git a/src/metabase/db/setup.clj b/src/metabase/db/setup.clj index 3ca83ab3c53..82d73299fd3 100644 --- a/src/metabase/db/setup.clj +++ b/src/metabase/db/setup.clj @@ -10,7 +10,7 @@ [honey.sql :as sql] [metabase.config :as config] [metabase.db.connection :as mdb.connection] - [metabase.db.custom-migrations] + [metabase.db.custom-migrations :as custom-migrations] [metabase.db.jdbc-protocols :as mdb.jdbc-protocols] [metabase.db.liquibase :as liquibase] [metabase.plugins.classloader :as classloader] @@ -31,7 +31,7 @@ (comment ;; load our custom migrations - metabase.db.custom-migrations/keep-me + custom-migrations/keep-me ;; needed so the `:h2` dialect gets registered with Honey SQL metabase.util.honey-sql-2/keep-me) @@ -144,24 +144,24 @@ (mu/defn ^:private run-schema-migrations! "Run through our DB migration process and make sure DB is fully prepared" [data-source :- (ms/InstanceOfClass javax.sql.DataSource) - auto-migrate? :- [:maybe :boolean]] + auto-migrate? :- :boolean] (log/info "Running Database Migrations...") (migrate! data-source (if auto-migrate? :up :print)) (log/info "Database Migrations Current ..." (u/emoji "✅"))) ;; TODO -- consider renaming to something like `verify-connection-and-migrate!` -;; -;; TODO -- consider whether this should be done automatically the first time someone calls `getConnection` (mu/defn setup-db! "Connects to db and runs migrations. Don't use this directly, unless you know what you're doing; use [[metabase.db/setup-db!]] instead, which can be called more than once without issue and is thread-safe." - [db-type :- :keyword - data-source :- (ms/InstanceOfClass javax.sql.DataSource) - auto-migrate? :- [:maybe :boolean]] + [db-type :- :keyword + data-source :- (ms/InstanceOfClass javax.sql.DataSource) + auto-migrate? :- :boolean + create-sample-content? :- :boolean] (u/profile (trs "Database setup") (u/with-us-locale - (binding [mdb.connection/*application-db* (mdb.connection/application-db db-type data-source :create-pool? false) ; should already be a pool - config/*disable-setting-cache* true] + (binding [mdb.connection/*application-db* (mdb.connection/application-db db-type data-source :create-pool? false) ; should already be a pool + config/*disable-setting-cache* true + custom-migrations/*create-sample-content* create-sample-content?] (verify-db-connection db-type data-source) (error-if-downgrade-required! data-source) (run-schema-migrations! data-source auto-migrate?)))) diff --git a/src/metabase/public_settings.clj b/src/metabase/public_settings.clj index 5e9005a26d7..b9643120ef0 100644 --- a/src/metabase/public_settings.clj +++ b/src/metabase/public_settings.clj @@ -846,3 +846,16 @@ (if-not (pos-int? value) 20 value)))) + +;; This is used by the embedding homepage +(defsetting example-dashboard-id + (deferred-tru "The ID of the example dashboard.") + :visibility :authenticated + :export? false + :type :integer + :setter :none + :getter (fn [] + (let [id (setting/get-value-of-type :integer :example-dashboard-id)] + (when (and id (t2/exists? :model/Dashboard :id id :archived false)) + id))) + :doc false) diff --git a/src/metabase/sample_data.clj b/src/metabase/sample_data.clj index 7d4c7b14191..b29a6e81469 100644 --- a/src/metabase/sample_data.clj +++ b/src/metabase/sample_data.clj @@ -65,22 +65,25 @@ "Please set MB_PLUGINS_DIR to a writable directory and restart Metabase.")) (jar-db-details resource)))})) -(defn add-sample-database! - "Add the sample database as a Metabase DB if it doesn't already exist." +(defn extract-and-sync-sample-database! + "Adds the sample database as a Metabase DB if it doesn't already exist. If it does exist in the app DB, + we update its details." [] - (when-not (t2/exists? Database :is_sample true) - (try - (log/info "Loading sample database") - (let [details (try-to-extract-sample-database!)] - (log/debug "Syncing Sample Database...") - (sync/sync-database! (first (t2/insert-returning-instances! Database - :name sample-database-name - :details details - :engine :h2 - :is_sample true)))) - (log/debug "Finished adding Sample Database.") - (catch Throwable e - (log/error e "Failed to load sample database"))))) + (try + (log/info "Loading sample database") + (let [details (try-to-extract-sample-database!) + db (if (t2/exists? Database :is_sample true) + (t2/select-one Database (first (t2/update-returning-pks! Database :is_sample true {:details details}))) + (first (t2/insert-returning-instances! Database + :name sample-database-name + :details details + :engine :h2 + :is_sample true)))] + (log/debug "Syncing Sample Database...") + (sync/sync-database! db)) + (log/debug "Finished adding Sample Database.") + (catch Throwable e + (log/error e "Failed to load sample database")))) (defn update-sample-database-if-needed! "Update the path to the sample database DB if it exists in case the JAR has moved." diff --git a/test/metabase/api/permissions_test.clj b/test/metabase/api/permissions_test.clj index aa1310e4669..aa80612dda9 100644 --- a/test/metabase/api/permissions_test.clj +++ b/test/metabase/api/permissions_test.clj @@ -6,6 +6,7 @@ [medley.core :as m] [metabase.api.permissions :as api.permissions] [metabase.api.permissions-test-util :as perm-test-util] + [metabase.config :as config] [metabase.models :refer [Database Permissions @@ -319,7 +320,8 @@ [:user_id ms/PositiveInt] [:is_group_manager :boolean]]]] result)) - (is (= (t2/select-fn-set :id 'User) (set (keys result)))))))) + (is (= (t2/select-fn-set :id 'User) + (conj (set (keys result)) config/internal-mb-user-id))))))) (deftest add-group-membership-test (testing "POST /api/permissions/membership" diff --git a/test/metabase/cmd/load_from_h2_test.clj b/test/metabase/cmd/load_from_h2_test.clj index 962d965fb9d..34419da61fa 100644 --- a/test/metabase/cmd/load_from_h2_test.clj +++ b/test/metabase/cmd/load_from_h2_test.clj @@ -66,7 +66,7 @@ (defn- create-current-database [db-type db-def data-source] (tx/create-db! db-type db-def) - (mdb.setup/setup-db! db-type data-source true)) + (mdb.setup/setup-db! db-type data-source true false)) (defn- dump-filename [h2-filename version] diff --git a/test/metabase/db/schema_migrations_test.clj b/test/metabase/db/schema_migrations_test.clj index c7c1c0fe003..ad786cac48e 100644 --- a/test/metabase/db/schema_migrations_test.clj +++ b/test/metabase/db/schema_migrations_test.clj @@ -14,6 +14,7 @@ [java-time.api :as t] [metabase.config :as config] [metabase.db :as mdb] + [metabase.db.custom-migrations :as custom-migrations] [metabase.db.custom-migrations-test :as custom-migrations-test] [metabase.db.query :as mdb.query] [metabase.db.schema-migrations-test.impl :as impl] @@ -1390,3 +1391,42 @@ (insert-perm! "perms/manage-database" "no") (migrate! :down 49) (is (nil? (t2/select-fn-vec :object (t2/table-name :model/Permissions) :group_id group-id))))))) + +(deftest create-sample-content-test + (testing "The sample content is created iff *create-sample-content*=true" + (doseq [create? [true false]] + (testing (str "*create-sample-content* = " create?) + (impl/test-migrations "v50.2024-04-09T15:55:22" [migrate!] + (let [sample-content-created? #(boolean (not-empty (t2/query "SELECT * FROM report_dashboard where name = 'E-commerce insights'")))] + (binding [custom-migrations/*create-sample-content* create?] + (is (false? (sample-content-created?))) + (migrate!) + (is ((if create? true? false?) (sample-content-created?))))))))) + (testing "The sample content isn't created if the sample database existed already in the past (or any database for that matter)" + (impl/test-migrations "v50.2024-04-09T15:55:22" [migrate!] + (let [sample-content-created? #(boolean (not-empty (t2/query "SELECT * FROM report_dashboard where name = 'E-commerce insights'")))] + (is (false? (sample-content-created?))) + (t2/insert-returning-pks! :metabase_database {:name "db" + :engine "h2" + :created_at :%now + :updated_at :%now + :details "{}"}) + (t2/query {:delete-from :metabase_database}) + (migrate!) + (is (false? (sample-content-created?))) + (is (empty? (t2/query "SELECT * FROM metabase_database")) + "No database should have been created")))) + (testing "The sample content isn't created if a user existed already" + (impl/test-migrations "v50.2024-04-09T15:55:22" [migrate!] + (let [sample-content-created? #(boolean (not-empty (t2/query "SELECT * FROM report_dashboard where name = 'E-commerce insights'")))] + (is (false? (sample-content-created?))) + (t2/insert-returning-pks! + :core_user + {:first_name "Rasta" + :last_name "Toucan" + :email "rasta@metabase.com" + :password "password" + :password_salt "and pepper" + :date_joined :%now}) + (migrate!) + (is (false? (sample-content-created?))))))) diff --git a/test/metabase/db/setup_test.clj b/test/metabase/db/setup_test.clj index 54c5cdfece7..aafd65fd7e2 100644 --- a/test/metabase/db/setup_test.clj +++ b/test/metabase/db/setup_test.clj @@ -31,27 +31,35 @@ (testing "Should be able to set up an arbitrary application DB" (letfn [(test* [data-source] (is (= :done - (mdb.setup/setup-db! :h2 data-source true))) + (mdb.setup/setup-db! :h2 data-source true true))) (is (= ["Administrators" "All Users"] (mapv :name (jdbc/query {:datasource data-source} "SELECT name FROM permissions_group ORDER BY name ASC;")))))] - (let [subname (format "mem:%s;DB_CLOSE_DELAY=10" (mt/random-name))] + (let [subname (fn [] (format "mem:%s;DB_CLOSE_DELAY=10" (mt/random-name)))] (testing "from a jdbc-spec map" (test* (mdb.data-source/broken-out-details->DataSource :h2 {:subprotocol "h2" - :subname subname + :subname (subname) :classname "org.h2.Driver"}))) (testing "from a connection URL" - (test* (mdb.data-source/raw-connection-string->DataSource - (str "jdbc:h2:" subname)))))))) + (test* (mdb.data-source/raw-connection-string->DataSource (str "jdbc:h2:" (subname))))) + (testing "test `create-sample-content?` arg works" + (doseq [create-sample-content? [true false]] + (let [data-source (mdb.data-source/raw-connection-string->DataSource (str "jdbc:h2:" (subname)))] + (mdb.setup/setup-db! :h2 data-source true create-sample-content?) + (is (= (if create-sample-content? + ["E-commerce insights"] + []) + (mapv :name (jdbc/query {:datasource data-source} + "SELECT name FROM report_dashboard ORDER BY name ASC;"))))))))))) (deftest setup-fresh-db-test (mt/test-drivers #{:h2 :mysql :postgres} (testing "can setup a fresh db" (mt/with-temp-empty-app-db [conn driver/*driver*] (is (= :done - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true true))) (testing "migrations are executed in the order they are defined" (is (= (liquibase-test/liquibase-file->included-ids "migrations/001_update_migrations.yaml" driver/*driver*) (t2/select-pks-vec (liquibase/changelog-table-name conn) {:order-by [[:orderexecuted :asc]]})))))))) @@ -61,10 +69,10 @@ (mt/with-temp-empty-app-db [_conn driver/*driver*] (testing "Running setup with `auto-migrate?`=false should pass if no migrations exist which need to be run" (is (= :done - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true false))) (is (= :done - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) false))))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) false false))))) (testing "Setting up DB with `auto-migrate?`=false should exit if any migrations exist which need to be run" ;; Use a migration file that intentionally errors with failOnError: false, so that a migration is still unrun @@ -72,12 +80,12 @@ (with-redefs [liquibase/changelog-file "error-migration.yaml"] (mt/with-temp-empty-app-db [_conn driver/*driver*] (is (= :done - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true false))) (is (thrown-with-msg? Exception #"Database requires manual upgrade." - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) false)))))))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) false false)))))))) (defn- update-to-changelog-id [change-log-id conn] @@ -97,7 +105,7 @@ ;; set up a db in a way we have a MB instance running metabase 44 (update-to-changelog-id "v44.00-000" conn)) (is (= :done - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true)))))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true false)))))) (deftest setup-a-mb-instance-running-version-greater-than-45 (mt/test-drivers #{:h2 :mysql :postgres} @@ -106,7 +114,7 @@ ;; set up a db in a way we have a MB instance running metabase 45 (update-to-changelog-id "v45.00-001" conn)) (is (= :done - (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true)))))) + (mdb.setup/setup-db! driver/*driver* (mdb.connection/data-source) true false)))))) (deftest downgrade-detection-test (mt/test-drivers #{:h2 :mysql :postgres} diff --git a/test/metabase/models/user_test.clj b/test/metabase/models/user_test.clj index dec4396fb63..ee0faedc141 100644 --- a/test/metabase/models/user_test.clj +++ b/test/metabase/models/user_test.clj @@ -584,7 +584,7 @@ (deftest block-sso-provisioning-if-instance-not-set-up (testing "SSO users should not be created if an admin user has not already been created (metabase-private#201)" (schema-migrations-test.impl/with-temp-empty-app-db [_conn :h2] - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? true) (is (thrown-with-msg? Exception #"Instance has not been initialized" diff --git a/test/metabase/setup_test.clj b/test/metabase/setup_test.clj index 4a130b32ca5..fa7138d4a3b 100644 --- a/test/metabase/setup_test.clj +++ b/test/metabase/setup_test.clj @@ -3,6 +3,7 @@ [clojure.test :refer :all] [metabase.config :as config] [metabase.db :as mdb] + [metabase.public-settings :as public-settings] [metabase.setup :as setup] [metabase.test :as mt] [toucan2.core :as t2])) @@ -33,7 +34,7 @@ ;; create a new completely empty database. (mt/with-temp-empty-app-db [_conn :h2] ;; make sure the DB is setup (e.g., run all the Liquibase migrations) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? true) (t2/with-call-count [call-count] (dotimes [_ 5] (is (= false @@ -46,3 +47,21 @@ (is (= true (setup/has-user-setup))) (is (zero? (call-count)))))) + +(deftest has-example-dashboard-id-setting-test + (testing "The example-dashboard-id setting should be set if the example content is loaded" + (mt/with-temp-empty-app-db [_conn :h2] + (mdb/setup-db! :create-sample-content? true) + (is (= 1 + (public-settings/example-dashboard-id))))) + (testing "The example-dashboard-id setting should be nil if the example content isn't loaded" + (mt/with-temp-empty-app-db [_conn :h2] + (mdb/setup-db! :create-sample-content? false) + (is (nil? (public-settings/example-dashboard-id))))) + (testing "The example-dashboard-id setting should be reset to nil if the example dashboard is archived" + (mt/with-temp-empty-app-db [_conn :h2] + (mdb/setup-db! :create-sample-content? true) + (is (= 1 + (public-settings/example-dashboard-id))) + (t2/update! :model/Dashboard 1 {:archived true}) + (is (nil? (public-settings/example-dashboard-id)))))) diff --git a/test/metabase/test/data.clj b/test/metabase/test/data.clj index 2361205992e..881c245873f 100644 --- a/test/metabase/test/data.clj +++ b/test/metabase/test/data.clj @@ -269,5 +269,5 @@ ;; since the actual group defs are not dynamic, we need with-redefs to change them here (with-redefs [perms-group/all-users (#'perms-group/magic-group perms-group/all-users-group-name) perms-group/admin (#'perms-group/magic-group perms-group/admin-group-name)] - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) ; skip sample content for speedy tests. this doesn't reflect production ~@body))) diff --git a/test/metabase/test/data/h2.clj b/test/metabase/test/data/h2.clj index c50c17fdf67..0b39bfa20ee 100644 --- a/test/metabase/test/data/h2.clj +++ b/test/metabase/test/data/h2.clj @@ -31,7 +31,7 @@ (when-not (contains? @h2-test-dbs-created-by-this-instance database-name) (locking h2-test-dbs-created-by-this-instance (when-not (contains? @h2-test-dbs-created-by-this-instance database-name) - (mdb/setup-db!) ; if not already setup + (mdb/setup-db! :create-sample-content? false) ; skip sample content for speedy tests. this doesn't reflect production (t2/delete! Database :engine "h2", :name database-name) (swap! h2-test-dbs-created-by-this-instance conj database-name))))) diff --git a/test/metabase/test/data/interface.clj b/test/metabase/test/data/interface.clj index a236790c1d6..63ed37f52c4 100644 --- a/test/metabase/test/data/interface.clj +++ b/test/metabase/test/data/interface.clj @@ -288,7 +288,7 @@ [{:keys [database-name]} driver] (assert (string? database-name)) (assert (keyword? driver)) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) ; skip sample content for speedy tests. this doesn't reflect production (t2/select-one Database :name database-name :engine (u/qualified-name driver) diff --git a/test/metabase/test/initialize/db.clj b/test/metabase/test/initialize/db.clj index d6d84c7a961..c1c9b2fad96 100644 --- a/test/metabase/test/initialize/db.clj +++ b/test/metabase/test/initialize/db.clj @@ -11,7 +11,7 @@ (defn init! [] (log/info (u/format-color 'blue "Setting up %s test DB and running migrations..." (mdb/db-type))) (#'task/set-jdbc-backend-properties!) - (mdb/setup-db!) + (mdb/setup-db! :create-sample-content? false) ; skip sample content for speedy tests. this doesn't reflect production (log/info (t2/with-connection [^java.sql.Connection conn] (let [metadata (.getMetaData conn)] (u/format-color 'blue "Application DB is %s %s" -- GitLab