Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 25, 2021
    • Jeff Evans's avatar
      Update Presto JDBC lib version (#17591) · 0023987f
      Jeff Evans authored
      0.254 -> 0.260
      Unverified
      0023987f
    • dpsutton's avatar
      Effective type in result cols (#17533) · 32a0d6cb
      dpsutton authored
      * Include the results base type as the cols effective type
      
      previously was merged the effective type from the col which caused
      issues with dates when selecting a particular temporal unit, ie month.
      
      Queries like this return months as integers so the base and effective
      types are :type/Integer, and something somewhere else is responsible
      for the unit conversion of `1` to January (or feb, months get weird i
      think)
      
      ```clojure
      
      ;; after
      {:description "The date and time an order was submitted.",
       :unit :month-of-year,
       :name "CREATED_AT",
       :field_ref [:field 4 {:temporal-unit :month-of-year}],
       :effective_type :type/Integer, ;; we have the proper effective type
       :display_name "Created At",
       :base_type :type/Integer}
      
      ;; before:
      {:description "The date and time an order was submitted.",
       :unit :month-of-year,
       :name "CREATED_AT",
       :field_ref [:field 4 {:temporal-unit :month-of-year}],
       :effective_type :type/DateTime, ;; included effective type from db
       :display_name "Created At",
       :base_type :type/Integer}
      ```
      
      * tests
      
      * Driver tests
      
      * Ignore effective/base types in breakout tests
      
      sparksql is weird and its totally unrelated to the file under test
      
      * Use correct options for datetimes that are projected to month, etc
      
      When aggregating by a datetime column, you can choose a unit: month,
      hour-of-day, week, etc. You often (always?) end up with an
      integer. Previously the base_type was (inexplicably) :type/Integer and
      the effective_type was :type/DateTime which really just didn't make
      sense. The ideal solution is :type/DateTime as the base_type and
      :type/Integer as the effective_type. But this breaks the frontend as
      it expects to treat these columns in a special way. But it expected
      them to report as date columns.
      
      I've changed it only here. I thought about making isDate understand
      the `column.unit` attribute and recognize that these are in fact
      dates, but that seems wrong. These are integers that are special
      cases. It seems that the contexts that need to talk about dates should
      understand integers in a special way than all date code needs to be
      aware that integers might flow through.
      
      This might mean extra work but ultimately feels better as the correct
      solution.
      
      * unit is not default
      Unverified
      32a0d6cb
  2. Aug 24, 2021
    • Jeff Evans's avatar
      Add Kerberos support to Presto JDBC Driver (#16307) · f5cf4748
      Jeff Evans authored
      * Add Kerberos support to Presto JDBC Driver
      
      Adding Kerberos properties as DB details properties
      
      Refactoring utility methods for dealing with additional options
      
      Adding test for Kerb properties -> connection string
      
      Adding GitHub action to run integration test
      
      Start to move logic for capturing necessary files to new script, and calling that from mba run
      
      Adjust settings in `metabase.test.data.presto-jdbc` to capture test parameters
      Unverified
      f5cf4748
    • Jeff Evans's avatar
      Support counting grouped on an aggregated field in BigQuery (#17536) · ee73902a
      Jeff Evans authored
      Fix counting on grouped aggregated field
      
      Adding QP test
      
      Reworking the BigQuery version of the :breakout to more closely match the structure of the standard sql.qp version
      Unverified
      ee73902a
  3. Aug 23, 2021
    • Howon Lee's avatar
      Mongo custom expressions (#17117) · eb25bc71
      Howon Lee authored
      Mongo custom expressions now are turned on for mongo 5.0 and after only. One idiosyncrasy is that we don't really support the BSON ID format at all in our typesystem despite having it in there, but both of my attempts to get them to work with the native mongo pipeline commands bounced because they really aren't strings, they're BSON ID's. We do rely on the pipeline commands heavily which is the reason for the version requirement.
      Unverified
      eb25bc71
  4. Aug 20, 2021
    • Jeff Evans's avatar
      New BigQuery Driver (#16746) · a980e085
      Jeff Evans authored
      New BigQuery Driver
      
      Create new :bigquery-cloud-sdk driver using the google-cloud-bigquery library instead, and whose source is adapted from the :bigquery driver
      
      https://cloud.google.com/bigquery/docs/reference/libraries
      
      Marking existing :bigquery driver as deprecated, and superseded-by the new one (bigquery-cloud-sdk)
      
      Update new driver and query processor code to use newer Google SDK
      
      Switch test data loading over to use new API
      
      Add project-id connection property to override the value from the service account JSON, and use it as part of qualified names in the query processor if set
      
      Updating google driver so its libraries are compatible with the newer ones used in BigQuery
      
      Update date bucketing tests to skip :bigquery-cloud-sdk (new driver) where :bigquery is skipped
      
      Update `with-bigquery-fks` to take in the driver, since there are now multiple ones
      
      Adding test to confirm that overriding project-id for a public BQ project works (sync and query)
      
      Fixing a bunch of whitespace alignment errors in tests
      Unverified
      a980e085
  5. Aug 16, 2021
  6. Aug 10, 2021
  7. Aug 05, 2021
  8. Aug 04, 2021
    • Jeff Evans's avatar
      Fix Presto JDBC connection error (#17293) · 7285e3d4
      Jeff Evans authored
      Remove the `driver/can-connect?` implementation and move the `select-keys` logic instead to the existing place in `sql-jdbc.conn/connection-details->spec`
      
      Update test to also include the `:let-user-control-scheduling` details entry
      Unverified
      7285e3d4
  9. Aug 02, 2021
    • Jeff Evans's avatar
      Fixing Presto JDBC issues (#17265) · f4050ff1
      Jeff Evans authored
      Updating schema connection property to have proper display name
      
      Updating display name for database to be "Schema"
      
      Fixing `driver/can-connect?` impl in `presto_jdbc.clj` to actually use the correct driver, and dissoc `:engine` before calling the `sql-jdbc.conn` method
      
      Adding test for the `test-database-connection` method, which is what led to the error from the UI
      Unverified
      f4050ff1
  10. Jul 30, 2021
  11. Jul 29, 2021
  12. Jul 23, 2021
    • Jeff Evans's avatar
      Implement JDBC based Presto driver (#16194) · 80b46b1f
      Jeff Evans authored
      Implement JDBC based Presto driver
      
      Adding new Presto JDBC driver using the PrestoDB JDBC driver from `https://github.com/prestodb/presto`
      
      Marking the old Presto driver as being `superseded-by` the new one
      
      Pulling out common Presto code into new presto-common driver (modeled after the relationship between, ex: `googleanalytics` and `google)`
      
      Putting common QP/HoneySQL logic into the new (abstract) :presto-common driver
      
      Updating :presto driver to extend from the new common driver and only adding HTTP/REST API related methods
      
      Adding implementation of Presto JDBC driver, named :presto-jdbc, extending from :presto-common and :sql-jdbc
      
      Using com.facebook.presto/presto-jdbc as underlying JDBC driver dependency (since this is explicitly for Presto clusters, as opposed to Trino)
      
      Adapting code from the existing Presto driver where appropriate
      
      Adding new dependency-satisfied? implementation for :env-var, to allow for a plugin to require an env var be set, and making the Presto JDBC driver depend on that (specifically: `mb-enable-presto-jdbc-driver`)
      
      Adding CircleCI configuration to run against the newer Presto (0.254) Docker image
      
      Adding explicit ordering in a few tests where it was missing
      
      Fixing presto-type->base-type (timestamps were being synced as :type/Time because the regex pattern was wrong)
      
      Add tx/format-name test implementation for :presto-jdbc to lowercase table name
      
      Make modified test Oracle friendly
      
      Fixing bug parsing the `[:zone :time]` case within `metabase.util.date-2.parse/parse-with-formatter`; the offset is nil so it can't be passed directly in this case, so use the `standard-offset` fn (which was moved from `date-2` to `common` to get a standard offset for that zone
      
      Fixing more test failures by adding explicit ordering
      
      Changing sync to check whether the driver supports foreign keys before attempting to sync those (since drivers might throw an exception if attempting to check)
      
      Moving some common test dataset functionality between :presto and :presto-jdbc to a new test.data ns for :presto-common
      
      Adding HoneySQL form for :count-where, since we have to explicitly give a higher precision Decimal in order for Presto to not reduce the precision in results
      
      Put limit within subquery for `expression-using-aggregation-test` (since ordering from subquery is not guaranteed in Presto)
      
      Adding impls for ->prepared-substitution to handle substitutions for native query params
      
      Adding HoneySQL impls for `mod` (to do as "mod(x,y)" and `timestamp` (since it's a function with no parens to invoke) functions
      
      Adding various `sql.qp/date` impls that use the `AT TIME ZONE` operator to account for report tz, and make bucketing tests happy
      Unverified
      80b46b1f
  13. Jul 22, 2021
    • Jeff Evans's avatar
      Remove regionid from Snowflake config (#16740) · 940154d9
      Jeff Evans authored
      Remove regionid from plugin YAML file
      
      Add new driver multimethod to `normalize db-details`, and implementing to handle this particular "migration" within Snowflake
      
      Adding hook from database model post-select to invoke the new multi
      
      Adding test
      Unverified
      940154d9
  14. Jul 15, 2021
  15. Jun 28, 2021
  16. Jun 23, 2021
  17. Jun 15, 2021
    • Nemanja Glumac's avatar
      Merge `release-x.39.x` including ae6e9d9f (#16575) · 835fba84
      Nemanja Glumac authored
      * Cleanup from dump-load-entities-test (#16281)
      
      Updating dump-load-entities-test test so that dump dir is actually deleted at the end
      
      * Revamp Cypress custom commands (#16292)
      
      * Extract UI custom commands
      
      * Extract user related custom commands
      
      * Extract overwrites
      
      * Extract permissions related custom commands
      
      * Extract API custom commands
      
      * Extract helpers custom commands
      
      * Extract database related custom commands
      
      * Rename `helpers` group to `visibility`
      
      * Rename custom command `isInViewport` to `isRenderedWithinViewport`
      
      * Unskip repro for #15119 (#16297)
      
      * Create composite Cypress custom command `cy.createQuestionAndDashboard` (#16294)
      
      * Add composite Cypress custom command `createQuestionAndDashboard`
      
      * Refactor the existing test to use new Cypress custom command
      
      * Refactor repro for #13062 using the new Cypress custom command
      
      * Use the `describe` block instead of using `forEach` for complex repro
      
      * Add space between test cases
      
      * #12629 Repro: Human-readable number formatting not working properly (#16231)
      
      * Fix `nosql` user's email address (#16306)
      
      * Generate correct SQL for columns from joins inside other joins or source queries (#16254)
      
      * Fix joining a join inside a nested queries (#12928)
      
      * Code cleanup & dox
      
      * Tests for #13649
      
      * Test fixes :wrench:
      
      
      
      * Remove unit tests snapshots (#16321)
      
      * Remove snapshots from `Calendar.unit.spec.js`
      
      * Remove snapshots from `DashCard.unit.spec.js`
      
      * Remove snapshots generated for "internal" components
      
      * Remove unused import
      
      * Remove snapshot related command from `scripts`
      
      * Remove `noSnapshotTest` from internal components
      
      * Remove `react-test-renderer`
      
      * filter nulls out of histograms (#16345)
      
      * #15993 Repro: Click behavior with filter pass-thru does not show filters defined on question (#16342)
      
      * #16334 Repro: Click Behavior targeting a question with filter mapped causes the visualization type to change (#16343)
      
      * Add repro for #16334
      
      * Expand test assertion
      
      * #16327 Repro: Double binning menu for date fields when using Saved Question (Native) (#16359)
      
      * #16322 Repro: "Custom mapping" is only available, when "A list of all values" is set (and after a browser refresh) (#16361)
      
      * #16226 Repro: LDAP/Email settings gets cleared if validation fails (#16364)
      
      * Add repro for #16226
      
      * Extract email settings into a separate file
      
      * Add repro for #16226 (Email)
      
      * switch to column settings when sidebar is already open (#16368)
      
      * align labels on non-bars in combo charts (#16369)
      
      * #16378 Repro: Cannot enable JWT authentication (#16384)
      
      * Fix JS error on JWT settings form (#16394)
      
      * fix default updateSettings function in SettingsBatchForm
      
      * unskip repro
      
      * #12128 Repro: Can't change label on empty row value (#16426)
      
      * Post-merge fix
      
      * Post-merge fix 2
      I didn't solve this merge conflict properly in the original merge.
      
      Co-authored-by: default avatarJeff Evans <jeff303@users.noreply.github.com>
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
      Unverified
      835fba84
  18. Jun 11, 2021
  19. Jun 08, 2021
  20. Jun 01, 2021
  21. May 24, 2021
    • dpsutton's avatar
      Yyyymmddhhmmss date strings (#15790) · 6a632764
      dpsutton authored
      * Add yyyymmddhhss coercions to type system
      
      * Implementations for h2/mysql/postgres for yyyymmddhhss bytes and strings
      
      * Mongo and oracle
      
      * Adding checksum on migration it said was bad
      
      * import OffsetDateTime
      
      * Redshift and bigquery
      
      * snowflake expectations
      
      * sql server yyyymmddhhmmss. have to format the string then parse
      
      sqlserver lacks a parse function that takes a format string, they just
      take an integer that specifies a predefined format string. So we have
      to make the string into the right format then parse.
      
      * presto yyyymmddhhmmss
      
      * Test byte conversions
      
      * Remove errant `mt/set-test-drivers!`
      
      * Remove sqlite, change keyword for multiple native types in def
      
      the spec couldn't handle different shapes under the same keyword. so
      just use :natives {:postgres "BYTEA"} :native "BYTEA"
      
      * Make schema work with different shape maps
      
      * hx/raw "'foo'" -> hx/literal "foo" and remove checksums
      
      * _coercion_strategy -> _coercion-strategy
      
      * Handle coercion hierarchy for :Coercion/YYYYMMDDHHMMSSBytes->Temporal
      Unverified
      6a632764
  22. May 20, 2021
    • Howon Lee's avatar
      Reduce fieldname friendliness (#16119) · c3f97bbb
      Howon Lee authored
      We made fieldname friendliness, people didn't like it, we tried to fix it, people still didn't like it, now we're just making the fieldnames all mildly unfriendly again. Not like, snake_case unfriendly, but Pascal Case With Spaces unfriendly
      Unverified
      c3f97bbb
  23. May 17, 2021
    • Cam Saul's avatar
      Fix Druid queries with temporal Fields that don't have a :temporal-unit (#16028) · b0d9436a
      Cam Saul authored
      * Fix Druid queries with multiple filters if some but not all are temporal
      
      * Fix Druid queries with temporal Fields that don't have a :temporal-unit
      
      * Test fix :wrench:
      
      * Fix syntax errors
      
      * Query result metadata should return the :unit from the source query when applicable
      
      * Test fix :wrench:
      
      * Clarify comment in test
      
      * More test fixes :wrench:
      
      * Test fix :wrench:
    • Cam Saul's avatar
      Add Semantic/* and Relation/* ancestor types (#15994) · 9700fe5b
      Cam Saul authored
      * Port legacy data type migrations -> Liquibase
      
      * Fix migration IDs
      
      * Field type validation/error handling
      
      * Have semantic type fallback to nil
      
      * Fix semantic-type-migrations-test
      
      * Fix migrations
      
      * Revert accidental changes
      
      * Semantic/* & Relation/* ancestor types
      
      * Fix stray Relation/PK and Relation/FKs
      
      * Semantic/* and Relation/* ancestor types
      
      * cljs test fix
      
      * Fix :require
      
      * FE test fixes :wrench:
      
      * Test fixes :wrench:
      
      * prettier
      
      * PR  f e e d b a c k
      
      * Use medium size CircleCI image for Presto to prevent all the OOMs
      
      * Backport dir-locals tweaks from hierarchy PR
      
      * Redshift: only sync the test schema (faster CI and fix failure)
      
      * Better error handling for sync in tests
      
      * Revert accidental commit
      
      * Redshift test fixes :wrench:
      Unverified
      9700fe5b
  24. May 13, 2021
  25. May 05, 2021
  26. May 04, 2021
  27. May 03, 2021
    • Jeff Evans's avatar
      Capture and log diagnostic info about DW connection pools (#15682) · 47ab8f22
      Jeff Evans authored
      Add new namespace to manage diagnostic info about the DW DB connection pools
      
      Adding new atom/fn/macro to wrap the capture of diagnostic info, modeled after the call counting functionality of toucan.db
      
      Capturing diagnostic info from a new `datasource-with-diagnostic-info!` fn in the execute namespace, and calling that from the various drivers (instead of `datasource`)
      
      Adding to log message generated for the "stats" portion of the line logged via middleware to output this information
      Unverified
      47ab8f22
  28. Apr 27, 2021
  29. Apr 26, 2021
    • Jeff Evans's avatar
      Set c3p0 dataSourceName property to include Metabase specific info (#15681) · 478ec730
      Jeff Evans authored
      Set c3p0 dataSourceName property to include Metabase specific info
      
      Change data-warehouse-connection-pool-properties multimethod to include database as 2nd param
      
      Setting the dataSourceName c3p0 property to have the format db-<N>-<D>-<DB> where <N> is the DW database ID, <D> is the driver name, and <DB> is the database name from the db details
      
      Adding test
      
      Setting c3p0 dataSourceName for the app DB pool as well
      Unverified
      478ec730
  30. Apr 12, 2021
    • Dalton's avatar
      Dashboard parameter field filter operators feature flag (#15519) · a362e2f3
      Dalton authored
      
      * Backend feature flag for new field filters
      
      * Feature flag new parameter options
      
      When the "field-filter-operators-enabled?" flag is disabled we do the following:
      1. Replace new operator options with old category and location/city, etc., options
         in the PARAMETER_OPTIONS list found in metabase/meta/Parameter.js
      2. Hide numbers section in the PARAMETER_SECTIONS list found in
         metabase/meta/Dashboard.js
      3. Return args as-is in the mapUIParameterToQueryParameter function
         found in metabase/meta/Parameter.js
      
      React/UI code handles both old options and new options so doesn't need
      to change. Old parameter types like "category" and "location/city" are
      treated like "string/=" in the UI but retain their own parameter type
      when used to send a new query.
      
      * Fix FE issues caused by meta/Parameter refactor
      
      * mock the field operator param flag to make tests pass
      
      * add/fix cypress tests
      
      * fix import in ParametersPopover
      
      * update widget tag type
      
      * Enable field filter operators for cypress tests
      
      * Question marks are questionable
      
      * Conditionally use category or string/= if field filters are enabled
      
      * rmv mocks where we don't need them
      
      * rmv mock from chained-filters test
      
      * env vars as string in project.clj, alignment
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Unverified
      a362e2f3
  31. Apr 09, 2021
  32. Apr 02, 2021
    • Jeff Evans's avatar
      Only attempt to sync schemas that have some/any possible permissions (#15291) · e8c347b8
      Jeff Evans authored
      Only attempt to sync schemas that have some/any possible permissions
      
      Make syncable-schemas multimethod, whose base implementation is the same as the previous private fn
      
      Override syncable-schemas for Redshift to add a filtering step to the transducer pipeline to check for the schema privilege, by calling the HAS_SCHEMA_PRIVILEGE Redshift function to check for USAGE permission
      
      Making all-schemas function public since it's now invoked from the Redshift driver
      
      Fixing redshift-types-test to remove order flakiness
      
      Adding test that confirms that a real schemas with no permissions aren't synced
      Unverified
      e8c347b8
  33. Apr 01, 2021
  34. Mar 31, 2021
Loading