I don't think we are susceptible to this, but the scanners pick it up
and there's finally a release.
This was merged in https://github.com/metabase/metabase/pull/50642 to
master and will target 53. There's lots of other stuff in there so I'm
opening this smaller, targeted change against the 52 branch
* Add repro for #50925
* Add a test
* Fix the case with whitespace following an incomplete token
* Add test case with bracket identifier following an incomplete token
* Add comments
* Thanks vscode
* Fix the case with bracket identifier following an incomplete token
* Simplify unit tests
* Fix the logic
* Update comment
* Fix it
* Refactor
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
* Throw different error when using a known name that is not a metric
* Drop checking for segments as they cannot be used in aggregation expressions anyway
* Add tests
* Remove redundant withName: true
* Wrap with describe
* Make naming consistent
* Improve copy
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
If a card with a default value doesn't actually require a value, letting people clear the default value can be useful.
However, if the card does require a value, letting people clear the default just throws an error. This is a
completely useless result, so we should use the default value in that case. See [here](https://metaboat.slack.com/archives/C0645JP1W81/p1719233020129649) for more info.
Co-authored-by: William <william@metabase.com>
* [debug] add storybook helper
* Make error on InteractiveQuestion consistent
* Make error on StaticQuestion consistent
* [debug] static question stories
* [debug] InteractiveDashboard Stories
* Make error on InteractiveDashboard consistent
* [debug] StaticDashboard stories
* Make error on StaticDashboard consistent
* [debug] EditableDashboard stories
* Make error on EditableDashboard consistent
* Fix CreateQuestion not working after fixing entity ID states
* Add tests for InteractiveQuestion
* Add StaticQuestion tests
* Add InteractiveDashboard tests
* Add StaticDashboard tests
* Add EditableDashboard tests
* Make variable names consistent
* Extract resource not found error to a component
* Fix missing return
* Make storybook usable and reduce duplications
* Don't roll my own util
* Update error colors following the new design
* Update loki snapshots
* Fix unit test expectation to hex
* Make colors easier to understand with comments
* Update SDK error style
* Update error components copy
* Use Code from metabase/ui
* Remove change accidentally commited
* Fix InteractiveQuestion renders question not found briefly
metabase#51969
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
* Update running.md
Some little details about running Java apps on prod
* Apply suggestions from code review
---------
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
* Filter after summarize drill-thru cleanups (#52175)
* Update comment in automatic-insights drill to point to new github issue
* Move helpers from lib.drill-thru.common to lib.underlying
These funcs deal with "underlying" columns, so move them into lib.underlying.
aggregation-sourced?
breakout-sourced?
strictly-underlying-aggregation?
* Consistent naming for drill-thru multi-stage query tests
* Update multi-stage query drills tests to use new test helpers
* Homogenize apis for drill thru test helpers
Rename prepend-filter-to-stage to prepend-filter-to-test-expectation-stage and make the calling interface match
that of append-filter-stage-to-test-expectation.
* cljfmt
* Update compare-aggregations drill for relocated aggregation-sourced?
* Use drill-thru tests helpers in compare-aggregation tests
---------
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
This change happened in peer
https://github.com/metabase/metabase/pull/51023 and is manifesting now
it seems.
The removal of the call to `(classloader/the-classloader)` is what is
hurting us.
Only clickhouse cloud instances can be set as a suitable upload spot so
i'm doing the following changes in the local jar repro to fix it up:
```clojure
(in-ns 'metabase.driver.clickhouse)
(defmethod driver/database-supports? [:clickhouse :uploads] [_driver _feature db]
true)
(in-ns 'metabase.public-settings)
(let [db_id 2, schema_name "default", table_prefix "upload_"]
(t2/update! :model/Database db_id {:uploads_enabled true
:uploads_schema_name schema_name
:uploads_table_prefix table_prefix}))
```
Co-authored-by: dpsutton <dan@dpsutton.com>
* Update mysql.md
Add an additional flag as a note, since I've hit this one today with a customer
* Update docs/databases/connections/mysql.md
---------
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
* Update activating-the-enterprise-edition.md
another little nitpick, since people tend to get creative with these things and then we end up debugging endless hours
* edit
---------
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
* Update error colors following the new design
* Update loki snapshots
* Fix unit test expectation to hex
* Make colors easier to understand with comments
* Fix E2E tests
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
* Add M2M Oauth to Databricks Driver (#51476)
* Add M2M Oauth to Databricks Driver
* Add toggle for PAT/M2M Oauth
Introduces a 'Use Personal Access Token' toggle button which shows different UI components when setting up the connection. The implementation was inspired by @snoe in #51249
* Address feedback from @ibrdnk
Addresses the feedback related to #pullrequestreview-2515818008
* Default M2M, Add conditional Merge, Reduce whitespace
* Update docs/databases/connections/databricks.md
Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
* Add test for external contribution (#51693)
* Prefer the external PRs docs change (conflict resolution)
* Upgrade databricks jdbc driver
---------
Co-authored-by: Alexander Viala Bellander <42417723+AlexVialaBellander@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
* debug
* [debug] upgrade gh version
* Fix the gh cli by using the latest version
* Fix gh not using the latest version
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
* Update docstring in zoom-in.timeseries
The comment is stale. Construction of dimensions from row data is now done in available-drill-thrus.
* Fix zoom-in.geographic drill thru for mutli-stage queries
* Fix return type schema for lib.underlying/top-level-column
* Add append-filter-stage-to-test-expectation to drill-thru test-utils
* Add tests for multi-stage queries to zoom-in.geographic tests
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
* Fix quick-filter drill thru for multi-staged queries
* Add column-by-name and append-filter-stage to drill-thru test utils
* Add quick-filter tests for multi-stage queries
* Allow drill-thru tests to pass an update fn for :custom-{query,native,row}
The update fn will get passed the default value for the test case based on query-table and query-type. This allows
callers to easily modify or extend the default, rather than having to look it up or recreate it from scratch.
;; same as the standard test query, but with an extra filter stage
:custom-query #(lib.drill-thru.tu/append-filter-stage % "count")
* Use mu/defmethod and mu/defn for column-by-name and append-filter-stage
* Add lib.drill-thru.test-util/prepend-filter-to-stage
* Add lib.drill-thru.tu/test-drill-variants-with-merged-args
A helper function to make it easy to call test-returns-drill or test-drill-application with minor variations of some
base case (for example, drill behavior should remain unchanged when called with a query with filter stage after
aggregations).
* Use test-drill-variants-with-merged-args for quick-filter multi-stage tests
* Add multi-stage quick-filter tests for a couple of unaggregated queries
* Use lib.drill-thru.tu/column-by-name in metabase.lib.drill-thru-test
* Use lib.drill-thru.tu/column-by-name in lib.drill-thru.test-util.canned
* Support skipping tests in test-drill-variants-with-merged-args
* Allow variant-case to be a fn in test-drill-variants-with-merged-args
* Clean up test formatting
* Reduce diff
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
When you order by an aggregation, mbql v2 references the aggregation by uuid. However, that makes the query hash to a different value each time, because you get a different uuid each time you hash it. Converting the query to reference by index during the hashing process fixes this.
Co-authored-by: William <william@metabase.com>
* Show errors from backend in Create API key modal (#51395)
* Add selectDropdown to helpers
* Revert change to yarn.lock
---------
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
We need to preprocess queries (and use the results) to ensure that we properly cast arguments in where clauses
Co-authored-by: William <william@metabase.com>
* fix: Change pool acquireRetryAttemps to 1
Fixes: #51176
* Address PR review and only test dbs with username auth
* Fix model ref
* Exclude hive-like connections
* Ensure user and password
Co-authored-by: Case Nelson <case@metabase.com>
* Set key auth as the default auth method, put warning on username and password
* Fix password / keyfile existing at once
* Address review
Co-authored-by: Case Nelson <case@metabase.com>
* Make renaming options optional in lib.underlying/top-level-column
* Construct dimensions from row data in available-drill-thrus
Construct dimensions from row data once in available-drill-thrus, rather than doing it in each drill that needs it
separately. The dimensions must be constructed in available-drill-thrus since some drills are expected to
return-drills-for-dimensions?, but this also has the side benefit of reducing code duplication by lifting the
rows->dimensions conversion up into a single place.
* Fix the zoom-in.binning drill thru for multi-stage queries
* Add tests for zoom-in.binning with multi-stage queries
* cljfmt
* Explicitly disable the automatic-insights drill for multi-stage queries
Previously, this drill will was implicitly disabled for multi-stage queries because the FE would not pass dimensions
for queries with underlying breakouts / aggregations. Now that dimensions are reconstructed in available-drill-thrus,
automatic-insights drill is available again, but if you try to actually run the drill you get a big scary "Something
went wrong" error, so just explicitly disable the drill until we fix it.
* Update test/metabase/lib/drill_thru/zoom_in_bins_test.cljc
* Review feedback: not-empty -> seq
* Reivew feeback: shadow rather than using a single-quote suffix
* Review feedback: underyling -> underlying
---------
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
* adjusting webhook test response ui
* missed i18n, updating test to check for test response
* show response on error, not success
* parse the request as json response
---------
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
* split up query stage e2e test file (#51583)
* split up query stage tests
# Conflicts:
# e2e/test/scenarios/dashboard-filters-2/dashboard-filters-query-stages.cy.spec.ts
* update for merge to master
* fix
# Conflicts:
# e2e/support/helpers/e2e-misc-helpers.js
# e2e/test/scenarios/dashboard-filters-2/dashboard-filters-query-stages.cy.spec.ts
* fix test to account for not saving in dashboard
---------
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
also, somewhat relatedly, create `elide-fk` function to skip pieces of data holding FKs to deleted targets
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
* fixes showing admin links to not admins in the command palette
* updates calculation to take into account EE advanced permissions allowing certain users permissions to change settings who are not admins
* admin routes for non-admins
* fix unit tests
* actually fix unit tests
* adding checks for other permissions
---------
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Azure Synapse doesn't like it when you give it a uuid parameter, even though synapse does support uuids in general.
Converting those uuids to strings beforehand fixes this error, and regular SQL Server is also fine with that.
Co-authored-by: William <william@metabase.com>
* fix: add supports for xx-YY locales in embed/public-links
* Generate locales.json
* [WIP] Read locales.json
* wip FE implementation
* refactor + unit and sdk component tests
* fixes after the merge, plus tests and cleand up logic
* fix file name in string
* change FE logic to use locales from the instance settings
* revert json generation
* remove leftover comment
* add comment about the code to keep in sync
* migrate e2e tests for static/public to use #locale=de-CH so we test that
it's using the fallback logic
* fix kondo error
* fix unit test
* fix more jest tests
* cy.request -> cy.intercept
---------
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
* fix: add supports for xx-YY locales in embed/public-links
* Generate locales.json
* [WIP] Read locales.json
* wip FE implementation
* refactor + unit and sdk component tests
* fixes after the merge, plus tests and cleand up logic
* fix file name in string
* change FE logic to use locales from the instance settings
* revert json generation
* remove leftover comment
* add comment about the code to keep in sync
* fix kondo error
* fix unit test
* fix more jest tests
---------
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
* Update Readme version references and published npm version to 0.52.6
* Update CHANGELOG.md
---------
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* fix horizontally trimmed content on short pages
* include filters
* update specs
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* allow collection clean up banner to be dismissable
* small change
* dismiss the banner if the user uses the clean up modal
* add test coverage
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
* short circuit tracking for ignored requests
- add fall-through for ignored embedding requests
* add test for ignored status codes
* remove cruft
* add logging for unknown clients or statuses
* Fix some e2e tests in custom-column and view-data (#51431)
* warn on reflection!
---------
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
* step1: add MetabaseReduxProvider and make our hooks + connect fn use it
step1: add MetabaseReduxProvider and make our hooks + connect fn use it
* step 2: codemod
* step 3: manual fixes
* step 4: e2e test for sdk
---------
Co-authored-by: Nicolò Pretto <info@npretto.com>
* revert me - run this workflow against the release-x.52.x branch
* Revert "revert me - run this workflow against the release-x.52.x branch"
This reverts commit 09026adc45.
* re-enable cross-version tests
* Fix unexpected rounding in csv & json exports when column multiplier is non integral
* Fixing table unit test
* Adding WIP test
* Adding test case for validating new scaling logic is applied appropriately in exports
* Reverting id-or-name change and adjusting new scaling unit test
* Updating formatting to fix cljfmt in CI
* removing debug def
* Preserving integral behavior if scale is nil
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Previously, cumulative aggregators were being done in clojure after the mongo query was finished. However, this
didn't work on multi-step queries where the cumulative aggregator wasn't the last step (for example, do a cumulative
sum and then filter the result). Implementing cumulative operators directly in mongo fixes this issue.
Co-authored-by: William <william@metabase.com>
* wip nextjs compat docs
* explain how to do manual wrapping
* doocs
* better explanation of the index file
* Apply suggestions from code review
* Update docs/embedding/sdk/next-js.md
---------
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* Add missing -test suffix to zoom-in-timeseries test name
* Add missing -test suffix to underlying-records test name
* Fix distribution drill thru for multi-stage queries
Ensure the distribution drill thru is not returned by available-drill-thrus when a user clicks on an aggregation or
breakout column, even if there are additional query stages after the last aggregation / breakout stage.
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Some funcs were added to lib.drill-thru.common for the recent fix to the zoom-in.timeseries drill. Update the
underlying-records drill to use the common lib code rather than duplicating it.
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
We changed the time_history icon in this context to a revert icon in #46050 but never updated this test. This PR fixes that.
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
* save only grid on fixed width dashboards
* split export pdf into pages
* trim dashboard export pdf into pages
* specs
* add padding to pdf pages
* dark mode
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* Fix#51020
* Add a repro for #51020
* Improve test name
* Update comment and naming
* Improve diff
* Add repro for when primary key is not called 'id'
* Update repro
* Drop prefetchesInitialValues & getValuesForUpdate
It's unclear what the real intention behind these two was, but it's clear that it made two differences:
(1) It decreased the probability of overwriting someone else's changes (if someone else saved them after we opened the form)
(2) It decreases the payload sent over the wire
(1) We can ignore this, as this problem is prevalent everywhere in our app
(2) This is negligible
Dropping these is simpler than enhancing getValuesForUpdate with extra logic for primary keys (and who knows what else)
* Break beforeEach into 2
* Remove no longer valid test
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
* add bug report to command palette and profile menu
add bug report to command palette and profile menu
* refactor and update diagnostic window modal
* add analytics to track bug reporter modal activity
* add file id to to the upload-file method
* add the ability to collect browser information for diagnostic window
* implement feedback from PR comments
* Update frontend/src/metabase/components/ErrorPages/ErrorDiagnosticModal.tsx
* implement feedback from PR comments #2
* rename "file a bug" to "report an issue"
* resolve conflict
* fix lint issues
* fix bad merge conflict resolution
* fix failing onboarding tests
---------
Co-authored-by: Filip Hric <filip@filiphric.sk>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
* Prevent newly opened items from expanding outside viewport
* Expand the unti test coverage
* Use the existing helper
* Change scroll view to center
This works better because it ensures that the top bar doesn't cover the element.
* Update frontend/src/metabase/home/components/Onboarding/Onboarding.tsx
* Extract the `stopVideo` function
* Fix the type name
* Set the top scroll margin on the `main` element
---------
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
* wip: better documentation for developers that need to run the sdk
locally
* morning fixes
* remove developers-guide/sdk in favor of dev.md in the sdk folder
* add note about using the sdk with link to the docs
* fix mising word
* addressed feedback
* added notes about the envs for sdk e2e test
Co-authored-by: Nicolò Pretto <info@npretto.com>
* feat(sdk): use public-facing question type in event handlers (#50867)
* introduce public metabase question type
* revise internal question type
* update stories
* use public question type in dashboard card plugins
* add tests for transforming question properties
* add tests for question description
* re-export the MetabaseQuestion type
* fix lint imports
* change publicQuestion to sdkQuestion
* name cannot be null if the card is present
* reduce collection browser flake
---------
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
* Add new user-level setting
* Add selector
* Make link dismissible from the sidebar
* Transfer the onboarding link to the main "gear" menu
* Add E2E test to cover the link dismissal behavior
* Add tests for the settings menu link
* Fix tests
* Provide useful comment in the e2e test
* Provide contextual explanations to translators
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
* test: see which drivers pass these tests
* Fix build
* Change test to use standard dataset, add initial implementation for bigquery
* Use fully qualified names for views
* Don't use transactions for databricks
* Make drop table only if exists, fix describe-index in mongo for views
* don't sync system.views
* Fix oracle drop-views, disable non-syncing views
* Use metabase-instance to find the table, this is important because redshift and oracle munge table name
* Fix oracle tests
* Fix oracle views
* Fix formatting
* Fix snowflake qualified components
* Change tests to opt out
* Fix sqlsserver
* Fix postgres test
* Disable h2 describe views test
* Address review
Co-authored-by: Case Nelson <case@metabase.com>
* We need to look at the context field to categorize public views
* pull poll-unil into util ns
* fix comment typo
* add test
* update docstring
* remove true? call, it will return `true` on pass
* improve poll-until
Co-authored-by: bryan <bryan.maass@gmail.com>
* Fix the zoom-in.timeseries drill for multi-stage queries
If no dimensions are provided to the zoom-in.timeseries drill, then attempt to find the matching dimension from the FE-provided row data instead, if present.
Related to https://github.com/metabase/metabase/issues/46932
* Only return zoom-in.timeseries drills for clicks on aggregated columns
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
* Properly handle other users personal collections in collection picker (#50605)
* Properly handle other users personal collections in collection picker
* fixing types and unit test
* e2e adjustments
---------
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
* wip next sdk compat
* better code generation, dts works
* Last line of file should end in a newline character
* feat(sdk): make MetabaseProvider not break ssr
* aUpdate enterprise/frontend/src/embedding-sdk/package.template.json
* address pr comments
* refactor(sdk): use relative paths when fixing d.ts files
* make types work on moduleResolution: node
* add loading text
* fix(sdk): #50736 make sure we don't break the host app if a sdk
component is rendered outside of the provider for a render
* fix: this should make types work for real?
* self review fixes
* update test for PublicComponentWrapper
* Update enterprise/frontend/src/embedding-sdk/components/private/PublicComponentWrapper/PublicComponentWrapper.tsx
* remove unused component
* eslint-disable-next-line for MetabaseProvider
* list tsx as dependency
* /next -> /nextjs
---------
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* Fix embed loader not translated with #locale
* Fix unit tests
* Add E2E tests
* Fix a case where the lcoale is failed to load
* Simplify conditions in `LocaleProvider`
* Make E2E tests faster
---------
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Nicolò Pretto <info@npretto.com>
The underlying issue is that nest-query/nest-expression included temporal units when copying over joined fields into the nested query. This caused both the nested query and the parent query to include the "extract the unit from the date" code. In cases where the extraction didn't change the type, this duplication wasn't a big deal. However, for temporal units like hour-of-day, the first extraction changed the type of the field from date to string, and then the second extraction broke. This change ensures that the inner query doesn't try to extract temporal units, which should avoid the duplicate extractions.
Co-authored-by: William <william@metabase.com>
* fix scatter chart tooltip shows irrelevant info
* remove outdated spec as we always show the tooltip_column setting
* fix missing tooltip on the total bar on waterfall charts
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* fix pie chart ignores negative values
* fix incorrect handling of zero only values
* fix rebase
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* Always show embed sharing option for admins (#50513)
* Always render the public link option
This is possible because metabase#50504
* Always render the embed option
* Fix unit tests
* Fix E2E tests
* Correct test semantic
* Hide Embed option for non-admins
* New Embed modal (#50580)
* Open "Compare options" in a new tab
* Add an external link icon to interactive embed option when it should
* Add disabled state to SDK
* Add a disable state to static and interactive embedding
* Add interactive embedding disabled state
* Implement disabled link
* Prepare folder for testing
* Fix tests and add SDK tests
* Add interactive embedding tests
* Correct test desribe block levels
* Add static embedding tests
* Add premium interactive embedding tests
* Add enterprise tests (EE without tokens)
* Fix the rest of the failed unit tests
* Update E2E tests
* Fix a case where OSS see disabled interactive embedding
This should be impossible as interactive embedding isn't available on
OSS, so we should not display the disabled state.
* Address review
* Address review
Co-Authored-by: Poom poom@poom.dev
---------
* Update Interactive Embedding Admin Settings page (#50693)
* Add a quick start link to interactive embedding settings page
* Update UTM tags for interactive embedding card
* Don't show interactive embedding option as enabled on OSS
* Fix unit tests
* Add a new test
---------
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
* fix scatter chart tooltip shows irrelevant info
* remove outdated spec as we always show the tooltip_column setting
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* fix the script, and add the new edn
* make the migrations run in the proper order
* it works (needs cleanup)
* remove broken binning
- These bins rely on fingerprinting for the custom Age column
- The fingerprinting for that custom column are not properly exported in
serialization, hence do not get loaded into metabase, causing binning by
Age to fail.
* cleanup / linting
* cleanup
* update migration test ids to test
* realign test name to check for to see if sample content was created
* remove Product collection + move Examples into root
* update collection_ids for the content too
* remove click behavior for 'Revenue goal for this quarter'
* Apply suggestions from code review
* for the sample collection is_sample should be true
* Drop CreateInternalUserNoOp
* typo
* update migration comments
* 2 small fixes
* fix data perms for example coll
* add a comment so we don't have 2 blank lines in a row
---------
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
* Add new selectors
* Adjust the onboarding checklist for non-admins
* Add unit tests for non-admins
* Rename the control knob
* Fix the forgotten test
* Stop guarding the route for admins only
* Translate `alt` tags
* Translate `alt` tags
* Add e2e coverage for non-admins
* Refine selectors
* Improve the route guard
* Increase E2E coverage for route guards
---------
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
* Add delay helper
* Remove delays in storybook
* Use skippable delay in ListField and SingleSelectListField
* Use skippable delay in ExplicitSize
* Remove waitTimeContext in storybook
* Remove waitTimeContext altogether
* Add documentation to delay
* Remove all context references in ExplicitSize
* Update flaky snapshots
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Fixes: #50771
The new sync process failed to qualify enums outside public and
therefore failed to properly type them in database_type. This could
either result in matching the wrong type if there was a conflict or not
being typed as an enum.
Co-authored-by: Case Nelson <case@metabase.com>
* Add trial banner
* Use the semantic "warning" color for background
* Simplify the "reappearance" logic
* Refine the banner logic
- Pass the bare minimum information (expiry timestamp) to the `TrialBanner`
- Take timezones into account
- Introduce utilities
- Add unit tests
* Update the remaining tests
* Clean up
* Unbreak my `defsetting` 🎶
* Add comments
* Defer var assignment
* Fix failing tests 🤦
* Adjust the types in order to match `master`
* Move the logic up to the parent component
* Convert the `index` component to TS
* Fix typo in the JSDoc
* Fix another typo
* Make the return statement more readable
* Remove redundant test
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
* rename onClose to onCancel
* rename questionHeight to drillThroughQuestionHeight
* rename showVisualizationSelector to withVisualizationSelector
* rename parameter value props
* doc updates for parameter values
* rename the chart type selector prop
* document the withChartTypeSelector prop
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* Add new selectors
* Adjust the onboarding checklist for non-admins
* Add unit tests for non-admins
* Rename the control knob
* Fix the forgotten test
* Stop guarding the route for admins only
* Translate `alt` tags
* Translate `alt` tags
* Add e2e coverage for non-admins
* Refine selectors
* Improve the route guard
* Increase E2E coverage for route guards
---------
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
* Add new selectors
* Adjust the onboarding checklist for non-admins
* Add unit tests for non-admins
* Rename the control knob
* Fix the forgotten test
* Stop guarding the route for admins only
* Translate `alt` tags
* Translate `alt` tags
* Add e2e coverage for non-admins
* Refine selectors
* Improve the route guard
* Increase E2E coverage for route guards
---------
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
* do not show column selection error on empty datasets
* add more specs to chart-definition logic
* fix entry nodes tooltip and click behavior values
* fix nodes formatting
* do not show sankey data settings on dashboards
* do not initiallt open sankey data columns selects
* hide sankey tooltip on scroll
* drop incorrect types
* set sankey node limit
* prevent clicks on edges close tooltips on native sankey questions
* tweak copy
* update sankey spec according to fixes
* revert changed settings behavior
* fix unit specs
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* Pivot Exports Can Handle `nil` in Breakout Col, and Multiple Cols of the Same Aggregation Type
Fixes#50551
If a pivot table has several measures configured, they might both use the same kind of
aggregation (eg. 'sum'). Previously, this would lead to columns with the same name preventing the pivot-measures from
properly making it through the export post processing. Now, the correct aliased/deduped name is used and all columns
can be properly included in the pivot export.
Also fixes the case where a breakout column (pivot-row) contains `nil` values, which caused the pivot export to
fail. Now, all nil values are grouped and handled appropriately.
* when pivot is disabled, header should still be included
* min and max don't default to 0, add a test for the aggregations
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
* add withVisualizationSelector prop
* add tests
* add to docs
* use default layout in tests
* only use custom layout when needed
* make withChartTypeSelector false by default
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* use css variables for skeleton background color
* apply theme to folder color
* replace theme.white with themeColor
* use name of folder chevron color
* add background-inverse color mapping
* Revert "add background-inverse color mapping"
This reverts commit d0b546c583.
* avoid overriding folder chevron color in emotion
* use Mantine style overrides for NavLink
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* match against any hexadecimal bundle name
* add e2e tests skeleton
* Support display-name for ISO get-day-of-week exclusion expressions (#50606)
* Support display-name for ISO get-day-of-week exclusion expressions
Fixes#50574
* Fix light theme embeddings has different text colors (#50678)
* add cache-control tests
* support local runs
---------
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
This protects against us trying to read or write from an incompatible search index. In particular it prevents existing instances from being switched over to an incompatible table during an HA upgrade or downgrade.
~~It doesn't yet get rid of the needless re-initialization, but that will be a fast follow.~~ It breaks up the jobs so that we won't reindex on startup unless necessary.
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
This also avoids a brittle song and dance with non-authoritative atoms in the background. Now we juggle authoritative atoms all the time 😄
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
* do not show column selection error on empty datasets
* persist default sankey column settings when saving
* add more specs to chart-definition logic
* more specs
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* Table Column Ordering Should Not Prevent Pivot Exports
Prior, when viz-settings existed for table column ordering, or if some columns were hidden in a regular table viz, the
pivot export could fail.
Now, if a pivot table is being exported, the table column sorting is properly ignored and the pivot export should work.
* address feedback
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Fixes: #50422
Although we passed additional-options through subname in url parameters
to DriverManager, we were also passing `:schema nil` as connection property.
Co-authored-by: Case Nelson <case@metabase.com>
* temporarily hiding group into other (#50511)
* temporarily hiding group into other
* hide group into other
* remove assertions related to group into other
* Update Loki Snapshots
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
* Update Loki Snapshots
---------
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
* Adding .png version of no_results.svg to fix#49012
* Adjusting text color to to match existing color scheme
* Removing old unused no results assets; adding new png version of no_results.svg at matching resolution to pulse_no_results@2x.png
* Fixing namespace import cycle
Co-authored-by: Tyler Plude <tsplude@gmail.com>
* remove pivot-grouping row and columns in tandem (#50476)
* remove pivot-grouping row and columns in tandem
* add pivot card scalar test for csvs and xlsx.
* improve test feedback
* add a 'todo' for pivoted json exports
* indent
* tap tap tap
---------
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
* Pivot Export Aggregations Improved and Won't Error (#50380)
* Pivot Export Aggregations Improved and Won't Error
Fixes#50207
WIP
- Totals now have appropriate aggregation implementation
- Totals for different row and column partial paths could collide before (eg. if a pivot-col value was equal to the
- measure idx), now the paths are unique and will not collide, causing errors
* add a test
* multiple measures need to have the correct order in each row
* clean up, add some comments explaining totals paths
* fix tests
* add test to show add-rows working correctly after :rows-part :cols-part added
* tap tap tap
---------
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
@@ -61,7 +61,7 @@ Once one or more people have started to work on a feature, it should be marked [
### E) Verification and merging
All PRs that involve more than an insignificant change should be reviewed. See our [Code Review Process](code-reviews.md).
All PRs that involve more than an insignificant change should be reviewed. See our [Code Review Process](./developers-guide/code-reviews.md).
If all goes well, the feature gets coded up, verified and then the pull request gets merged! High-fives all around.
@@ -95,7 +95,7 @@ By our definition, "Bugs" are situations where the program doesn't do what it wa
There are a lot of docs, which means keeping them up to date is hard. If you notice inconsistencies, errors, or outdated information, please help us keep them current!
Note that **we cannot accept translations for documentation at this time**. We support [in-app translations](../configuring-metabase/localization.md), and only support languages that have 100% coverage. But 1) the in-app text is orders of magnitude shorter than our docs, 2) it changes at a slower pace, and 3) we have a lot of people help out. We may consider supporting docs in multiple languages in the future, but for now we need to focus our resources on improving our existing documentation (and expanding it to include all of the new features we're adding).
Note that **we cannot accept translations for documentation at this time**. We support [in-app translations](./configuring-metabase/localization.md), and only support languages that have 100% coverage. But 1) the in-app text is orders of magnitude shorter than our docs, 2) it changes at a slower pace, and 3) we have a lot of people help out. We may consider supporting docs in multiple languages in the future, but for now we need to focus our resources on improving our existing documentation (and expanding it to include all of the new features we're adding).
Check out an introduction to the [Metabase API](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation//metabase-api).
Check out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).
## API keys
Create keys to authenticate programmatic requests to your Metabase. See [API keys](./people-and-groups/api-keys.md).
## API changelog
For breaking changes, see the API [changelog](./developers-guide/api-changelog.md).
## API endpoints
_* indicates endpoints used for features available on [paid plans](https://www.metabase.com/pricing)._
{% include plans-blockquote.html feature="Loading from a configuration file" self-hosted-only="true" %}
On self-hosted Pro and Enterprise plans, Metabase supports initialization on launch from a config file named `config.yml`. The config file should be located at:
On self-hosted [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans, Metabase supports initialization on launch from a config file named `config.yml`. The config file should be located at:
- The current directory (the directory where the running Metabase JAR is located).
- The path specified by the `MB_CONFIG_FILE_PATH` [environment variable](./environment-variables.md).
The settings as defined in the config file work the same as if you set these settings in the Admin Settings in your Metabase. Settings defined in this configuration file will update any existing settings. If, for example, a database already exists (that is, you'd already added it via the initial set up or **Admin settings** > **Databases**, Metabase will update the database entry based on the data in the config file).
The settings as defined in the config file work the same as if you set these settings in the Admin Settings in your Metabase. Settings defined in this configuration file will update any existing settings. If, for example, a database already exists (that is, you'd already added it via the initial set up or **Admin settings** > **Databases**, Metabase will update the database entry based on the data in the config file). Which means: if you define a setting in the config file, and then later change that setting in your Metabase application, keep in mind that the config file will overwrite that change whenever Metabase restarts.
The config file settings are not treated as a hardcoded source of truth (like [environment variables](./environment-variables.md) are). Settings set by environment variables cannot be changed, even in the Admin settings in the application itself.
The config file settings are NOT treated as a hardcoded source of truth (like [environment variables](./environment-variables.md) are). Settings set by environment variables cannot be changed, even in the Admin settings in the application itself.
@@ -130,7 +134,7 @@ See [Uploads](../databases/uploads.md).
## Referring to environment variables in the `config.yml`
As shown in the Databases examples above, environment variables can be specified with `{% raw %}{{ template-tags }}{% endraw %}` like `{% raw %}{{ env POSTGRES_TEST_DATA_PASSWORD }}{% endraw %}` or `{% raw %}[[options {{template-tags}}]]{% endraw %}`.
As shown in the Databases examples above, environment variables can be specified with `{% raw %}{{{ template-tags }}}{% endraw %}` like `{% raw %}{{{ env POSTGRES_TEST_DATA_PASSWORD }}}{% endraw %}` or `{% raw %}[[options {{{template-tags}}}]]{% endraw %}`.
Metabase doesn't support recursive expansion, so if one of your environment variables references _another_ environment variable, you're going to have a bad time.
@@ -181,43 +185,7 @@ config:
details:...
```
Just to give you an idea for some settings, here's an incomplete list of settings you can set via the config file:
```txt
application-colors
config-from-file-sync-databases
check-for-updates
experimental-enable-actions
persisted-model-refresh-cron-schedule
email-smtp-host
email-smtp-username
start-of-week
email-smtp-password
email-smtp-port
email-from-name
email-from-address
email-reply-to
premium-embedding-token
follow-up-email-sent
persisted-models-enabled
site-locale
application-name
settings-last-updated
instance-creation
enable-public-sharing
enable-embedding
embedding-secret-key
jwt-group-sync
anon-tracking-enabled
snowplow-available
jwt-enabled
google-auth-enabled
redirect-all-requests-to-https
site-url
site-name
```
But you can set any of the Admin settings with the config file. Check out the list of [environment variable](./environment-variables.md) to see what you can configure (though note that not all environment variables can be set via the config file.)
But you can set any of the Admin settings with the config file (for a list of settings, check out the [config file template](./config-template.md)). You can also browse the list of [environment variable](./environment-variables.md) to see what you can configure (though note that not all environment variables can be set via the config file.)
## Loading a new Metabase from a config file
@@ -226,3 +194,8 @@ Since loading from a config file is a Pro/Enterprise feature: for new installati
Once you connect your database to Metabase, you'll want to configure an email account to send system notifications to your organization's users. Metabase uses email to reset passwords, onboard new users, and notify you when something happens.
The name of the channel where bug reports should be posted.
### `MB_SLACK_FILES_CHANNEL`
- Type: string
@@ -1828,6 +1895,15 @@ Default: `null`
Used during development of third-party drivers. Set the value to have that plugin manifest get loaded during startup. Specify multiple plugin manifests by comma-separating them.
### `MB_DISABLE_SCHEDULER`
Type: boolean<br>
Default: `false`
When `true`, Metabase will turn off Metabase’s scheduled jobs, which include syncs, fingerprinting, and scanning, as well as dashboard subscriptions, alerts, and model caching.
Can be useful for testing, or when setting up a [git-based workflow](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation/git-based-workflow).
### `MB_DISABLE_SESSION_THROTTLE`
Type: boolean<br>
@@ -1887,11 +1963,9 @@ Since: v51.3
If `true`, log a stack trace for any connections killed due to exceeding the timeout specified in [MB_JDBC_DATA_WAREHOUSE_UNRETURNED_CONNECTION_TIMEOUT_SECONDS](#mb_jdbc_data_warehouse_unreturned_connection_timeout_seconds).
Note: In addtion to enabling this variable, you need to update the com.mchange log level to INFO or higher via a custom log4j configuration in order to see the stack traces in the logs.
In order to see the stack traces in the logs, you'll also need to update the com.mchange log level to "INFO" or higher via a custom log4j configuration. For configuring log levels, see [Metabase log configuration](./log-configuration.md).
See the [Metabase log configuration](./log-configuration.md) documentation for how to configure log levels.
See [MB_JDBC_DATA_WAREHOUSE_UNRETURNED_CONNECTION_TIMEOUT_SECONDS](#mb_jdbc_data_warehouse_unreturned_connection_timeout_seconds) for setting the timeout after which connections will be killed.
To set a timeout for how long Metabase should wait before it kills unreturned connections, see [MB_JDBC_DATA_WAREHOUSE_UNRETURNED_CONNECTION_TIMEOUT_SECONDS](#mb_jdbc_data_warehouse_unreturned_connection_timeout_seconds).
### `MB_JETTY_ASYNC_RESPONSE_TIMEOUT`
@@ -2165,3 +2239,4 @@ Type: string<br>
Default: `null`
Base-64 encoded public key for this sites SSL certificate. Specify this to enable HTTP Public Key Pinning. Using HPKP is no longer recommended. See http://mzl.la/1EnfqBf for more information.
@@ -16,37 +16,47 @@ Here you can set the default language (also called the "instance language") acro
Thanks to our amazing user community, Metabase has been translated into many different languages. Due to [the way we collect translations](#translations), languages may be added or removed during major releases depending on translation coverage.
The languages you can currently pick from are:
Supported languages include:
- English (default)
- Albanian
- Arabic
- Bulgarian
- Catalan
- Chinese (simplified)
- Chinese (traditional)
- Czech
- Dutch
- Farsi/Persian
- Finnish
- French
- German
- Indonesian
- Italian
- Japanese
- Korean
- Latvian
- Norwegian Bokmål
- Polish
- Portuguese
- Russian
- Serbian
- Slovak
- Spanish
- Swedish
- Turkish
- Ukrainian
- Vietnamese
| Language | Code |
| ---------------------- | ------- |
| English | `en` |
| Albanian | `sq` |
| Arabic | `ar` |
| Arabic (Saudi Arabia) | `ar-SA` |
| Bulgarian | `bg` |
| Catalan | `ca` |
| Chinese (Traditional) | `zh` |
| Chinese (Taiwanese) | `zh-TW` |
| Chinese (Hong Kong) | `zh-HK` |
| Chinese (Simplified) | `zh-CN` |
| Czech | `cs` |
| Dutch | `nl` |
| Farsi/Persian | `fa` |
| Finnish | `fi` |
| French | `fr` |
| German | `de` |
| Hebrew | `he` |
| Hungarian | `hu` |
| Indonesian | `id` |
| Malay | `ms` |
| Italian | `it` |
| Japanese | `ja` |
| Korean | `ko` |
| Latvian | `lv` |
| Norwegian Bokmål | `nb` |
| Polish | `pl` |
| Portuguese (Brazilian) | `pt-BR` |
| Russian | `ru` |
| Serbian | `sr` |
| Slovak | `sk` |
| Spanish | `es` |
| Swedish | `sv` |
| Turkish | `tr` |
| Ukrainian | `uk` |
| Vietnamese | `vi` |
The locale codes are relevant for setting the language in [static embeds](../embedding/static-embedding-parameters.md#setting-the-language-for-a-static-embed).
> While Metabase can support languages that read right to left, the Metabase UI is designed around languages that read left to right.
If you want to have your [dashboard subscriptions](../dashboards/subscriptions.md) or [alerts](../questions/sharing/alerts.md) sent to Slack channels (or people on Slack), an admin must first integrate your Metabase with Slack.
A note on [BigQuery](../databases/connections/bigquery.md): Metabase supports the [STRUCT data type](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#struct_type) in BigQuery, but it won't unfold JSON stored in BigQuery as the `JSON` type. If your data is stored in the `STRUCT` type in BigQuery, you can query the table's nested fields. Some background here: BigQuery differs from other databases in that nested fields are _part of the table definition itself_. So when Metabase syncs with your BigQuery database, it'll be able to get metadata about any of your tables, including tables with nested fields. Querying nested fields, however, doesn't extend to arrays (REPEATED (STRUCT)) in BigQuery.
- Add metrics to [dashboards](../dashboards/introduction.md).
- View metrics in the [database browser](../exploration-and-organization/exploration.md#browse-your-databases).
- Pick metrics as aggregation columns in the Summarize block when creating questions, modify them or combine.
- [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans include the ability to mark metrics as verified.
- [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans include the ability to [mark metrics as verified](../exploration-and-organization/content-verification.md).
### Metrics in the query builder
@@ -86,6 +86,10 @@ By "editing" a metric, we mean [editing the metric's query definition](#editing-
These collection permissions also interact with the group's [data permissions](../permissions/data.md), which define whether the group can view or query the metric's source data.
## Verifying a metric
See [content verification](../exploration-and-organization/content-verification.md).
@@ -174,9 +174,7 @@ See [Deleting and restoring items](../exploration-and-organization/delete-and-re
## Verifying a model
{% include plans-blockquote.html feature="Model verification" %}
Just like with a question, admins can verify models. Verifying a model will give it a check mark to let others know an admin vetted the model. If anyone makes any changes to the model, the check mark will disappear. An admin will have to verify the question again to restore the check mark.
See [content verification](../exploration-and-organization/content-verification.md).
@@ -14,22 +14,30 @@ The display name for the database in the Metabase interface.
## Host
Your database's IP address, or its domain name (e.g., esc.mydatabase.com). This is the value of your Databrick's compute resource's Server Hostname.
Your database's IP address, or its domain name (e.g., `xxxxxxxxxx.cloud.databricks.com` or `adb-xxxxx.azuredatabricks.net`). This is the value of your Databrick's compute resource's Server Hostname.
See [Compute settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/compute.html).
## HTTP path
This is the Databrick's compute resources HTTP Path value.
This is the Databrick's compute resources HTTP Path value. This value is often a SQL warehouse endpoint in the format `/sql/1.0/endpoints/abcdef1234567890`. See [Connect to a SQL warehouse](https://docs.databricks.com/en/compute/sql-warehouse/index.html).
See [Compute settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/compute.html).
Additionally, see [Compute settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/compute.html).
## Personal access token
## Authentication
There are two ways to authenticate with Databricks. You can use a personal access token (PAT) or a service principal using OAuth (OAuth M2M).
The Databricks driver supports both options. Use the toggle to select the authentication method you want to use.
### Personal access token authentication
See [Personal Access Token (PAT)](https://docs.databricks.com/en/dev-tools/auth/pat.html).
## Catalog
### Authenticate access with a service principal using OAuth (OAuth M2M)
See [Authenticate access with a service principal using OAuth](https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html).
## Catalog
For now, you can only select one catalog. Metabase doesn't support multi-catalog connections. If you want to use more than one catalog in Metabase, you can set up multiple connections, each selecting a different catalog.
You can't sync Databricks's legacy catalogs, however, including the `samples` or `hive_metastore` catalogs.
@@ -62,3 +70,45 @@ Note that only the `*` wildcard is supported; you can't use other special charac
You can append options to the connection string that Metabase uses to connect to your database. E.g., `IgnoreTransactions=0`.
See [Compute settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/compute.html).
## Re-run queries for simple explorations
Turn this option **OFF** if people want to click **Run** (the play button) before applying any [Summarize](../../questions/query-builder/introduction.md#grouping-your-metrics) or filter selections.
By default, Metabase will execute a query as soon as you choose an grouping option from the **Summarize** menu or a filter condition from the [drill-through menu](https://www.metabase.com/learn/metabase-basics/querying-and-dashboards/questions/drill-through). If your database is slow, you may want to disable re-running to avoid loading data on each click.
## Choose when Metabase syncs and scans
Turn this option **ON** to manage the queries that Metabase uses to stay up to date with your database. For more information, see [Syncing and scanning databases](../sync-scan.md).
### Database syncing
If you've selected **Choose when syncs and scans happen** > **ON**, you'll be able to set:
- The frequency of the [sync](../sync-scan.md#how-database-syncs-work): hourly (default) or daily.
- The time to run the sync, in the timezone of the server where your Metabase app is running.
### Scanning for filter values
Metabase can scan the values present in each field in this database to enable checkbox filters in dashboards and questions. This can be a somewhat resource-intensive process, particularly if you have a very large database.
If you've selected **Choose when syncs and scans happen** > **ON**, you'll see the following options under **Scanning for filter values**:
- **Regularly, on a schedule** allows you to run [scan queries](../sync-scan.md#how-database-scans-work) at a frequency that matches the rate of change to your database. The time is set in the timezone of the server where your Metabase app is running. This is the best option for a small database, or tables with distinct values that get updated often.
- **Only when adding a new filter widget** is a great option if you want scan queries to run on demand. Turning this option **ON** means that Metabase will only scan and cache the values of the field(s) that are used when a new filter is added to a dashboard or SQL question.
- **Never, I'll do this manually if I need to** is an option for databases that are either prohibitively large, or which never really have new values added. Use the [Re-scan field values now](../sync-scan.md#manually-scanning-column-values) button to run a manual scan and bring your filter values up to date.
### Periodically refingerprint tables
> Periodic refingerprinting will increase the load on your database.
Turn this option **ON** to scan a sample of values every time Metabase runs a [sync](../sync-scan.md#how-database-syncs-work).
A fingerprinting query examines the first 10,000 rows from each column and uses that data to guesstimate how many unique values each column has, what the minimum and maximum values are for numeric and timestamp columns, and so on. If you leave this option **OFF**, Metabase will only fingerprint your columns once during setup.
@@ -136,6 +136,8 @@ Remember to drop the old user:
DROPUSER'metabase'@'localhost';
```
If you can't connect to the database, but the user, host, and password are correct, try adding `trustServerCertificate=true` to the additional JDBC options. This option will tell the Metabase driver to trust the server certificate even though it doesn't have a root certificate installed, and it should establish a secure connection.
## Syncing records that include JSON
**Metabase will infer the JSON "schema" based on the keys in the first five hundred rows of a table.** MySQL JSON fields lack schema, so Metabase can't rely on table metadata to define which keys a JSON field has. To work around the lack of schema, Metabase will get the first five hundred records and parse the JSON in those records to infer the JSON's "schema". The reason Metabase limits itself to five hundred records is so that syncing metadata doesn't put unnecessary strain on your database.
@@ -89,6 +89,7 @@ A fingerprinting query examines the first 10,000 rows from each column and uses
## Further reading
- [Microsoft JDBC Driver for SQL Server support matrix](https://learn.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix)
If you'd like to connect your Metabase Cloud or self-hosted instance to a database, you can secure the connection using Secure Socket Layer (SSL) encryption with a certificate.
@@ -15,11 +15,11 @@ Why you'd want to do this:
If you're using Metabase Cloud, the application database is handled for you, so you'd only need to secure connections to data warehouses that you add to your Metabase.
### Prerequisites
## Prerequisites
A database that allows a JDBC connection, as you'll need to use a connection string to specify the certificate you want to use.
### Step 1: Download the root certificate from your provider
## Step 1: Download the root certificate from your provider
If you're running Metabase via a Docker container, you should already have the certificates for AWS and Azure.
@@ -30,7 +30,7 @@ You'll find the certificates in the `/app/certs/` directory in Metabase's Docker
If you need a different certificate, you can build your own Docker image. Visit your external provider's page for your database and find a link to download the root certificate for connecting to your database.
### Step 2: Save the certificate
## Step 2: Save the certificate
**Self-hosted**
@@ -42,15 +42,15 @@ You'll need to complete [Step 3: Add your database](#step-3-add-your-database) f
Once you've done that, you can go to **Admin** > **Databases** and select your database. Find the section named **SSL Client Certificate** and click **Select a file** to upload your downloaded certificate.
### Step 3: Add your database
## Step 3: Add your database
For example, let's say you want to secure a connection to a PostgreSQL database. Follow the instructions in the app to add the database. For more on setting up a database connection, check out our docs for [adding a database](./connecting.md).
### Step 4: Toggle on the "Use a secure connection (SSL)" option
## Step 4: Toggle on the "Use a secure connection (SSL)" option
If your database supports a JDBC connection, Metabase will provide you with a field to input additional parameters to your connection string. Metabase will use parameters in the connection string to establish a secure connection.
@@ -86,7 +86,7 @@ To prevent Metabase from running syncs and scans against a specific table, chang
## Syncing and scanning using the API
Metabase syncs and scans regularly, but if the database administrator has just changed the database schema, or if a lot of data is added automatically at specific times, you may want to write a script that uses the [Metabase API](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation//metabase-api) to force a sync or scan. [Our API](../api-documentation.md) provides two ways to initiate a sync or scan of a database:
Metabase syncs and scans regularly, but if the database administrator has just changed the database schema, or if a lot of data is added automatically at specific times, you may want to write a script that uses the [Metabase API](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation/metabase-api) to force a sync or scan. [Our API](../api-documentation.md) provides two ways to initiate a sync or scan of a database:
1. Using a session token: the `/api/database/:id/sync_schema` or `api/database/:id/rescan_values` endpoints. These endpoints do the same things as going to the database in the Admin Panel and choosing **Sync database schema now** or **Re-scan field values now** respectively. To use these endpoints, you have to authenticate with a user ID and pass a session token in the header of your request.
2. Using an API key: `/api/notify/db/:id`. We created this endpoint so that people could notify their Metabase to sync after an [ETL operation](https://www.metabase.com/learn/grow-your-data-skills/data-landscape/etl-landscape) finishes. To use this endpoint, you must pass an API key by defining the `MB_API_KEY` environment variable.
Once you've [enabled uploads](#setting-up-uploads), you can [upload files](../exploration-and-organization/uploads.md) in CSV format to a collection in Metabase.
This page covers how admins can set up data uploads so people can upload CSVs to your Metabase. For _how_ to upload data once this is set up, check out [Uploading data](../exploration-and-organization/uploads.md).

@@ -194,7 +194,7 @@ There's a few other things Metabase needs to know when comparing test results. F
This is actually a common problem, and luckily we have figured out how to work around it. The solution is usually something like using different _schemas_ in place of different databases, or prefixing table names with the database name, and creating everything in the same database. For SQL-based databases, you can implement `sql.tx/qualified-name-components` to have tests use a different identifier instead of what they would normally use, for example `"shared_db"."test-data_venues".id` instead of `"test-data".venues.id`. The SQL Server and Oracle test extensions are good examples of such black magic in action.
# Setting up CI
## Setting up CI
Once you have all the tests passing, you'll need to set up GitHub Actions to run those tests against your driver. You'll need to add a new job to [`.github/workflows/drivers.yml`](https://github.com/metabase/metabase/blob/master/.github/workflows/drivers.yml) to run tests against your database.
@@ -27,7 +27,7 @@ and in the backend using `trs` (to use the site language) or `tru` (to use the c
If you see incorrect or missing strings for your language, please visit our [POEditor project](https://poeditor.com/join/project/ynjQmwSsGh) and submit your fixes there.
# Backend Translation Guide
## Backend Translation Guide
Metabase allows for translations into many languages. An authoritative list can be found in `resources/locales.clj`.
These docs are for developing the SDK. For using the SDK in your app, see our [SDK docs](../embedding/sdk/introduction.md).
## Building locally
First you need to build the Metabase Embedding SDK for React locally:
```bash
yarn build-release:cljs
```
## Build and watch
And then run:
```bash
yarn build-embedding-sdk:watch
```
`build-embedding-sdk:watch` is the original command, the js output is fast, but the dts output is extremely slow and is not fixed by the fixup script on watch.
## Build incrementally
```bash
yarn build-embedding-sdk:dev
```
This is an _experimental_ command that should be much faster, it uses `tsc --incremental` to to generate the dts files and fixes them automatically by running the fixup script on watch.
The `tsc` command will output a lot of errors, to keep the terminal output under control you may want to run the three different `embedding-sdk:dev:*` commands on different terminals.
There is a VS code task named `Run embedding sdk dev commands` that does that
## Storybook
You can use storybook to run SDK components during local development.
When you have Metabase instance running:
```bash
yarn storybook-embedding-sdk
```
## Initial configuration
1. Set JWT secret to be "`0000000000000000000000000000000000000000000000000000000000000000`" in Admin > Authentication >
JWT > String used by the JWT signing key
1. Make sure "User Provisioning" setting is set to "`on`".
1. Set Authorized Origins to "`*`" in Admin > Embedding > Interactive embedding
## Using the local build
After that you need to add this built SDK package location to your package.json. In this example we assume that your
application is located in the same directory as Metabase directory:
You'll embed the full Metabase application in your app. Once logged in, people can view a Metabase dashboard in your web app, and be able to use the full Metabase application to explore their data, and only their data.
{% include plans-blockquote.html feature="Interactive embedding" %}
{% include shared/in-page-promo.html %}
**Interactive embedding** is what you want if you want to offer [multi-tenant, self-service analytics](https://www.metabase.com/learn/metabase-basics/embedding/multi-tenant-self-service-analytics).
Interactive embedding is the only type of embedding that integrates with your [permissions](../permissions/introduction.md) and [SSO](../people-and-groups/start.md#authentication) to give people the right level of access to [query](https://www.metabase.com/glossary/query_builder) and [drill-down](https://www.metabase.com/learn/metabase-basics/querying-and-dashboards/questions/drill-through) into your data.
@@ -273,13 +275,13 @@ To hide a question or dashboard's title, [additional info](#additional_info), an
### `locale`
You can localize the user interface via a parameter. For example, to set the locale to Spanish:
You can change the language of the user interface via a parameter. For example, to set the locale to Spanish:
```
locale=es-ES
locale=es
```
Check out the [locales Metabase supports](https://github.com/metabase/metabase/tree/master/locales). And read more about [localization](../configuring-metabase/localization.md).
Read more about [localization](../configuring-metabase/localization.md).
@@ -10,6 +10,8 @@ You can embed Metabase tables, charts, and dashboards—even Metabase's query bu
Here are the different ways you can embed Metabase.
{% include shared/in-page-promo.html %}
## Embedding SDK with React (BETA)
With the [Embedding SDK](./sdk/introduction.md), you can embed individual Metabase components with React (like standalone charts, dashboards, the query builder, and more). You can manage access and interactivity per component, and you have advanced customization for seamless styling.
@@ -26,7 +28,7 @@ Interactive embedding is the only kind of embedding that [integrates with SSO an
Also known as signed embedding, [static embedding](./static-embedding.md) is a secure way to embed charts and dashboards.
**When to use static embedding**: you don’t want to give people adhoc query access to their data for whatever reason, or you want to present data that applies to all of your tenants at once. For example, say you want to showcase some benchmarking stats: if you just want to make those stats available exclusively to your customers, you could use a signed embed.
**When to use static embedding**: you don't want to offer ad-hoc querying or chart drill-through. To filter data relevant to the viewer, you can use static embeds with [locked parameters](./static-embedding-parameters.md#locked-parameters-limit-the-values-available-to-other-editable-parameters).
{% include plans-blockquote.html feature="Embedded analytics SDK" sdk=true %}
{% include plans-blockquote.html feature="Embedded analytics SDK" sdk=true enterprise-only=true %}
Notes on handling authentication when working with the SDK.
@@ -155,7 +155,7 @@ First, create an [API key](../../people-and-groups/api-keys.md).
Then you can then use the API key to authenticate with Metabase in your application. All you need to do is include your API key in the config object using the key: `apiKey`.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.