Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 22, 2022
    • Cam Saul's avatar
      Handle March 31st + 3 months (June 31st?) for Oracle (#21841) · b9cedccc
      Cam Saul authored
      * Handle March 31st + 3 months for Oracle (#10072)
      
      * Optimize out some casting in Oracle
      
      * rx util support varargs inside `opt`
      
      * hx/ math operators like + and - should propagate type information
      
      * Some dox tweaks
      
      * Fix SQLite busted behavior
      
      * Avoid unneeded casting in Vertica when adding temporal intervals
      
      * Lint error fixes
      
      * BigQuery fix for #21969
      
      * Add testing context for tests for #21968 and #21971
      b9cedccc
    • Howon Lee's avatar
      Group-by fix for JSON columns. (#21741) · bad129cd
      Howon Lee authored
      Group-bys didn't work because you need two instances of the field and you couldn't have two instances of the field be considered by the postgres backend as the same. Ported over the BigQuery fix to this to apply to JSON columns as well.
      bad129cd
  2. Apr 19, 2022
    • Braden Shepherdson's avatar
      Make namespace aliasing consistent everywhere; enforce with clj-kondo (#21738) · 19beda53
      Braden Shepherdson authored
      * Make namespace aliasing consistent everywhere; enforce with clj-kondo
      
      See the table of aliases in .clj-kondo/config.edn
      
      Notable patterns:
      - `[metabase.api.foo :as api.foo]`
      - `[metabase.models.foo :as foo]`
      - `[metabase.query-processor.foo :as qp.foo]`
      - `[metabase.server.middleware.foo :as mw.foo]`
      - `[metabase.util.foo :as u.foo]`
      - `[clj-http.client :as http]` and `[metabase.http-client :as client]`
      
      Fixes #19930.
      19beda53
  3. Apr 13, 2022
  4. Apr 07, 2022
  5. Apr 05, 2022
  6. Apr 01, 2022
  7. Mar 24, 2022
  8. Mar 23, 2022
  9. Mar 16, 2022
  10. Mar 10, 2022
  11. Feb 24, 2022
  12. Feb 16, 2022
  13. Feb 15, 2022
    • Cam Saul's avatar
      Upgrade Hive JDBC driver version from 1.2.2 -> 3.1.2; Bump Spark SQL from 2.1.1 to 3.2.1 (#20353) · 4dc16403
      Cam Saul authored
      * Replace AOT Spark SQL deps with a `proxy` and a `DataSource`
      
      * Support `connection-details->spec` returning a `DataSource`
      
      * Remove target/classes
      
      * Don't need to deps prep drivers anymore
      
      * Fix duplicate `this` params in `proxy` methods; add `:test` alias for Eastwood to make it be a little quieter
      
      * Make sure to call `pool/map->properties`
      
      * Upgrade Hive JDBC driver version from 1.2.2 -> 3.1.2; Bump Spark SQL from 2.1.1 to 3.2.1
      
      * Clean the namespaces
      
      * Don't need to register the a proxy JDBC driver since we're not even using it anymore
      
      * Fix Spark SQL :schema sync for newer versions
      
      * Remove unneeded override
      
      * Fix day-of-week extract for new :sparksql
      
      * Hive/Spark SQL needs to escape question marks inside QUOTED identifiers now :unamused:
      
      * Some minor SQL generation improvements to avoid duplicate casts
      
      * Revert change to debug test
      4dc16403
  14. Feb 14, 2022
    • Cam Saul's avatar
      Add logic to truncate and uniquely-suffix column alias identifiers (#19659) · f94d5149
      Cam Saul authored
      * Add failing test for #15978
      
      * Improved test
      
      * Add new metabase.driver.query-processor.escape-join-aliases QP middleware
      
      * Test fix :wrench:
      
      * Add reference to #20307
      
      * Add some extra dox
      
      * Test fixes for BigQuery drivers
      
      * revert unneeded change
      
      * Fix :bigquery and :bigquery-cloud-sdk mixup
      
      * Test fixes :wrench:
      
      * Test fix :wrench:
      
      * Remove comment I meant to remove
      f94d5149
  15. Feb 11, 2022
  16. Feb 08, 2022
    • Jeff Evans's avatar
      Remove :bigquery driver (#20142) · 22ebe102
      Jeff Evans authored
      
      * Remove :bigquery driver
      
      Add "migration" to convert existing Database instances from :bigquery to :bigquery-cloud-sdk (with error log if using outdated OAuth mechanisms), by way of `normalize-db-details`
      
      Removing references to :bigquery from various places in the code
      
      * Remove from modules/drivers/deps.edn
      
      * Remove stuff from CircleCI that is running the old driver
      
      Remove `driver-switch-test` since there is no practical way to run this anymore (since we can't initialize the old driver)
      
      Remove buggy redef of `isa?` from `semantic-type-migration-tests`
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      22ebe102
  17. Feb 03, 2022
  18. Feb 02, 2022
  19. Jan 27, 2022
  20. Jan 26, 2022
    • Jeff Evans's avatar
      Support overriding ROWCOUNT for SQL Server (#19267) · 802cc236
      Jeff Evans authored
      * Support overriding ROWCOUNT for SQL Server
      
      Add new "ROWCOUNT Override" connection property for `:sqlserver`, which will provide a DB-level mechanism to override the `ROWCOUNT` session level setting as needed for specific DBs
      
      Change `max-results-bare-rows` from a hardcoded constant to a setting definition instead, which permits a DB level override, and move the former constant default to a new def instead (`default-max-results-bare-rows`)
      
      For `:sqlserver`, set the DB-level setting override (if the connection property is set), via the `driver/normalize-db-details` impl
      
      Add test to confirm the original scenario from #9940 works using this new override (set to `0`)
      
      Move common computation function of overall row limit to the `metabase.query-processor.middleware.limit` namespace, and invoke it from execute now, called `determine-query-max-rows`
      
      Add new clause to the `determine-query-max-rows` function that preferentially takes the value from `row-limit-override` (if defined)
      802cc236
  21. Jan 25, 2022
    • Jeff Evans's avatar
      Apply schema inclusion/exclusion filtering to sql-jdbc drivers (#19651) · b6d542f8
      Jeff Evans authored
      * Apply schema inclusion/exclusion filtering to sql-jdbc drivers
      
      Update `sql-jdbc` namespaces to handle schema inclusion/exclusion patterns when filtering schemas
      
      Add new generic schema inclusion/exclusion test for sql-jdbc drivers that define the property
      
      Update Snowflake and Redshift driver manifests to include schema filtering property
      
      Create `db-details->schema-filter-patterns` util fn to turn DB details into the inclusion/exclusion patterns
      
      Move schema inclusion/exclusion filtering code to new namespace (since it's not strictly used by `:sql-jdbc` derived drivers)
      
      Move existing tests accordingly
      
      Add schema inclusion/exclusion check to the new `filtered-syncable-schemas` multimethod (and updating docstring)
      
      Change `:redshift` impl of `filtered-syncable-schemas` to call the `:sql-jdbc` version instead
      
      Use new multimethod instead for `filtered-syncable-schemas`, and have default impl of `syncable-schemas` call that
      
      Mark `syncable-schemas` as deprecated and include notes on the new method (and update driver markdown file accordingly)
      b6d542f8
  22. Jan 20, 2022
  23. Jan 19, 2022
    • Cam Saul's avatar
      Add test for #15538 (#19779) · 84f64cb7
      Cam Saul authored
      * Add test for #15538
      
      * Add extra validation for native source queries
      
      * Add test for sql-source-query validation
      84f64cb7
    • Jeff Evans's avatar
      Remove hardcoded project-id from bigquery-cloud-sdk tests (#19780) · 2214e205
      Jeff Evans authored
      * Remove hardcoded project-id from `:bigquery-cloud-sdk` tests
      
      Pull out common helper fn to extract project-id from credentials
      
      Update `bigquery_cloud_sdk_test.clj` to have a var that loads the service-account-json from the env var, then uses aforementioned function to determine project-id
      
      Change sensitive-data-redacted-test to use an arbitrary/fake project-id to remove any sort of confusion
      2214e205
    • Cam Saul's avatar
      Add test for #13932 (#19766) · a566bd32
      Cam Saul authored
      a566bd32
  24. Jan 18, 2022
  25. Jan 14, 2022
  26. Jan 13, 2022
    • dpsutton's avatar
      Don't update tables in a schema one by one (#19658) · 1c54f6a0
      dpsutton authored
      * Don't update tables in a schema one by one
      
      Code had wanted to log each table which is admirable. But on bigquery
      there can be 15,000 tables and this will lock up calls to
      /api/database. On stats they are taking about 18s for me. Need to do
      once and let the db do the heavy lifting
      
      * Also where schema is nil
      
      * slightly better query
      1c54f6a0
  27. Jan 12, 2022
    • Jeff Evans's avatar
      Sync multiple schemas for BigQuery (#19547) · 526594f4
      Jeff Evans authored
      Add functions to describe-database namespace for performing inclusive/exclusive schema filtering
      
      Add tests for these functions in isolation
      
      Update `:bigquery-cloud-sdk` driver and QP code to remove the single `dataset-id` conn-param
      
      Changing :bigquery-cloud-sdk` driver to use dataset inclusion/exclusion filters instead
      
      Updating `add.cy.spec.js` Cypress test to account for new structure
      
      Add data upgrade (via `driver/normalize-db-details` implementation) to change `dataset-id` property to inclusion filter
      
      Add test to confirm data upgrade
      
      Adding server side expansion of `:schema-filters` type connection property
      526594f4
  28. Jan 11, 2022
  29. Jan 08, 2022
  30. Jan 07, 2022
    • Jeff Evans's avatar
      Allow override of WEEK_START in Snowflake driver (#19375) · 2d07f70a
      Jeff Evans authored
      * Allow override of WEEK_START in Snowflake driver
      
      Incorporate the following sources of WEEK_START, in decreasing order of precedence:
      1) the connection string, a.k.a. additional-options (ex: WEEK_START=N)
      2) the Metabase "start-of-week" setting (i.e. day of a week)
      3) the default value (7: Sunday)
      
      Adding new fn to the driver.common namespace to parse a connection string param out of additional-settings (plus a test for that)
      
      Adding Snowflake driver test to ensure that all cases above are covered as expected, by invoking the DAYOFWEEK function on a set of fixed dates
      
      Update documentation for start-of-week setting to clarify that it now influences this behavior
      
      Swap out parse-additional-options-value for additional-options->map instead (more generic)
      
      Update test accordingly
      2d07f70a
Loading