This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Aug 14, 2023
-
-
Case Nelson authored
Part of #33140
-
- Aug 10, 2023
-
-
lbrdnk authored
Modify `:contains`, `:starts-with` and `:ends-with` so field or expression can be used as the second argument (#32446) * Update `LIKE` to handle fields and expressions Previously only string could be used with like clause, ie. as second argument of `:starts-with`, `:ends-with` or `:contains`. This commit modifies translation of those functions, so fields or expressions can be used in place of second argument. * Make only expression or field args use `concat` Using concat with values unnecessarily complects generated sql. * Update tests * Extend mongo string matching capabilities Make mongo filter compilation use `$regexMatch` for `:contains`, `:starts-with` and `:ends-with` so expressions and fields can be matched against. * Adjust mongo specific tests * Update druid Druid's filters work with `:contains`, `:starts-with` and `:ends-with`, but only if second argument is literal pattern. This commit updates existing code, so expection is thrown if `pattern` has different form than `[:value ...]`. * Address review comments - sql * Address review comments - mongo * Use mbql `:concat` instead of `hx/call :concat` Vertica, orcacle and sqlite handle concat differently than other drivers. To overcome this limitation, `pre`, `post` and `arg` are wrapped into mbql's concat expression which is then translated with regards to the specifics of particular driver. * Update according to the review feedback --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
lbrdnk authored
Change is compatible with prior implementation. Match clause like the following, `{$match: {"something": "Facebook"}}`, does exact match if `something` is a scalar, and in case `something` was an array, match would check whether it contains the `Facebook` value. Same behavior, as with `{$match: {"something": {$in: ["Facebook"]}}}`. Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
- Aug 09, 2023
-
-
lbrdnk authored
* Make `:branches` realize during `:case` compilation Previously `:branches` were generated with use of `for`, yeilding lazy sequence. It caused problems, if the sequence got realized after processing of query ie. without initialized qp store. That was the case with /dataset/native api call containing `:case` with `:now`. * Update /dataset/native test --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
- Aug 06, 2023
-
-
Cam Saul authored
* QP: use Malli * Fix schema names * Fix missing namespaces * Fix busted stuff * Simplify the new schema * Test fix
* Test fixes * MongoDB fixes * FAST mu/defn * Malli registry * Misc fixes * Some cleanup * Misc cleanup and test fixes * mu/disable-enforcement * Test fix * Fix Cljs version of `disable-enforcement` * Misc improvements * Update tests * Fix Kondo warnings * Fix Kondo warnings * Fix busted Malli schema * PR feedback * Fix busted schema * Kondo fixx * Test fixes * Use Malli version of `describe` now that PR was merged * Work around https://github.com/metosin/malli/issues/924 * Test fixes * Improvements * Test fix
-
- Aug 03, 2023
-
-
Cam Saul authored
* Migrate collection and permissions namespaces to Malli * Fix docstring * Fix Kondo warnings
-
- Aug 02, 2023
-
-
Cam Saul authored
-
Ngoc Khuat authored
-
- Jul 31, 2023
-
-
Noah Moss authored
-
- Jul 24, 2023
-
-
Cam Saul authored
-
- Jul 14, 2023
-
-
Cam Saul authored
-
- Jul 05, 2023
-
-
Case Nelson authored
* [MLv2] Native query functions for changing db and collection-name * Rename feature to be more specific * Use native-extras based on feedback * Fix missed rename
-
- Jul 04, 2023
-
-
john-metabase authored
This reverts commit 9da0bd76.
-
- Jun 23, 2023
-
-
metamben authored
-
- Jun 21, 2023
-
-
Cam Saul authored
* `:metadata/field` => `:metadata/column` * Merge master
-
- Jun 20, 2023
-
-
Noah Moss authored
* initial prototype w/out statement count parameter * new approach * default-database-role driver method * migration for connection_impersonations table * conn impersonation model, API and tests * impersonation fetch and deletion endpoints * switch test to t2 with-temp * read conn impersonation settings from DB * fix merge issue * add impersonated key to data perms graph and treat it the same as full self-service access * include impersonated key in returned permissions graph * make sure impersonated graph passes StrictDataPerms validation * fix boolean logic * make sure impersonated keyword doesnt cause error when deleting gtaps * clear impersonations as necessary when perms graphs changes * add impersonation support for postgres * fix typo * make sure impersonation updates are a non-lazy seq * add impersonated-user? fn * fix impersonation api tests * fix snippet tests * fix build & exclude connection impersonations from serialization * switch a test to use t2.with-temp * add with-impersonations helper and util tests * move macro and add a connection impersonation driver-level test for postgres * fix rebase issue * more tests and code reorganization * add snowflake test * clarify comment * fix lint errors * fix final kondo error * reorganization * fix one test * fix lint errors * revert change to sql_jdbc.execute from bad merge * make sure perms for all users gets reset after conn impersonation tests * ignore exceptions when restoring perms * fix postgres test * refactor to address bryan's comment * add note about new methods to database changelog * driver method refactor
-
john-metabase authored
-
- Jun 17, 2023
-
-
Cam Saul authored
* Squash * Replace connection-with-timezone usages * Add deprecation warning. * Fix docstring
-
- Jun 16, 2023
-
-
john-metabase authored
Resolves #28792 * Always create a transient dataset for BigQuery tests * Simplifies BigQuery test data code * More BigQuery test data code cleanup * More BigQuery test data code cleanup, test fix * Extracts test-db-name in bigquery tests, restores normalize-name * Fixes BigQuery QP tests for new test DB name scheme * Removes extraneous clojure.core * Updates bigquery QP test helper code style * Cleans up comments and code in bigquery test data * Update modules/drivers/bigquery-cloud-sdk/test/metabase/driver/bigquery_cloud_sdk/query_processor_test.clj Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
- Jun 15, 2023
-
-
john-metabase authored
-
- Jun 08, 2023
-
-
Ngoc Khuat authored
-
- Jun 07, 2023
-
-
john-metabase authored
Updates Snowflake driver to decode uploaded private key file data if necessary
-
- Jun 02, 2023
-
-
Cam Saul authored
Use MLv2 for metadata calculation in QP (part 1); make column name calculation consistent with QP (#29583) * Simplified impl * Add #31266 test * Yay * Very nice * Test fixes * Fix Kondo warnings
-
Cam Saul authored
* Ban `tt/with-temp` and convert usages to Toucan 2 * Ban `tt/with-temp*` and convert usages to Toucan 2 * Revert changes not meant for this PR * Ban `mt/with-temp` and replace usages with `t2.with-temp/with-temp` * Fixes
* Fix indentation * fix syntax in models.secret_test --------- Co-authored-by:Ngoc Khuat <qn.khuat@gmail.com>
-
john-metabase authored
-
Cam Saul authored
* Ban `tt/with-temp` and convert usages to Toucan 2 * Ban `tt/with-temp*` and convert usages to Toucan 2 * Revert changes not meant for this PR
-
- Jun 01, 2023
-
-
Nemanja Glumac authored
This should resolve vulnerability found by Trivy scan. https://github.com/metabase/metabase/security/code-scanning/95
-
- May 26, 2023
-
-
lbrdnk authored
* Fix native source query handling for mongo * Add test for mongo nested native query * Fix mongo `aggregation-at-index` usage * Add test for source query with aggregation and sort * Adjust test for presto and oracle * Add PR suggestions
-
- May 24, 2023
-
-
Ikko Eltociear Ashimine authored
betwen -> between [ci skip]
-
- May 19, 2023
-
-
metamben authored
Fixes #29678.
-
- May 18, 2023
-
-
john-metabase authored
Formatting of BigQuery will use the MySQL dialect for now.
-
- May 17, 2023
-
-
Nícolas Sims Botelho authored
* feat: allow authorization token for druid database * fix: adjust in basic auth header and new field username * fix: add scenario test * fix: remove debug code * fix: use metabase-plugin for new fields and improve tests * fix: change type of auth-token to password * fix: adjustment tested * fix: adjustment tested --------- Co-authored-by:
Nícolas Botelho <nicolas.botelho@piposaude.com.br> Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
Cal Herries authored
* Fix subsitution of exclude- params * Rename fn to `not-single-date-type?` * Add docstring * Remove comment * Fix substitution * Fix errors when param values are not strings * Exclude bigquery from the test * Fix testing description * Use users table instead * Fix docstring
-
- May 16, 2023
-
-
dpsutton authored
Each test run can create schemas where we put persisted models. Normally these are thrown away when the test runner disconnects the db. But cloud is a persistent resource and they don't just fall away automatically. We create a cache_info table in each persisted schema: ```sql -- postgres/redshift test-data=# select * from metabase_cache_424a9_379.cache_info ; key | value ------------------+-------------------------------------- settings-version | 1 created-at | 2023-03-29T14:16:24.849866Z instance-uuid | 407e4ba8-2bab-470f-aeb5-9fc63fd18c4e instance-name | Metabase Test (4 rows) ``` And we delete these schemas in redshift when creating our test databases when their `created-at` is over 6 hours old. At the moment, there are (`(count (:all-schemas info))`) 420 schemas in redshift that we use on CI. 122 of those are cache schemas. Under a 6 hour threshold, 121 are recent. Under a 1 hour threshold, 2 are recent. We've run out of tables in CI so I'm lowering the threshold for what "recent" is.
-
- May 15, 2023
-
-
Ngoc Khuat authored
* Database to toucan2 * Table to toucan2 * Field to toucan 2
-
- May 11, 2023
-
-
Cal Herries authored
* Add schemas driver feature flag * Add sql_jdbc schemas test * Add more general test * Make schemas feature default to true * Implement supports? for other drivers * Add feature to the driver changelog * Remove redundant schemas from h2 * Spelling fix Pre-rebase SHA: 8a2c7e0 or 5686b2f * MySQL does *not* support schemas * Bad rebase * Typo? Co-Authored-By:
Tim Macdonald <tim@metabase.com>
-
- May 05, 2023
-
-
Cal Herries authored
* Tidy database-supports? defmethods * Fix oracle build * Fix driver * Fix typo * prefer driver/database-supports? instead of driver/supports? * driver/supports? -> driver/database-supports? in tests * Fix foreign-key support for sqlite in tests * supports? -> database-supports? * `supports?` -> `database-supports?` * supports? -> database-supports? * Update supports? docstring * Fix tests * Fix test * Remove unused require * Add mt/with-everything-store in tests * fix test * Fix tests * Add note in driver changelog
-
- May 03, 2023
-
-
metamben authored
Fixes #26054. The Snowflake JDBC driver is buggy: schema and table name are interpreted as patterns in DatabaseMetaData.getPrimaryKeys and DatabaseMetaData.getImportedKeys calls. This PR replaces the default JDBC functions with ones that escape the names.
-
- Apr 25, 2023
-
-
Cam Saul authored
* MLv2: use kebab-case keys in Clojure & camelCase in JS * Revert changes to tests
-
- Apr 24, 2023
-
-
Luiz Arakaki authored
-