This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Dec 06, 2022
-
-
Braden Shepherdson authored
-
Alexander Polyankin authored
-
Ngoc Khuat authored
-
- Dec 05, 2022
-
-
Cam Saul authored
-
Braden Shepherdson authored
It could generate Dimensions which depend on their own parent Fields, which causes the Fields to have circular deps and fail to load. This prevents Fields from allowing dependencies on themselves.
-
- Dec 02, 2022
-
-
Cam Saul authored
* Fix `has-user-setup` Setting not being cached correctly * Fix Kondo error
-
Aleksandr Lesnenko authored
* pie percent switch * review * Migrate to card viz-settings v.2 (#26798) * Migrate to card viz-settings v.2 This uses the new :pie.percent_visibility key (an enum) instead of a collection of booleans [#26776] * Move to def-json-migration * Don't migrate empty values * fix specs Co-authored-by:
Tim Macdonald <tim@metabase.com>
-
- Dec 01, 2022
-
-
Mahatthana (Kelvin) Nomsawadi authored
* Refactor so static combo chart is ready for reordering * Correct test names * Clean up static viz combo chart BE API * sort static combo chart * Order static funnel chart * Remove unused import and function * Fix BE tests * Remove custom column name tests since logic is moved to FE * Remove graph.series_order when changing dimensions (#26842) * review Co-authored-by:
Nick Fitzpatrick <nick@metabase.com> Co-authored-by:
Aleksandr Lesnenko <alxnddr@gmail.com>
-
Cal Herries authored
* Implement now for sql drivers * Remove unused import * Add tests * Add more tests * Implement bigquery, mysql, postgres * Test now as argument * Fix FE type inferencer * Change feature flag to date-arithmetics * Implement h2 driver * Fix tests for sqlite * Add snowflake implementation * Remove type test * Fix test for sqlite * Update how we handle autocomplete and format for zero-arity functions in ExpressionEditor (#26563) * Update suggestionText function * Suggest with closing parens if zero-arity * Format zero-arity functions with () * Refactor formatFunction * Remove unused imports * Add presto implementation * Add sqlserver implementation * Test in multiple timezones * Remove setting test driver * Add sparksql implementation * Fix count() fe unit test * Add fe MBQL unit test for now() * Fix sparksql implementation * Add vertica implementation * Add oracle implementation * Add vertica implementation * Remove accidental form * Fix vertica implementation for report timezones * Remove unused multimethod * Remove unused feature * Update sparksql * Fix fe unit tests * Fix fe unit tests * Update hive implementation * Revert "Fix fe unit tests" This reverts commit fde4dd0d. * Revert "Fix fe unit tests" This reverts commit 7b7429ea. * Revert "Fix count() fe unit test" This reverts commit c5c6f6f9. * Revert "Refactor formatFunction" This reverts commit ac50e73e. * Revert "Update how we handle autocomplete and format for zero-arity functions in ExpressionEditor (#26563)" This reverts commit cf39634e. * Update hive * snowflake: convert type to timestamptz * sqlserver: rename date-trunc to zeroed-date-part * Wrap with database type info * Change fe unit test back to now without parens * Change MBQL clauses config for now to return type "datetime" * Fix presto * Add some fe unit tests for parsing and resolving * Update helper-text-strings * Change from second to millisecond precision * Remove test for second precision * presto: Change from second to millisecond precision * vertica: Change from second to millisecond precision * vertica: Change from second to millisecond precision * Change feature flag from date-arithmetics to now * Change feature flag from date-arithmetics to now, mbql schema * Allow now to be used in filter clauses * Add test for filter * Implement driver/database-supports? for each driver that implements :now * Tidy tests * Add back default sql implementation * Add sqlite feature flag * Add mongo implementation * Fix mongo * Format rows * Change vertica to return timestamp with time zone * Fix presto tests * Remove unused require * Update h2 function to return timestamp with time zone * mongo: calculate now during query execution, not processing, for versions >=4.2 (#26822) * replace with $$NOW * Remove unused import * Add back previous now implementation for versions <4.2 * Throw an error if version is <4.2 * Add i18n * Ignore patch version * Clean up `SchedulePicker` component (#26839) * Move `SchedulePicker` to its own directory * Sort imports * Do basic clean up * Extract `DEFAULT_DAY` to a constant * Extract styled components * Convert `SchedulePicker` to TypeScript * Add `SchedulePicker` container * Export `SchedulePicker` options * Add basic `SchedulePicker` story * Fix `SchedulePicker` crashes Storybook * Tweak Storybook file * Build datetime filters as datetime before question is saved (#26679) * Revert "Update h2 function to return timestamp with time zone" This reverts commit f7cce3ea7ccbbfc886d0942d66b1f8f60feb6aba. Co-authored-by:
Gustavo Saiani <gus@metabase.com> Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com>
-
Noah Moss authored
* initial implementation * some refactor and improved error handling * another refactor * fix reflection warning * add test and more refactor * another test * misc comment improvements and formatting * fix tests * small refactor * fix function call * address tamas's comments
-
Braden Shepherdson authored
There are now three top-level trees: - regular `collections/path/to/collection/...` - `:namespace :snippet` collections in `snippets/path/to/collection/...` - `databases/mydb/schemas/PUBLIC/tables/customers/fields/name.yaml` The path for any given entity is determined by the `serdes.base/storage-path` multimethod. On the ingestion side, things are a bit tricky because the paths don't map directly to `:serdes/meta` hierarchies anymore. Instead each model registers a function to turn a file path into either a `:serdes/meta` hierarcy or nil for a bad match. Ingestion will fetch all these functions once and then try them all in arbitrary order until one matches.
-
Ngoc Khuat authored
* datetime-add, datetime-subtract, temporal-extract, convert-timezone now can takes datetime literal as argument * fix vertica
-
- Nov 30, 2022
-
-
Ngoc Khuat authored
* convert-timezone for mysql, mariadb, sqlserver, oracle * sqlserver doesn't understand Asia/Ho_Chi_Minh * vertica * skip report-tz tests for sqlserver * use the util fn to check args for convert-timezone * fix for vertica not formatting in report-tz
-
- Nov 29, 2022
-
-
Cam Saul authored
* Include Amazon Athena support for dacort/metabase-athena-driver * Use Metabase Maven repo to fetch Athena driver * Copy test extensions from Damon's Athena driver repo * Some code cleanup. * Move namespaces => metabase.driver.athena * Clean up the test extensions namespace * 42 failures, 16 errors * Fix regex support; disable a few tests * Minor tweaks * Fix data-source-name * Fix :week and :day-of-week impls (mostly): 2 failures, 3 errors * Fix OFFSET, :week-of-year; skip test that has TIME column * Add Athena to CircleCI config. Don't wait for Java 11 tests to finish before driver tests. * ALL TESTS ARE PASSING! <3 * Copy fixes for https://github.com/dacort/metabase-athena-driver/issues/115; add test * We don't need to prep source files or fetch dependencies before running backend tests. * Fix Eastwood error. * Tweak CircleCI config. * Fix TIMESTAMP WITH TIME ZONE * Include the Athena/Redshift repos in the build-drivers deps.edn * Build and release scripts need to have the :mvn/repos as well * Revert change that enabled test for Presto * Un-enable failing test for Snowflake as well. * moves all is clauses into the test - previously only the first few tests were being run * Sort ns in `metabase.driver.athena-test` * Prevent athena's log4j2.properties file from becoming log config athena includes log4j2.properties top-level with the properties: ``` status = debug rootLogger.level=debug ``` And this kills our beautifully crafted logging. Set "log4j2.configurationFile" in bootstrap to our own log4j2.xml. Log4j2 looks in a few places for its logging config, the first of which is the properties file. So when the jar is loaded, log4j2 considers this a logging config change and we lose our logging. Co-authored-by:
Damon P. Cortesi <d.lifehacker@gmail.com> Co-authored-by:
Bryan Maass <bryan.maass@gmail.com> Co-authored-by:
dan sutton <dan@dpsutton.com>
-
Braden Shepherdson authored
-
Mahatthana (Kelvin) Nomsawadi authored
* Match static combo chart colors with app viz colors * Match colors when individual series color is set * Remove tests that test colors Since colors is now determined in FE * Fix static viz Series type * Match static progress bar colors with app viz colors * Simplify Clojure code, makes it more idiomatic * Fix certain combo charts don't respect whitelabel colors * Make Clojure code more idiomatic * Fix Series type * Add colors back to static internal page * Simplify type predicate * fix colors matching for multiple series with mulitple metrics or dimensions * Handle legends not formatted in static viz in some cases * Fix failed BE tests after BE API changed * Fix failed BE tests after BE API changed * Add multiple series dashcard test to `getSeriesWithColors` test * Add `getSeriesWithLegends` tests * Fix URL `/_internal/static-viz` not loading due to API change * Correctly render legend when having dashcard title set * Simplify combo-chart API don't really need `settings-seqs` yet * Make static combo chart component type easier to understand * Address review: refactor `render-multiple-lab-chart` * Make variable names easier to understand * Simplify color API * Address review on `body.clj` * Address review, make parameter name more consistent * Fix multiple scalars not rendering * Remove unused imports
-
- Nov 28, 2022
-
-
Ngoc Khuat authored
convert-timezone now requires source-timezone if the input column doesn't have timezone
-
john-metabase authored
* Adds rollback where necessary to v45 migrations * Adds linter for migrations requiring rollback key * Removes unused writeback table migrations * Removes migrate down-one subcommand
-
Bryan Maass authored
-
- Nov 22, 2022
-
-
adam-james authored
* Fix bug where grouping strategy would NPE when fingerprint was `nil` The axes grouping relies on fingerprint data existing, AND for now only works on :type/Number columns, so this bugfix guards against those situations where the logic would fail. The bug that brought this to my attention came up when there was a Custom column. This set the col-meta count to be one greater than the count of the 'real' columns, which threw off my old assumptions, where if the grouped-columns count was less than the total col-meta count, you had a potential grouping. This broke in part because some custom columns are essentially derived from a real column, and so will most likely be groupable with the column they're derived from. Anyway, this filters out columns that won't work, so we hopefully eliminate the problem. * Update src/metabase/pulse/render/body.clj Co-authored-by:
Tim Macdonald <tim@metabase.com> * Fix some broken logic Co-authored-by:
Tim Macdonald <tim@metabase.com>
-
Ngoc Khuat authored
-
Braden Shepherdson authored
This was breaking Metabase's understanding of foreign keys after deserialization.
-
Cal Herries authored
-
- Nov 18, 2022
-
-
adam-james authored
* First pass at grouping axes This PR uses the results_metadata key to look at fingerprints for numerical axes to try determine if each series on the Y axis can be sanely represented on the same axis. This is done by calculating an overlap (some value between 0 and 1) and grouping all axes on the LEFT if they pass the threshold, which is some value between 0 and 1. The overlap is always calculated when there is SOME overlap between the ranges of each axis, and is calculated as: ```clojure (/ (- (max maximums) (min minimums)) (- (min maxiumums) (max minimums))) ``` This is done to try catch situations where one column's range is entirely inside the other, but is much smaller (- max min); such a case would have a small percent overlap by the above calculation, and implies that it might be better to split the axes. * Address feedback. * Fix shape of data in tests of 2 private fns * Add test for split axes * Fixed error in test util * render-utils does with-redef, disallows parallel tests. Makes sense
-
Braden Shepherdson authored
Card, Dashboard, Dimension, Metric, NativeQuerySnippet, Segment and Timeline all now using their `:name` fields for the file label. File names should now be more human-friendly.
-
- Nov 17, 2022
-
-
Alexander Polyankin authored
-
- Nov 16, 2022
-
-
dpsutton authored
* Initial support for pg for `date-diff` * Make the useful-dates closer to one day * Add simple FE stuff * shorter test bodies * Ensure we can use datediff functions in arithmetic expressions * Correctly disable datediff for redshift * simplify var names * Support week * cleanup test * :datediff -> :datetimediff * ngoc's suggestions * Better acceptance test for datetimediff * sort ns * embrace the different cases for results * bigquery day month year * Reverse args * Update test * Centralize tests * Change postgres day, month, year behaviour * Refactor keep identity * Tidy tests * Tidy * Fix bigquery week * Add week tests * Fix bigquery week * Change mysql day, month, year behaviour * Add test for hour, minute, second * Fix postgres hour minute second * Formatting * Fix bigquery hour, minute, second * Formatting * Fix postgres timestamptz * WIP * Allow literals in datediff clauses * Uncomment tests * Fix bigquery when reporting timezone is not UTC * Linting * Moving away from dataset based tests * Add timezone tests for week and tidy * Remove unused import * Consolidate tests * Remove with-time-column dataset * Remove more-useful-dates defdataset * Remove redshift driver WIP * Typo * Move DatetimeLiteral clause into DateTimeExpressionArg * Try changing test order * Remove mt/with-report-timezone-id nil * Add year report timezone tests * Rename * Rename * Remove unused tables from useful-dates * Remove useful-dates * Update helper-text-strings * Tidy * Swap order of mt/with-report-timezone-id * Change with-report-timezone-id; notify databases after running test * Use temp setting for report-timezone instead * Update helper-test-strings * Handle literals in `datetimediff-base-base` * Update src/metabase/driver/postgres.clj Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Simplify postgres second * Tidy: prefer hx arithmetic functions * Drop coercion for string timestamp args for now * Extract helper * Revert "Change with-report-timezone-id; notify databases after running test" This reverts commit 7abb543bed13d9d13295d0e00ad1293a40e40d53. * Use ->timestamptz * Use hx/->timestamp * Rename dataset * Undo changes to datetime-arithmetics? as these will not match by default * Use proper format for offset datetime literals * Shorten datetime literals in tests * Removing notify-all-databases-updated from report-timezone setting * Fix datetime-arithmetics test * Revert "Fix datetime-arithmetics test" This reverts commit 9141582508170bdbe99c4aa74bc4444e41475be6. * Revert "Undo changes to datetime-arithmetics? as these will not match by default" This reverts commit 9cb05f5475b24a78cb89601c918f3440606cc525. * Add UTC timezone to tests * Coerce strings to datetimes for ISO formats * Revert "Removing notify-all-databases-updated from report-timezone setting" This reverts commit 37356435a2e3981deca9ae76118d857babb2aada. * Add comment to postgres driver implementation * Formatting * Disable datediff from redshift for the moment (for ever?) * Override redshift driver/database-supports? * Fix comments mixed up by refactoring * Fix comments mixed up by refactoring 2 * Tidy comment * Rename datetimediff to datetime-diff/datetimeDiff * date-add -> datetime-add * Linting * add datetime-subtract to `datetime-arithmetics?` rework tests a bit as well. * Update docstring * Use ->temporal-type and trunc to handle report-timezone for bigquery * Log errors caught during sync steps (#26306) * log errors caught during sync steps * remove accidental extra parens * Errors combining datetime interval addition with datetime functions (#26279) * Add failing tests * Fix failing tests * Update shared/src/metabase/mbql/util.cljc Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com> * datetime-add and datetime subtract should annotate type by col type * Fix infer-expression-type for datetime-add/subtract with second, minute, hour * Undo last commit; they actually always return :type/DateTime * Fix test based on last commit * Undo unrelated refactor * Only test drivers that support expressions * Only test drivers that support expressions, again * Update tests from legacy mbql * Change infered-col-type to be a function again, not macro * Fix test Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com> * whitespace * Remove comments * Add explanation for datetime_diff * Refactor: replace cast and add `mt/with-driver :bigquery-cloud-sdk` where report-timezone is relevant * Add failing tests * Fix failing tests * Technically it should be bigquery-type * Update modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj Co-authored-by:
Cam Saul <1455846+camsaul@users.noreply.github.com> * Move documentation to metabase.mbql.schema * Update DatetimeDiffUnits Co-authored-by:
Cam Saul <1455846+camsaul@users.noreply.github.com> * Add error type and optimize case expressions to driver implementations * refactor for brevity * Fix error with postgres * Fix error with postgres * Handle string literal parsing in wrap-value-literals * Remove ->timestamptz * Add comments + TODOs showing arithmetic expressions should return numeric values * Add explanation of arithmetic expression as docstring * Add test for normalize-mbql-clause-tokens * Remove unused import * Remove unused form * Switch tests to use attempted-murders dataset * Undo optimization that broke tests * Validate non-temporal types for bigquery * Add error handling for incorrect types * Fix mysql type checking * Fix mysql type checking * invalid-parameter -> invalid-query * Use date-trunc and extract * Remove unit error handling * DatetimeLiteral -> DateOrDatetimeLiteral * Remove unused binding * Fix mysql type checking Co-authored-by:
Callum Herries <hi@callumherries.com> Co-authored-by:
Cal Herries <39073188+calherries@users.noreply.github.com> Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com> Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com> Co-authored-by:
Cam Saul <1455846+camsaul@users.noreply.github.com>
-
Noah Moss authored
* add app DB and version to common snowplow event context * use .getDatabaseProductName for db type * fix kondo error * add new instance schema with app db type and version fields * add maxLength to new fields * address cam's feedback
-
- Nov 15, 2022
-
-
Jeff Bruemmer authored
-
Alexander Polyankin authored
-
Aleksandr Lesnenko authored
* fix showing placeholder series * row chart polish * wip * don't use nice x ticks for stacked expand chart * make grouped row not clickable * update specs * update specs
-
Ikko Ashimine authored
infomation -> information
-
- Nov 14, 2022
-
-
Braden Shepherdson authored
This also changes the semantics of `metabase.models.serialization.base/load-find-local` to return the whole entity, not just the ID. `load-one!` always needs the whole entity (if it exists) anyway, and some of the `load-find-local` implementations had the entity already loaded but just passed along the ID. This saves some double lookups, especially for inlining eg. `DashboardCard`s under `Dashboard`.
-
Cam Saul authored
Move the config-from-file code into the advanced-config directory since that's the feature we want to flag on (#26461)
-
Braden Shepherdson authored
-
dpsutton authored
-
- Nov 11, 2022
-
-
Noah Moss authored
* realize lazy seqs during exports * add test & helper * update based on tamas's comment * use mapv * remove unused import * try to fix test * switch to using just a LocalDate for the second test since the ZonedDateTime test was failing for certain drivers and not others, and that isnt relevant to this test
-
- Nov 10, 2022
-
-
Cal Herries authored
* Add failing tests * Fix failing tests * Update shared/src/metabase/mbql/util.cljc Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com> * datetime-add and datetime subtract should annotate type by col type * Fix infer-expression-type for datetime-add/subtract with second, minute, hour * Undo last commit; they actually always return :type/DateTime * Fix test based on last commit * Undo unrelated refactor * Only test drivers that support expressions * Only test drivers that support expressions, again * Update tests from legacy mbql * Change infered-col-type to be a function again, not macro * Fix test Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
- Nov 09, 2022
-
-
Noah Moss authored
* log errors caught during sync steps * remove accidental extra parens
-
- Nov 08, 2022
-
-
Noah Moss authored
-