Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Nov 18, 2024
    • Chris Truter's avatar
    • lbrdnk's avatar
      Add temporal unit to display name (#48946) · 5203a15c
      lbrdnk authored
      * Add temporal unit to display name
      
      * Remove temporal unit adjustments from FE
      
      * formatColumn to displayNameForColumn
      
      * Factor out getFriendlyName
      
      * Adjust BE tests
      
      * Add require
      
      * Adjust FE unit tests
      
      * Adjust temporal-unit-parameters.cy.spec.js
      
      * Adjust dashboard-reproductions.cy.spec
      
      * Convert formatColumn occurrence
      
      * Adjust legacy display name logic generation
      
      After `getFriendlyName` was removed from FE, capitalization
      of display name should happen here. Logic is similar, should
      be adjusted prior merging the PR.
      
      * Adjust embedding-linked-filters.cy.spec.js
      
      * Adjust joins-reproductions.cy.spec.js
      
      * Adjust metrics-editing.cy.spec.js
      
      * Adjust timelines-question.cy.spec.js
      
      * Adjust offset.cy.spec.ts
      
      * TMP Avoid duplication of temporal unit in display name in MLv2 code
      
      * Probably FE fix: add default temporal bucket only if not present
      
      * WIP Add ends-with-temporal-unit? function
      
      Current strategy is to add temporal units to display names if same is not already present
      
      * Adjust display-name-method :metadata/column
      
      Append TU to display name only if different to what's already present
      
      * Adjust FE: show temporal unit that's present on field instead of default on hover on QueryColumnPicker element
      
      * Return also temporal-unit from visible-columns
      
      * Enable tempora-unit to be returned from previous-stage-or-source-visible-columns
      
      * WIP Adjust multi breakout multi stage e2e multiple-column-breakouts.cy.spec
      
      * Adjust multiple-column-breakouts.cy.spec.ts
      
      * It was not a bug.
      
      * Revert changes in _BaseBucketPickerPopover
      
      * Restore temporal-unit for next stages removal in stage.cljc
      
      * Add inherent-temporal-unit
      
      * Adjust display name temporal bucket logic
      
      * Rename to inherited-temporal-unit
      
      * Shutdown too broad display name capitalization
      
      * Eastwood
      
      * Adjust pivot-rows-order-test
      
      * Adjust pivot-non-numeric-values-in-aggregations
      
      * Adjust inherent to inherited
      
      * Rename to inherited
      
      * Add inherent-temporal-unit only to returned-columns
      
      * Update e2e/test/scenarios/dashboard-filters/temporal-unit-parameters.cy.spec.js
      
      * Update e2e/test/scenarios/question/multiple-column-breakouts.cy.spec.ts
      
      * Update consistent-date-formatting-test
      
      * Update dashboard/x-rays.cy.spec.js
      
      * Update waterfall.cy.spec.js
      
      * Return month default for default inherited-temporal-unit
      
      * Update reproductions-3.cy.spec.js
      
      * Update downloads/downloads.cy.spec.js
      
      * Update legend.cy.spec.js
      
      * Update pie_chart.cy.spec.js
      
      * Update click-behavior.cy.spec.js
      
      * Update embedding-linked-filters.cy.spec.js
      
      * Return QueryColumnPicker's condition to original state
      
      * Remove reundant export
      
      * Update e2e/test/scenarios/question/multiple-column-breakouts.cy.spec.ts
      
      * Comment
      
      * Update nested.cy.spec.js
      
      * Update e2e/test/scenarios/sharing/sharing-reproductions.cy.spec.js
      
      * Adjust to TS types
      
      * Adjust for cljfmt
      
      * Capitalize
      
      * Add propagation tests
      
      * Add inherited-temporal-unit propagation for expressions
      
      * Add default inherited-temporal-unit test cases
      
      * Add qp temporal-bucket-test ns
      
      * Simplify default unit logic
      
      * Comment
      
      * Use NULL_DISPLAY_VALUE
      
      * Comment
      
      * Comment
      
      * Comment
      
      * Comment
      
      * Comment
      
      * Comment
      
      * Remove redundant code (for now)
      
      * Update comments
      
      * Comment
      
      * Restore way too daring simplification
      
      * cljfmt
      
      * Adjust capitalize
      
      * Update comment
      
      * Update test
      
      * Address remarks in tests
      
      * Update test
      
      * Address remarks
      
      * typo
      Unverified
      5203a15c
    • Chris Truter's avatar
  2. Nov 15, 2024
  3. Nov 14, 2024
    • Noah Moss's avatar
    • dpsutton's avatar
      sync the attached datawarehouse (#49970) · 113d75ce
      dpsutton authored
      * sync the attached datawarehouse
      
      requires either "sync_db" true or a table name
      
      it will error
      ```shell
      ❯ http post 'localhost:3000/api/notify/db/attached_datawarehouse' x-metabase-apikey:apikey -pb
      Must provide `sync_db` or a `table_name` to sync
      ```
      
      It will sync the db when sync_db is true [NOTE: this is outdated. now just omitting the table name will sync the db]
      ```shell
      ❯ echo '{"synchronous?": true, "sync_db": true}' | http post 'localhost:3000/api/notify/db/attached_datawarehouse' x-metabase-apikey:apikey -pb
      {
          "success": true
      }
      ```
      
      It will sync existing tables
      ```shell
      ❯ http post 'localhost:3000/api/notify/db/attached_datawarehouse' table_name=existing schema_name=public x-metabase-apikey:apikey -pb
      {
          "success": true
      }
      ```
      
      it will error if it cannot find a table
      ```shell
      ❯ http post 'localhost:3000/api/notify/db/attached_datawarehouse' table_name=new schema_name=public x-metabase-apikey:apikey -pb
      {
          "cause": "Unable to identify table 'public.new'",
          "data": {
              "schema_name": "public",
              "status-code": 404,
              "table_name": "new"
          },
          "message": "Unable to identify table 'public.new'",
          "schema_name": "public",
          "table_name": "new",
          "trace": [],
          "via": [
              {
                  "data": {
                      "schema_name": "public",
                      "status-code": 404,
                      "table_name": "new"
                  },
                  "message": "Unable to identify table 'public.new'",
                  "type": "clojure.lang.ExceptionInfo"
              }
          ]
      }
      ```
      
      if i create that table
      ```sql
      attached=# create table new (id int);
      CREATE TABLE
      ```
      
      it will then find and sync it
      
      ```shell
      ❯ http post 'localhost:3000/api/notify/db/attached_datawarehouse' table_name=new schema_name=public x-metabase-apikey:apikey -pb
      {
          "success": true
      }
      ```
      
      * formatting
      
      * Tests for attached datawarehouse
      
      * PR nits
      
      typo in `thorw` -> `throw`
      comment explaining why `find-and-sync-new-table` is always sync
      gensym the db name in test
      remove a binding for a fn `sync!` that's only called once
      test `{:sync_db true}` syncs the whole db
      
      * stupid formatting :mechanical_arm:
      
      * Use absence of table_name as indicator to sync database
      Unverified
      113d75ce
    • Chris Truter's avatar
    • Chris Truter's avatar
    • Chris Truter's avatar
  4. Nov 13, 2024
  5. Nov 12, 2024
  6. Nov 11, 2024
  7. Nov 10, 2024
  8. Nov 08, 2024
  9. Nov 07, 2024
Loading