This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Apr 27, 2022
-
-
dpsutton authored
This issue has a simple fix but a convoluted story. The new bigquery driver handles multiple schemas and puts that schema (dataset-id) in the normal spot on a table in our database. The old driver handled only a single schema by having that dataset-id hardcoded in the database details and leaving the schema slot nil on the table row. ```clojure ;; new driver describe database: [{:name "table-1" :schema "a"} {:name "table-2" :schema "b"}] ;; old driver describe database (with dataset-id "a" on the db): [{:name "table-1" :schema nil}] ``` So if you started on the new driver and then downgraded for some reason, the table sync would see you had tables with schemas, but when it enumerated the tables in the database on the next sync, would see tables without schemas. It did not unify these two together, nor did it archive the tables with a schema. You ended up with both copies in the database, all active. ```clojure [{:name "table-1" :schema "a"} {:name "table-2" :schema "b"} {:name "table-1" :schema nil}] ``` If you then tried to migrate back to the newer driver, we migrated them as normal: since the old driver only dealt with one schema but left it nil, put that dataset-id on all of the tables connected to this connection. But since the new driver and then the old driver created copies of the same tables, you would end up with a constraint violation: tables with the same name and, now after the migration, the same schema. Ignore this error and the sync in more recent versions will correctly inactivate the old tables with no schema. ```clojure [{:name "table-1" :schema "a"} <-| {:name "table-2" :schema "b"} | constraint violation {:name "table-1" :schema "a"}] <-| ;; preferrable: [{:name "table-1" :schema "a"} {:name "table-2" :schema "b"} {:name "table-1" :schema nil :active false}] ```
-
- Apr 26, 2022
-
-
dpsutton authored
Fixes #19860 SNAPSHOT tables in bigquery hold diffs from an underlying table: https://cloud.google.com/bigquery/docs/table-snapshots-intro. But the support in the sdk only came in 1.135.0 : https://github.com/googleapis/java-bigquery/blob/main/CHANGELOG.md#11350-2021-06-28 I picked the most recent 1.135 version. Running ```shell clj -A:dev:ee:ee-dev:drivers:drivers-dev -Stree ``` Shows conflicts on ``` X google-http-client-jackson2 1.39.2 :older-version ; using 1.39.2-sp.1 from google analytics X com.fasterxml.jackson.core/jackson-core 2.12.3 :older-version ; from cheshire we have 2.12.4 X com.google.http-client/google-http-client 1.39.2 :superseded ; using 1.39.2-sp.1 from google-http-client-jackson2 (1.39.2-sp1) X commons-codec/commons-codec 1.15 :use-top ; pinned to this version at top level X com.google.guava/guava 30.1.1-android :use-top ; pinned to 31.0.1-jre top level ``` So I think this change is quite safe. After the release we should investigate the breaking changes that come in the 2.0.0 release and look into getting onto 2.10.10. This version worked locally for me but I don't want to introduce that into the release just yet.
-
- Apr 22, 2022
-
-
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
-
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.
-
- Apr 19, 2022
-
-
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.
-
- Apr 13, 2022
-
-
Cam Saul authored
-
- Apr 07, 2022
-
-
Cam Saul authored
-
- Apr 05, 2022
-
-
Cam Saul authored
* Remove :google driver * Remove unneeded stuff * Remove another reference to :google driver * Remove another reference to :google
-
- Apr 01, 2022
-
-
Noah Moss authored
-
- Mar 24, 2022
-
-
Cam Saul authored
* Fix Postgres filter by quarter * Fix test for MongoDB to work around #5419 * Spark SQL doesn't allow quarters in intervals either
-
- Mar 23, 2022
-
-
Cam Saul authored
* Remove references to qp/query->preprocessed * Fix Oracle
-
Howon Lee authored
This is the first vertical slice of #708. There is a material ways to go, including mysql implementation, plinking away at the data model stuff, and frontend. There are also big putative sync speed gains I think I should chip away at.
-
- Mar 16, 2022
-
-
Cam Saul authored
* Use Service Accounts for Google Analytics auth going forward * Update GA dox * Dox tweak * Fix e2e test * Remove dead googleanalytics form code Co-authored-by:
Dalton Johnson <daltojohnso@users.noreply.github.com>
-
Cam Saul authored
* Change u/profile from println to log/info * Change most test printlns to log/info * Make u/profile message a fn rather than a delay * Apparently clj-http errors aren't wrapped in :object anymore * Add running commentary * Log the amount of time it took to find and run tests * Sort namespaces * Update test Co-authored-by:
Diogo Mendes <diogo@metabase.com>
-
- Mar 10, 2022
-
-
Cam Saul authored
* Improved error messages when query execution fails * Pretty-print hx/identifier in a different way if it contains extra keys * Fix #20806 * Rename key used to record that we should not qualify * Fix line breaks * Test fix
-
- Feb 24, 2022
-
-
Michiel Borkent authored
* Refer all * allow refer all in tests * Add toucan test macro config * wip * Improve hooks * Fix formatting issue * Improve * presto * oracle * mongo * druid * zero errors * undo whitespace change * ns linter satisfaction
-
- Feb 16, 2022
-
-
Cam Saul authored
-
- Feb 15, 2022
-
-
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
* Some minor SQL generation improvements to avoid duplicate casts * Revert change to debug test
-
- Feb 14, 2022
-
-
Cam Saul authored
* Add failing test for #15978 * Improved test * Add new metabase.driver.query-processor.escape-join-aliases QP middleware * Test fix
* 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 * Test fix * Remove comment I meant to remove
-
- Feb 11, 2022
- Feb 08, 2022
-
-
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:
Cam Saul <github@camsaul.com>
-
- Feb 03, 2022
-
-
Cam Saul authored
* Bump backend dependencies (Jan 2022) * Revert java-time version upgrade for now until https://github.com/dm3/clojure.java-time/issues/77 is fixed * Add license overrides * Bump a few more deps (again). Revert Google/BigQuery and Vertica version bumps * Revert MariaDB and Redshift version changes
-
- Feb 02, 2022
-
-
Cam Saul authored
-
Jeff Evans authored
Break out separate util fn to return the given `authdb` or the canonical default ("admin") Add invocation to new util fn from the `mcred/create` call
-
- Jan 27, 2022
-
-
Alexander Polyankin authored
-
- Jan 26, 2022
-
-
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)
-
- Jan 25, 2022
-
-
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)
-
- Jan 20, 2022
-
-
Jeff Evans authored
* Add drive scope to BigQuery client Adding new drive auth scope in order to be able to query Google Drive files created in BigQuery as external tables Adding new test to confirm such a table can be queried successfully
-
Cam Saul authored
* Add test for #7487 * Fix error message * Update test for new error message
-
Noah Moss authored
-
- Jan 19, 2022
-
-
Cam Saul authored
* Add test for #15538 * Add extra validation for native source queries * Add test for sql-source-query validation
-
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
-
Cam Saul authored
-
- Jan 18, 2022
-
-
Cam Saul authored
Nested Queries Overhaul 2022: Split logic for determining appropriate table & column aliases out of SQL QP (#19384)
-
- Jan 14, 2022
-
-
Jeff Evans authored
Move bulk of dataset-id normalization logic into new private helper fn Perform app DB update for db-details after dataset-id has been turned into inclusion filter Add test to confirm that normalization only happens once
-
Noah Moss authored
-
- Jan 13, 2022
-
-
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
-
- Jan 12, 2022
-
-
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
-
- Jan 11, 2022
-
-
Noah Moss authored
-