* Run E2E tests using Chrome
* Create snapshots using Chrome
* Test in GHA once again
* Set browser in the base Cypress config
* Change branch back to `master` for E2E workflow
* Extract repro for #16756
* Optimize looping through sql date field fitlers
* Optimize looping through sql number field fitlers
* Optimize looping through sql string field fitlers
* Extract common helper
* Run only native filters in the current branch
* Reduce flakiness in `type`
* Merge field filters together
* Run tests on `master` again
* add API to fetch general permisisons graph
* add API to update general permissionns
* change author of migration
* update documents
* misc fixes to applease the CIs
* Add tests for general permission APIs and models
* linting and fix a failed test case
* fix some failed tests
* update docs and change /subscription/ to /general/subscription/ for consistency
* Hook and migration to make sure subscription are created for new groups by default
* add schema migrations tests
* set for the win
* address noah's comments
* Parse number as is in http-client for tests
* address Cam's comments
* revert the last commit about parsing API response in tests
* change fk name
* delete a comment
* Changes:
- Rename `changes` column to `after` to keep things consistent
- If a group has no General Permisions, it'll not be included in the graph
- Update tests and some docs
* fix failing tests in ee
* add some tests and make docstring completes
* polishing comments
* namespaces
* fix namespaces
* Add general permisison flags to `GET /api/user/current` (#21250)
* return general permisison flags for /api/current
* namespaces
* move permission flags to under
* Enforce Subscription permissions (#21285)
* return general permisison flags for /api/current
* namespaces
* enforce general permissions for subscription and tests
* update check-has-general-permisison to add option to require superuser
* adding arity
* add tests for permissions helper function
* Move advanced permissions check funcs to ee namespace
* unpushed changes
* namespaces
* ignore exception when load namespaces
* change helper fn name
* Enforce Monitoring Permissions (#21321)
* return general permisison flags for /api/current
* namespaces
* enforce general permissions for subscription and tests
* update check-has-general-permisison to add option to require superuser
* adding arity
* enforce permissions to call /api/dataset for internal queries
* enforce monitoring permissions for api/task and api/util
* add tests for OSS
* add tests for db-connection-info endpoint
* change test schema
* update name func and fix ns
* whydon't CI run ?
* Enforce Setting Permissions (#21386)
* return general permisison flags for /api/current
* namespaces
* enforce general permissions for subscription and tests
* update check-has-general-permisison to add option to require superuser
* adding arity
* enforce permissions to call /api/dataset for internal queries
* enforce monitoring permissions for api/task and api/util
* add tests for OSS
* add tests for db-connection-info endpoint
* change test schema
* update name func and fix ns
* whydon't CI run ?
* Enforce Setting permissions
* fix failing test
* make sure we could run slack test twice
* make the mock consistent
* address Noah's comments
* shorter permissions check
* Create sidebar and add collections tree
* Fix dragged collection item's z-index
* Add links (data, archive, users' collections)
* Add ProfileLink
* Add bookmarks
* Use the new sidebar at Navbar
* Fix official collection icon opacity
* Add sidebar width to navigation constants
* Cut long item names
* Fix sidebar's horizontal scroll
* Fix remove bookmark icon position
* Fix bookmark URLs
* Fix how selected item is determined
* Jump to a collection opened from a bookmark
* Fix selected element highlighting edge cases
* Don't check for "users" collection
* Fix collapsing tree nodes
* Fix remove bookmark icon show on hover
* Fix removing a bookmark
* Fix archived collections are disabled in the tree
* Expand collection's parents after move
* Fix UI element lookups in tests
* Accept `icon` object as a SidebarLink prop
* Use "tree" a11y role for collections tree
* Always show the archive link
* Fix "other users' collections" link icon
* Fix e2e test
* Fix e2e tests
* Remove not used prop
* Make bookmarks collapsible
* Fix post-rebase issues
* Fix can't click expanded tree node to collapse
* Fix e2e test
* Remove not used code
* Use bookmark entities icon helper
* Extract renderBookmark function
* Allow custom `icon` element prop on SidebarLink
* Fix bookmarked official collection icon colors
* Fix `personal_owner_id` type
* Move Collections entity file to collections dir
* Reorganize collection entity file
* Give methods some space
* Extract `active` state setter methods
* Clean up styled components
* Extract more styled-components
* Extract methods
* Turn SearchBar into functional component
* Convert SearchBar to TypeScript
* Prototype new nav skeleton (#20875)
* yarn
* begin basic layout flip
* rough in collections list
* position query builder
* remove fitViewport from QB to fix layout quirks
* extract search
* clean up props
* position search / style
* fix dashboard layout
* fix search icon
* move ProfileLink
* tweak spacing
* fix burger
* add basic toggle
* tweak layout for sidebar toggle
* tweak style
* tweak sidebar sizing
* Quick fix to prototype starting points init (#20922)
* fix scroll overflow on sidebar
Co-authored-by: Gustavo Saiani <gustavo@poe.ma>
* add currentUser to profile link
* move footer items out of collection sidebar
* tweak footer style
* fix hover style
* clean up footer
* fixup
* remove un-needed overflow hidden
* hide app bar when in admin mode
* merge sidebar header into new color scheme / nav layout
* clean up headers
* fix root collection spacing
* smaller font size for nav items
* provide flex context, fixes metadata editing
* fix login page
* Remove console logs
* Put user's personal collection under Our analytics (#21061)
* Browsing | Handle long item names in the sidebar (#21063)
* Handle long names in the nav sidebar
* Show tooltip with a full item name if its cut
* Browsing | Fix data reference & admin permissions layout (#21101)
* Remove admin navbar CSS fix
* Handle admin navbar in root App component
* Extract styled components
* Fix data reference layout
* Fix main container height
* Browsing | Hide sidebar for questions, models and dashboards on page open (#21064)
* Manage default sidebar visibility
* Handle ad-hoc questions better
* Move nav elements based on feedback (#21190)
* scoot buttons around
* move logo to appbar, scoot search
* remove user footer, home link [ci skip]
* review feedback [ci skip]
* fix accidental removal of links (minimalism was a fad anyway) (#21192)
* add button classes to new button (#21213)
* Nav visual changes (#21223)
* switch nav bg + move styling to NavRoot
* readable text
* increase contrast
* selected icon color
* remove bottom padding
* search bar color
* restructure sidebar position
* fix sidebar header color
* move to fixed when small
* fix multiple scrollbars
* fix sidebar width
* home as own item, gear below
* fix admin nav
* extract nav constant, fix types
* remove unused constant [ci skip]
* New nav - get base colors in order (#21262)
* new sidebar button
* nav bg to bg-light
* fix link track, remove extra home link
* color tweaks
* swap colors
* Fix E2E tests for new navigation UI (#21196)
* Use `main` HTML tag for main page content
* Add extra UI helpers for Cypress
* Fix tests failing due to nav UI changes
* Remove not needed NavBar code
* Fix loading databases list
* Use `navigationSidebar` helper for collections
* Use `navigationSidebar` for collection tests
* Close sidebar in SQL filters tests
* Extract AppBar component to `metabase/nav`
* Fix test
* Fix test
* Skip sidebar visibility control test
* Fix JSON engine DB check
* Fix DatasetEditor edit bar colors
* Fix global containers heights
* Fix tests scrolling target
* Fix styles
* Fix navbar cypress helpers
* [ci nocache]
* Fix scroll in e2e test
* Browsing | Manage sidebar state with redux (#21226)
* Move navbar state to redux
* Hide sidbebar using CSS
* Fix native E2E test
* Fix native e2e test
* Fix model tests
* Use more accurate element getters
* Fix e2e tests
* Browsing | Fix dashboard UI (#21233)
* Fix parameter widgets event listeners
* Attach scroll events to "main" instead of window
* Resize filters panel when navigation sidebar open
* Reorder imports at App
* Hide AppBar and NavBar when editing dashboard
* Fix navbar & appbar visibility
* Fix filter positions
* Extract `getMainElement` helper
* Update unit tests
* Fix test
* Browse fix bulk actions (#21320)
* make bulk action bar aware of sidebar, remove extraneous layout components
* clean up styling
* convert BulkActionBar to tsx
* Fix types
Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Co-authored-by: Gustavo Saiani <gustavo@poe.ma>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
* Remove errant :bookmarked hydration key
This was left over from an incorrect implementation of :bookmarked status. No :bookmarked hydration function exists
anyway, the key does nothing.
* Remove old favorites models that are superceded by bookmarks
* Remove dashboard favorite require
* Added bookmarked-score to enable boosting of bookmarked items
* Collection Search Query doesn't error with bookmark left join
* adjust collection id AS in base query
* Set proper bookmark status in collection for search tests
* Actually score bookmarks when bookmarked
* Added a bookmark scoring test
* Remove old todo since it does work. (yay)
All under the grand path to #708.
Changes field API to be compatible with nfc-paths. Allows joining of nested field columns by shoving the full identifier into the postgres function call. Also fixes arcane macro test bug by not using the macro.
New releases of maildev were recently made which has UI changes
as well as changing the default port from 25 to 1025, causing tests
to fail.
While we may want to upgrade maildev in the future, let's stick to
the old version first to unbreak all the tests.
* Revert "Log database connection error before humanizing it (#10695)"
This reverts commit 426df1631d.
This is no longer needed. The original exception message is kept
in the inner exception and everywhere this is used, the whole
stack trace is logged anyway.
* Don't log exception when opportunistically trying SSL
To be usable in the postgres driver, the _uploaded_ root cert needs to:
- have its prefix stripped
- and be base64 decoded
(note: this was not an issue when pointing to a local file)
* Remove unneeded requests
* Remove tests not related to embedding
* Remove embedded question test
Covered in `embedding-native.cy.spec.js`
* Extract question details
* Extract dashboard details
* Fix question details
* Refactor an anti-pattern
Do not assign return values to previously defained variables.
* Do not use hard coded JWT signed token
* Simplify and merge dashboard tests into one
* Divide context into UI and API
* Extract common code into `beforeEeach` for UI context
* Merge UI tests into one
* Rename spec to `embedding-dashboard`
* Remove unnecessary `beforeEach` block
* Extract data and functions into a separate file
* Make sure we can disable previously set parameters
* add API to fetch general permisisons graph
* add API to update general permissionns
* change author of migration
* update documents
* misc fixes to applease the CIs
* Add tests for general permission APIs and models
* linting and fix a failed test case
* fix some failed tests
* update docs and change /subscription/ to /general/subscription/ for consistency
* address noah's comments
* Parse number as is in http-client for tests
* revert the last commit about parsing API response in tests
* change fk name
* Changes:
- Rename `changes` column to `after` to keep things consistent
- If a group has no General Permisions, it'll not be included in the graph
- Update tests and some docs
* fix failing tests in ee
* add some tests and make docstring completes
* fix namespaces
* Add :dataset key to card bookmarks
The :dataset key is boolean and indicates when a card (question) has been turned into a model.
The frontend will use this key to determine which icon is used to display the bookmark in the sidebar.
* Reduce some duplication in this test
* Removing from CCI
* Adding Currents to GHA
* Let there be run
* Returning to master
* Adding new key to new project on Currents
* Adding --ci-build-id to support GHA Re-Runs
* Returning to branch to test it more
* Removing not needed info (repo)
* Returning to master
* allow question paramater fields on mobile
* hide editor bar on mobile when there are no params
* show editor controls when already open
* add parameter mobile visibility test
* add visibilityToggler unit tests
* Create `visitDashboard` E2E helper
* Apply helper to the related tests
* Fix waiting for redundant xhrs
* Make helper work for users without permission to access dashboard
* Do not use helper when asserting on individual dashcard queries
* Refactor repro for 18454
* Improve dashboard permissions test
* Remove remapping as it does not have any effect on native questions
* Name filter in sync with the documentation reccommendation
* Enable sharing via UI
* Publish changes via UI
* Set the token expiration in the helper function itself
* Expand the helper to work for both questions and dashboards
* Expand helper to include filter values and hidden filters
* Asert on the `embedding_params` upon publishing embedding changes
* Expand tests with API context
* Properly fix FK filter
* Fix typo and expand helper example
* Add API test for locked parameters
* Separate UI and API tests
* Timeline has default icon, Timeline Event default icon from Timeline
* Move the icon schema to Timeline model.
The 'default icon' of a Timeline is concretely 'star', whereas the default icon for an event is taken from the
Timeline it's part of, which could be any of the icons.
Since the default should be one of the icons listed in the Schema, it makes sense for readability that the icon schema
is in the same namespace.
* When timeline's collection_id is nil, build the root collection
Timeline's always have :collection_id, and when the ID is a proper ID, :collection hydration works properrly. When the
ID is nil, we don't pass the necessary data to the frontend. So, match the behaviour for the `GET
/api/collection/root` endpoint and use that data on the :collection key
* Add root collection hydration to GET /api/timeline
* Add tests for collection hydration and timeline default icons
* Add a json schema
* Pass required data for snowplow events
* Pass required data for snowplow events
* Add snowplow event tracking for Timeline event creation
This changes the timeline_event API endpoint to send snowplow tracking when an event is created.
The FE now sends additional information for this purpose:
- source: collections or question. This is null if the event is added via API
- question_id: added if the source is from a question. null if the question is unsaved.
These are dissoc-ed from the body before the db/insert because the backend does not store this information, it's just
from the FE and only relevant for this tracking data.
* Fix json error
* Add ::new-event-created entry to the snowplow test
* Fix json error
* Fix json error
* Fix snowplow test
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
This is the first vertical slice of #708. There is a material ways to go, including mysql implementation, plinking away at the data model stuff, and frontend. There are also big putative sync speed gains I think I should chip away at.
* shouldNotForwardTransientProp method created for emotion
* BadgeIcon html attributes clean up
* Usage of transient property $hasMargin in Badge for BadgeIcon
* HTML attribute cleanup for LinkRoot
* React key added to ButtonBar child if not defined
* Properties for TableInfoPopover properly typed
* Misc
* analyticsContext property set as non required as non of the parents enforce it or pass a value
* Clean up attributes for SVG in Icon
* CSS fix for share icon special case in Icon
* Checkbox controlled component default value fix
* Misc clean up
* index file for collection side bar
* Collections collectionID type fix
* collection type in NewCollectionItemMenu fix
* Misc
* TokenField fix for value
* noPopover passed properly to WidgetStatusIcon
* Updates to controlled input/checkbox
* VS Code workspace file added to gitignore
* shouldNotForwardTransientProp renamed to shouldForwardNonTransientProp
* AddAggregationButton defaultProps updates
* propTypes for TableInfoPopover added back
* Tick range fix for timeseries scale
* Revert ticksForRange in timeseries
* Resetting the timestamp parsing based on the unit
* Move startOf reset to getDatas only
* Misc
* Misc
* Cater for null xValue
* Completely rewrite repro for #16170
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
* Add :display to the bookmark query (card specific).
Bookmark results can now optionally show a 'display' key, which is relevant only to cards.
This does not change the db in any way, it just pulls additional data from the left-join in the query already.
This particular key :display is used on the frontend to change the icon that the bookmark renders with in the
sidebar.
* Add a test that confirms `:display` key exists on card bookmarks
* Bookmarks on official collections now have `authority_level` key
* Add validation logic to TemplateTagDimension dimension tag handling
* Add basic error message to query builder
* Update error text
* Add unique error message for validation errors
* Update text of error state
Co-authored-by: Maz Ameli <maz@metabase.com>
* Fix types
* Fix NativeQuery unit test
* Add unit tests for new components
Co-authored-by: Maz Ameli <maz@metabase.com>
* Containerizing using the current release container process, as it's not only more representative, but also we use yarn and maven caching which should be faster
* rebasing
* Update uberjar.yml
* docs - update sql editor page
* change sql example to upper case
* Apply suggestions from code review
Co-authored-by: Jeff Bruemmer <jeff@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff@metabase.com>
* Add tippy/popper replacement for PopoverWithTrigger
* Refactor and fix types
* Move PopoverWithTrigger components to own folder
* Add tests
* rename children prop to popoverContent
* Fix direct ParameterTargetWidget.jsx reference
* Increase timeout for QA DB sync
* Delete DB after the snapshot was taken
This is a hack that seems to prevent race conditions when one DB's sync interferes with the subsequent DB's sync.
* Get slack users and conversations simulatenously
- instead of waiting for the channels, and then getting the users
* Add cache+timeout capability to conversations-list
* extend async approach to users-list
- return timeout+cache warning
- adds tests
* updating docstrings + adding more tests
* Add cache clear and seed slack token settings on-change
- add dox for :on-change for defsettings
- fixing tests
* Fixing tests
- cannot pass a declared (not def'd) value
- some cleanup
* remove unused function
* remove need for slack-configured from timeout fns
- update some docstrings
* pre-populate slack caches
- on app init
* introduce blocking (and cache resetting) endpoint
- this one does not timeout, meant to be called when a user hits a
button like: "Refetch my slack channels"
* removes -timeout versions of users/channels fn
- the endpoint now returns the cached slack data
- removes tests
* fixes routing layer
* remove trailing whitespace
* add missing docstring
* move the cached slack data into a setting
* add missing docstring
* fix typo
* update form-input-test
* refresh cache in test
* remove un-needed anonymous fn wrapping
* refresh slack cache when user sets new valid token
* refresh the cache when reading from it
- the more its used the more up to date it will be
* code review responses + removes 2-arity refresh-cache!
- clear out cache when slack connection is broken or unset
- add to docstring for slack settings route
- wrap init refresh-cache! with a future
- re-spell parallel
* do not block when returning cached slack data
* rename cache defsetting
* Addressing code review issues
- Adds scheduled updates to the slack users and channels cache
every 4 hours
- Removes `form_input_refresh` route
- Automatically refreshes cache when `form_input` route is hit,
if 10 minutes have passed since the last cache fix
- Removes cache refresh on app startup
- Stores only user names, and channel names in the cache, not maps with
irrelevant data
- Clears out some noisy linter warnings via `#_:clj-kondo/ignore`
* Adds slack task RefreshCache jobs
- Sets up startup-triggered and cron-triggered (every 4 hours at a
random minute) slack channel/username cache refreshing
* Implements 2 jobs to update slack users/channels
- one on startup, one every 4 hours
- improve docstrings
* ns linter fixes
* more ns linter fixes
* refactor files-channel to look in the cache
- instead of making a tricky api call
- fixing tests
* update files-channel-test to test the cache
* fixup integrations.slack ns decl
* fixup test integrations.slack ns decl
* fix outdated mock of slack/files-channel
* fix a few more tests
* fix api slack-test
* adds locking to refresh-channels-and-usernames!
* re-order requires
* Use Service Accounts for Google Analytics auth going forward
* Update GA dox
* Dox tweak
* Fix e2e test
* Remove dead googleanalytics form code
Co-authored-by: Dalton Johnson <daltojohnso@users.noreply.github.com>
* Change u/profile from println to log/info
* Change most test printlns to log/info
* Make u/profile message a fn rather than a delay
* Apparently clj-http errors aren't wrapped in :object anymore
* Add running commentary
* Log the amount of time it took to find and run tests
* Sort namespaces
* Update test
Co-authored-by: Diogo Mendes <diogo@metabase.com>
* added status option for rendering widget icon
* mimicked default form behavior using the fetch API
* recreated default html form submit and download
* added GET request functionality to download form
* cleanup
* making requested changes
* onClose, fileName cleanup, blob(), GC link remove
Co-authored-by: Paul Wilson <54870992+wilsonpg@users.noreply.github.com>
* Try making the encryption clearer
Got the question a few times, so I thought we had to make it more explicit
* Update docs/operations-guide/encrypting-database-details-at-rest.md
Co-authored-by: Jeff Bruemmer <jeff@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff@metabase.com>
Due to Cypress upgrade, we observed failing and/or flakey E2E tests.
Rather than disabling this completely, let's narrow down to a few good
tests for now while robustifying the rest of them.
* Upgrade Liquibase to latest version
* Try adjusting log
* Fix checksums for the TWO migrations with ID = 32
* FINALLY get Liquibase to use Log4j2
* Set Liquibase ConsoleUIService OutputStream to null OutputStream
* Manually define a package for our H2 proxy class so Java 8 works
* Fix package-name determination code
* Update migrations file spec
* `databasechangelog` shouldn't be upper-case
* Lower-case quartz table names
* More MySQL fixes 🔧
* Properties for all the Quartz tables 😢
* Formatting tweaks [ci skip]
* Revert a few more busted changes
* Fix more busted changes
* Bump Liquibase version to 4.8.0 to fix MySQL defaultValueBoolean bug
* OMG I think I finally fixed MySQL
* Remove Java source file and prep-deps code
* Remove two more references to bin/prep.sh
* Minor cleanup
* Revert unneeded changes
* Fix busted indentation
* Don't search inside java/ anymore since it's G-O-N-E
* Appease the namespace linter
* Update src/metabase/db/liquibase/h2.clj
This lets the Frontend get a list of timelines with the events included, useful in case of having an unsaved question
where timelines should still be showable.
> left comments but seems workable
I'm going to merge this to let FE continue events implementation.
I will discuss the above concerns in Slack, and we can make adjustments as needed.
* accessors constants created
* accessors dependencies removed from all charts
* Removed accessors dependencies from BE JS for static viz
* Removed accessors references in chart editor
* accessors added to defaultProps
* Remove accessors in tests
* defaultProps removed form static viz components
* TimeSeriesLineChart uses scaleBand instead of scaleTime for x-axis
Similar to TimeSeriesBarChart
* TimeSeriesAreaChart updated to match TimeSeriesLineChart
- sorting in query so don't have to sort in memory afterwards, and
leaves open spot on the api to sort with user preferences if
present (future work)
- adds schema so we know what these bookmarks look like, and return an
explicit structure instead of threading through dissoc and assoc
- combined the remove-nil-values into the normalize function since it
set up preconditions necessary for the normalize.
- use Models in query so we don't have to hardcode the underlying table
This way, if the field name contains [ or ], this character will be
handled properly (with escaping and unescaping at the right place).
Ensure escape vs unescape symmetry
* Improved error messages when query execution fails
* Pretty-print hx/identifier in a different way if it contains extra keys
* Fix#20806
* Rename key used to record that we should not qualify
* Fix line breaks
* Test fix 🔧
* use site-url when opening links via JS
* fix normalization of 0 value
* make dashboard click drill to same dashboard just update parameters
* fix race condition with location prop
* use Link instead of anchor tag
* Add the :archived status of card/dashboard/collection for filtering
If an item is bookmarked, we can follow the link to that item without issue. But, if we bookmark an item and then
archive that item, the bookmark shouldn't show up, as we don't want to link to an archived item.
The bookmark itself is not removed, it's just filtered away when :archived is true.
* Added test for bookmarked and archived items
The archived items that are still bookmarked should not be sent to the Frontend.
* Upgrade Cypress to the latest version (9.4.1)
* Fix collections tests failures after upgrade
* Fix binning tests failures after upgrade
* Fix dashboard test failures after upgrade
* Fix models test failures after upgrade
* Fix admin test failures after upgrade
* Fix visualizations test failures after upgrade
* Rewrite and fix repro for 17397
Added the missing issue reference.
* Fix question test failures after upgrade
* Fix interception handlers in metabase-visual tests
* Fix the rest of the binning tests after upgrade
* rewrite cypressWaitAll helper with a simple recursion
* Updating to 9.5.0
* Upgrade Cypress to v9.5.1
* Fix repro for 13332
* Fix pinned items `collections` test failures
* Speed `collection-pinned-overview` spec up using the API
* Fix failing localization test
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Diogo Mendes <diogo@metabase.com>
* /api/user return only active users when include_deactivated=false
* revert changes in docs/api-documentation.md and fix trailing space for params section
* simplify tests and update api's doc
* Types and options constants added to all chart types
* Chart types and options added to StaticChart
* Static viz page refactored to include an editor
* Editing data added
* Error handling added
* Misc
* StaticChart converted to TypeScript
* Stories for StaticChart added to storybook
* Misc
* Updates from PR review
* FunnelChart missing key for React loop added
* BarSeries missing key for React loop added
* TickRendererProps formattedValue method removed from tag attributes
* React loop key added to internal routes
* Table head tagging fixed in internal
* BaseIcon uncheckedColor method removed from being added to SVG tag attributes
* Misc
* ColorPicker fix for maxHeight attribute
* Missing key for CollectionBadge in InfoText added
* Use the term "Native query"
* Fix/update e2e tests
* Add repro for #20499
* make text conditional on engine and write permissions
* Revert "Fix/update e2e tests"
This reverts commit 3462cd113e.
Co-authored-by: Dalton Johnson <daltojohnso@users.noreply.github.com>
* Add test id to the mini-bar
* Add initial embedding test for the regular GUI question
* Update test with slighlty more complicated formatting
* Extract question details into a separate file
* Add a test for the quesiton with aggregation
* Assert while being signed out
* Add test for the nested question
* Add test for the joined question
mostly unused bindings. Had a few redundant lets. One common pattern was
a let binding for a read check but the resulting value was never used,
just checked that we could read or write it. Removed that from a binding
since it throws otherwise
* Handle legacy Field filter parameters that did not specify `:widget-type`
* Fix indentation
* Test fix
* Revert to old template tag validation logic
* Update e2e test
Co-authored-by: Cam Saul <github@camsaul.com>
* Displace tests that are not related to embedding
* Rename and enable embedding snippets spec
* Add more assertions to the embedding code snippets spec
* Rewrite and enable premium ebmedding token tests
* Fix a timezone related issue in the validity date of the token
* Adding tests in collections and card. Fixing some minor test things
* Added Test for timeline event range selection via card API
* Cleaned up a few TODO comments
* Made the timestamp required when POST-ing a timeline-event
* Remove unnecessary nesting of with-temp* forms
* Moved Icons schema into timeline-event model
This schema seems to be validating more than just the API, so we've moved it.
* Added start/end to GET /api/timeline/:id
Also cleaned up some unnecessary nesting in a card API test
Added timeline range test in timeline API test ns too.
* Parse timestamp when it exists in a timeline-event PUT
We saw the db error presented in the FE when updating timeline events. This should fix that problem.
* Add a test to ensure we can change timestamps via timeline-event PUT
* Add `SAMPLE_DB_TABLES` reference
* Add notes to the cypress data references
* Ensure table ids are correct
Early warning mechanism.
* Use SAMPLE_DB_TABLES in e2e helpers and custom commands
* Use `SAMPLE_DB_ID` in the previously missed helper
* Replace hard coded ids in `question.js`
* Replace hard coded ids in ad hoc question helpers
* Replace hard coded ids in `sandboxTable` custom command
* Replace hard coded ids in `updatePermissions` custom command
* Avoid circular dependencies
* Run unadded additional dashcard series using card query endpoint
* add repro for #20637
* Update frontend/test/metabase/scenarios/dashboard/reproductions/20637-add-series-to-dashcard.cy.spec.js
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
* wait on all dashboard save requests in e2e test
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
* Export `SAMPLE_DB_ID`
* Replace hard coded sample database id values in the default snapshot creator
* Replace hard coded values for the SQLite database
* Update function name
* Stop using hard coded values for questions and dashboards
Step 1 towards the long path towards whacking #708. We need an interface for describing the weird thing every RDBMS vendor did where they have their own special way of doing JSON columns, every single one of them
* Copy over admin premium embedding settings to a new file
* Move embedding reproductions to a related folder
* Move over dashboard embedded parameters
* Move over embedding dashboard spec
* Move over repro for 20634
* Enable embedding in CI
* Migrations for the new 'Annotate Useful Events' project
Users will be able to create 'events' in timelines, which are accessible via collections.
Two migrations are introduced to facilitate the new feature: timeline table, and event table. The following columns
are presumed necessary based on the design document:
** TimeLine
- id
- name
- description
- collection_id
- archived
- creator_id
- created_at
- updated_by ??
- updated_at
*** Event
- id
- timeline_id
- name
- description markdown (max length 255 for some reason)
- date
- time is optional
- timezone (optional)
- icon (set of 6)
- archived status
- created by
- created at
- created through: api or UI
- modified by ??
- modified at
* Changes to events schema
- add icon onto timeline
- make icon on event nullable
- just move to a single timestamp on event, no boolean or anything
- rename event table to `timeline_events` since "event" is so generic
* dir-locals indentation
* Timeline api and model
- patched up the migration to make collection_id nullable since that is
the root collection
- followed the layout of api/metric and did the generic model stuff
* Select keys with keywords, not destructured nils :(
also, can't return the boolean from the update, but select it again
* Enable the automatic updated_at
* Boolean for "time matters" and string timezone column on events
* clean up migration, rename modified_at -> updated_at
for benefit of `:timestamped? true` bits
* basic timeline event model namespace
* Timeline Events initial API
Just beginning the basics for the API for timeline events.
- need to find a way to check permissions
- have to still check if the endpoint is returning stuff properly
* Singularize timeline_event tablename
* Timeline events api hooked up
* Singularize timeline event api namespace
* unused comment
* indent spec maps on routes
* Make name optional on timeline PUT
* Update collection api for timelines endpoints
- add /root/timelines endpoint for when collection id is null
- add /:id/timelines endpoint
Created a hydration function to hydrate the timeline events when fetching timelines.
* TimelineEvent permissions
- crate a permissions objects set via the timeline's permissions
* Move to using new permissions setup
previously was explicitly checking permissions of the underlying
timeline from the event, but now we just do the standard read/write
check on the event, and the permissions set knows it is based on the
permission set of the underlying timeline (which is based on the
permissions set of the underlying collection)
* Items api includes timelines
* Strip of icon from other rows
* Indices on timeline and timeline_event
timeline access by collection_id
timeline_event by both timeline_id and (timeline_id, timestamp) for when
looking for events within a certain range. We will always have been
narrowed by timeline ids (per the collection containing the question, or
by manually enabling certain timelines) so we don't need a huge index on
the timestamp itself.
* Skeleton of range-based query
* Initial timeline API tests
Began with some simple Auth tests and basic GET tests, using a Collection with an id as well as the special root collection.
* Fix docstring on api timeline namespace
* Put timeline's events at `:events` not `timeline-events`
* Add api/card/:id/timelines
At the moment api/card/:id/timelines and api/collection/:id/timelines do
the same thing: they return all of the timelines in the collection or in
the collection belonging to the card. In the future this may drift so
they share an implementation at the moment.
* Put creator on timeline
on api endpoints for timeline by id and timelines by card and collection
* Hydrate creator on events
Bit tricky stuff here. The FE wants the events at "events" not
"timeline-events" i guess due to the hyphen that js can never quite be
sure isn't subtraction.
To use the magic of nested hydration
`(hydrate timelines [:events :creator])`,
the events have to be put at the declared hydration key. I had wanted
the hydration `:timeline-events` for clarity in the code but want
`:events` to be the key. But when you do this, the hydration thinks it
didn't do any work and cannot add the creator. So the layout of the
datastructure is tied to the name of the hydration key. Makes sense but
I wish I had more control since `:events` is so generic.
* Add include param check to allow timeline GET to hydrate w/ events.
The basic check is in place for include=events in the following ways:
GET /api/timeline/:id?include=events
GET /api/collection/root/timelines?include=events
If include param is omitted, timelines are hydrated only with the creator. Events are always hydrated with creator.
* fix hyphen typo in api doc
* Change schema for include=events to s/enum to enforce proper param
Had used just a s/Str validation, which allows the include parameter value to be anything, which isn't great. So,
switched it to an enum. Can always change this later to be a set of valid enums, similar to the `model` parameter on
collection items.
* Fixed card/:id/timelines failing w/ wrong arity
The `include` parameter is passed to `timeline/timelines-for-collection` to control hydration of the events for that
timeline. Since the card API currently calls this function too, it requires that parameter be passed along.
As well, I abstracted the `include-events-schema` and have it in metabase.api.timeline. Not married to it, but since
the schema was being used across timeline, collection, and card API, it seems like a good idea to define it in one
place only. Not sure if it should be metabase.api.timeline or metabase.models.timeline
* used proper migration numbers (claimed in migrations slack channel)
* Add archived=true functionality
There's one subtle issue remaining, and that is that when archived=true, :creator is not hydrated on the events.
I'll look into fixing that.
In the meantime, the following changes are made:
- :events returs empty list `[]` instead of `null` when there are no events in a timeline
- archived events can be fetched via `/api/timeline/:id?include=events&archived=true`
- similarly, archived events can be fetched with:
- `/api/collection/root|:id/timelines?include=events&archived=true`
- `/api/card/:id/timelines?include=events&archived=true`
Just note the caveat for the time being (no creator hydrated on events when fetching archived) Fix pending.
* Altered the hydration so creator is always part of a hydrated event
Adjusted the hydration of timelines as follows:
- hydration always grabs all events
- at the endpoint's implementation function, the timeline(s) are altered by filtering on archived true or false
Not sure if this is the best approach, but for now it should work
* Create GET endpoint for /api/timeline and allow archived=true
Added a missed GET endpoint for fetching all the timelines (optionally fetch archived)
* reformat def with docstring
* Timeline api updated to properly filter archived/un-archived
Use archived=true pattern in the query params for the timeline endpoint to allow FE to get what they need.
Work in progress on the API tests too.
* Timeline-events API tests
Timeline Events API endpoint tests, at least the very basics.
* Timeline Hydration w/ Events tests
Added a test for Events hydration in the timeline API test namespace.
* TimelineEvent Model test NS
May be a bit unnecessary to test the hydrate function, but the namespace is there in case we need to add more tests
over time.
Also adjusted out a comment and added a library to timeline_test ns
* Added metabase.models.timeline-test NS
Once again, this may be a bit unnecessary as a test ns for now, but could be the right place to add tests if the
feature grows in the future.
* Clean up handling of archived
- we only want to show archived events when viewing a timeline by id and
specifically asking for archived events. Presumably this is some
administrative screen. We don't want to allow all these options when
viewing a viz as its just overload and they are archived for a
reason. If FE really want them they can go by id of the timeline. Note
it will return all events, not just the archived ones.
- use namespaced keywords in the options map. Getting timelines
necessarily requires getting their events sometimes. And to avoid
confusion about the archived state, we have options like
`:timeline/events?`, `:timeline/archived?`, `:events/start`,
`:events/end`, and `:events/all?` so they are all in one map and not
nested or ambiguous.
* Clean up some tests
noticable differences: timelines with archived=true return all events as
if it is "include archived" rather than only show archived.
* PUT /api/timeline/:id now archives all events when TL is archived
We can archive/un-archive timelines, and all timeline events associated with that timeline will follow suit.
This does lose state when, for example, there is a mix of archived/un-archived events, as there is no notion of
'archived-by' to check against. But, per discussion in the pod-discovery slack channel, this is ok for now. It is also
how we handle other archiving scenarios anyway, with items on collections being archived when a collection is archived.
* cleanup tests
* Include Timeline and TimelineEvent in models
* Add tt/WithTempDefaults impls for Timeline/TimelineEvent
lets us remove lots of the `(merge defaults {...})` that was in the code.
Defaults are
```clojure
Timeline
(fn [_]
{:name "Timeline of bird squawks"
:creator_id (rasta-id)})
TimelineEvent
(fn [_]
{:name "default timeline event"
:timestamp (t/zoned-date-time)
:timezone "US/Pacific"
:time_matters true
:creator_id (rasta-id)})
```
* Add timeline and timeline event to copy infra
* Timeline Test checking that archiving a Timeline archives its events
A Timeline can be archived and its events should also be archived.
A Timeline can also be unarchived, which should also unarchive the events.
* Docstring clarity on apis
* Remove commented out form
* Reorder migrations
* Clean ns
clj-kondo ignores those but our linter does not
* Correct casing on api schema for include
* Ensure cleanup of timeline from test
* DELETE for timeline and timeline-event
* Poison collection items timeline query when is_pinned
timelines have no notion of pinning and were coming back in both queries
for pinned and not pinned. This adds a poison clause 1=2 when searching
for pinned timelines since none are but they don't have a column saying
that.
* Clean up old comment and useless tests
comment still said to poison the query when getting pinned state and
that function had been added.
Tests were asserting count = 2 and also the set of names had two things
in them. Close enough since there are no duplicate names
* Use TemporalString schema on timeline event routes
Co-authored-by: dan sutton <dan@dpsutton.com>
The widget to filter time-series dimension should not assume that the
dimension is from a field, as it can be also an expression, i.e. when
the breakout is originated from a custom column. Hence, generalize the
case to avoid any crashing.
* Replace metabase.db.migrations/copy-site-url-setting-and-remove-trailing-slashes with a Liquibase migration
* Tweak comment
* `setting`, not `settings`
* Clean namespace
* `key` has to be quoted for MySQL
* Add tests for migrations v0.43.00-008 and v0.43.00-009
* fix new migration for MySQL 5.7
* Fix
* More logging
* Fix unbalanced parens
* Tweak logging
* Add another test
* Tweak test to use :string/=
* More logging
* Updated fix for #20493
* Enable test
* Try disabling the #19494 tests to see what happens.
* Rework #19494 test
* Replace metabase.db.migrations/migrate-humanization-setting with a Liquibase migration
* Apparently key has to be quoted these days in MySQL/MariaDB
* Need to quote key in the preCondition as well
* Fix merge conflicts
* Replace AOT Spark SQL deps with a `proxy` and a `DataSource`
* Support `connection-details->spec` returning a `DataSource`
* Remove target/classes
* Don't need to deps prep drivers anymore
* Fix duplicate `this` params in `proxy` methods; add `:test` alias for Eastwood to make it be a little quieter
* Make sure to call `pool/map->properties`
* Upgrade Hive JDBC driver version from 1.2.2 -> 3.1.2; Bump Spark SQL from 2.1.1 to 3.2.1
* Clean the namespaces
* Don't need to register the a proxy JDBC driver since we're not even using it anymore
* Fix Spark SQL :schema sync for newer versions
* Remove unneeded override
* Fix day-of-week extract for new :sparksql
* Hive/Spark SQL needs to escape question marks inside QUOTED identifiers now 😒
* Some minor SQL generation improvements to avoid duplicate casts
* Revert change to debug test
* for sample db do not allow certain updates
- namely to engine in the model layer
* only check for new schedules one time
* remove unnecessary *current-user-id* binding in test
- as per code review
* Use `thrown-with-message?` to check for exceptions
- Previously this would pass if db/update did _not_ throw an excetption,
which is not what we want here.
* Add failing test for #15978
* Improved test
* Add new metabase.driver.query-processor.escape-join-aliases QP middleware
* Test fix 🔧
* Add reference to #20307
* Add some extra dox
* Test fixes for BigQuery drivers
* revert unneeded change
* Fix :bigquery and :bigquery-cloud-sdk mixup
* Test fixes 🔧
* Test fix 🔧
* Remove comment I meant to remove
As documented, react-ace >=8 doesn't need brace anymore.
This reduces the bundle size,
resources/frontend_client/app/dist/vendor.bundle.js, by 218 KB, from
5286809 to 5063129 bytes.
* Optionally wrap question id to make it available outside of the original scope
* Use `visitQuestion` to simpliy tests
* Fix pivot_table tests
* Fix repro 12568 for nested questions
* Fix repro for 10803
* No need to rely on UI elements any more
* Fix source aliases for Fields from joins not being properly escaped
* Tweak TODO comment
* Disable the flaky tests when running driver tests
* Rename the new macro
* Dox
* Remove unused :require
* Fix BigQuery not qualifying source columns
* Don't fix on 42 for the deprecated BigQuery driver
* You know what I'll fix it after all. Why not.
* Oops I updated the wrong part of the test
In an expression `COUNT/2`, `COUNT` there should be treated as a
function (i.e. `COUNT()`) instead of a field.
Another function is the same category is `CUMULATIVECOUNT`.
Both don't require any arguments, hence the parentheses are optional.
* Group `Urls.question` args into object
* Use `Urls.serializedQuestion`
* Fix `tableRowsQuery` URL builder
* Add E2E tests
* Add routes with `/:objectId`
* Add `objectId` support to question URL builders
* Use `queryParams` from `location` in QB init
* Fix `useSyncedQueryString` drops other params
* Add `zoomInRow` action
* Add `resetRowZoom` action
* Add basic selectors
* Modify `getIsObjectDetail` selector
* Handle `objectId` during QB init
* Replace actions opening prev/next object detail
* Use zoomed row in object detail view
* Update `ObjectDetailDrill`
* Fix URLs update for detail views
* Handle browser "back" button in detail view
* Use question name as a fallback for object view title field
* Fix E2E tests
* Fix E2E test
* Fix routes order
* Fix opening a link to filtered out record
* Move tests for object details
* Fix regexp
* Fix link style
* Better routing handling
* Fix dashboard embedding locked parameter scripting err
We were not passing the embedding components the correct parameter
objects; instead of dashboard.parameters we need to pass the components
parameters that have had metadata added to them such as the fields they
are mapped to, as child parameters components now expect this metadata
to exist.
* Add e2e tests for embedded parameters
* Add org.quartz-scheduler/quartz as an explict dep and bump version from 2.17 -> 2.3.2
* Add no-op impl for `initialize` for our Quartz `ConnectionProvider`
* Remove :bigquery driver
Add "migration" to convert existing Database instances from :bigquery to :bigquery-cloud-sdk (with error log if using outdated OAuth mechanisms), by way of `normalize-db-details`
Removing references to :bigquery from various places in the code
* Remove from modules/drivers/deps.edn
* Remove stuff from CircleCI that is running the old driver
Remove `driver-switch-test` since there is no practical way to run this anymore (since we can't initialize the old driver)
Remove buggy redef of `isa?` from `semantic-type-migration-tests`
Co-authored-by: Cam Saul <github@camsaul.com>
* Fix locking in new Alpine release container
Seems like the new Alpine container (3.15) has some issue when doing apk upgrade first which ends up erroring out the process, so moving it to the last part of the process (after installing the packages) makes the trick.
You can test it out by using the current process (errors with a "Unable to lock database: temporary error (try again later)") and the one in this branch which will finish successfully
* Expand the `visitQuestionAdhoc` helper with the selection of the `mode`
* Rewrite `openTable` helpers using the `visitQuestionAdhoc`
* Remove superfluous wait for the `dataset`
* Fix `nulls` test
* Rewrite and fix `trendline` test
* Fix `saved` question test
* Fix User type
* Add mock user factory
* Add Event and EventTimeline types
* Add mock factories for Event and EventTimeline
* Add Events entity
* Add EventTimeline entity
* Fix exports
* Move new types to `types/api`
* Merge field `results_metadata` into field instance object
* Update unit tests
* Fix replacing result metadata on query completion
* Keep previous QB mode in redux
* Rerun model query after saving editor changes
* Ignore table column widths reset event after exiting model editor
* Reload query when entering model editor
* Remove commented out code
* Fix Dimension unit tests get stuck
* Make changes to header buttons as per designer feedback and remove secondary button style from core button
* removed last use of secondary
* fix active notebook button color
* fix View SQL button and modal
* Integrate waiting for the question dataset into the helper function itself
* Remove explicit waiting from visual tests
* Remove explicit waiting from most of the e2e tests
* Handle pivot tables dataset
* Handle assertion callback
* Simplify helper function
* Fix `bar_chart`
* Fix `line_chart`
* Fix `scatter` visualization tests
* Don't offer to save model changes without changes
* Rename variable
* Assert save button is initially disabled
* Disable save button if model isn't dirty
* Fix prop type
* Clean up metadataDiff after saving changes
* Prevent flaky tests based on contents of TaskHistory
Just check for subsets since we sometimes encounter fingerprint-fields
and analyze information
Output from CI:
```
task_history_cleanup_test.clj:35
Basic run of the cleanup task when it needs to remove rows. Should also add a TaskHistory row once complete
expected: #{"task-history-cleanup"
"metabase.task.task-history-cleanup-test/task-3"
"metabase.task.task-history-cleanup-test/task-2"}
actual: #{"classify-fields"
"analyze"
"fingerprint-fields"
"task-history-cleanup"
"metabase.task.task-history-cleanup-test/task-3"
"metabase.task.task-history-cleanup-test/task-2"}
diff: + #{"classify-fields" "analyze" "fingerprint-fields"}
```
* fix ns
* Retain property file path when revisiting database edit page
Ensuring that the file path (if that is the secret type) is returned via the API response to the admin, so the UX on the form edit page is better
This involved a lot of refactoring to clean up some stuff:
* removed the population of inferred secret properties (ex: last updated timestamp and creator ID) from `handle-db-details-secret-prop!`, since that stores those values into the details blob, defeating some of the purpose of normalizing secrets into a separate table
* moved the logic for injecting such inferred values to a new function, `expand-inferred-secret-values`, which lives within the secret model namespace
* delegating existing calls that require such expansion to the new function
* adding a new helper function, `reduce-over-details-secret-values`, to handle some common logic that is now showing up in a few places (reducing over db-details on secret values and doing some kind of manipulation)
Adding new database API test to ensure that the file path value is, in fact, returned from the API
*** Code:
- ignore hidden tables and archived cards/dashboards
- correct docstring to indicate we are only getting 5 not 10 as
previously claimed
- in query, set limit to 8 in the case we get archived or non-existing
things and then take 5 in memory
- select extra properties from models that we need for this
determination
*** Tests:
- for mysql we were inserting views with a thread/sleep of one second
between each. Just compute timestamps seconds apart and do them all at
once. Should save 7 seconds off mysql test runs. verified temporal
spacing works with
```
MB_DB_CONNECTION_URI="mysql://username:password@localhost:3306/cli" \
clj -X:dev:test :only metabase.api.activity-test
```
- cleanup these activities we were creating with `mt/with-model-cleanup`
which introduces a big looking diff. But checking diff with whitespace
shows its just an indentation and then add the extra keys needed for
identifying which are archived (:archived and :visibility_type for cards
and tables respectively)
* Rework QP.dashboard to expect dashcard-id
* Update /api/dashboard endpoints
* Rework public endpoints for running queries for Dashcards
* Tweak parameter order for Dashboard endpoints for consistency
* Pulse should pass Dashcard ID
* Embed should pass Dashcard ID
* Unskip cypress test
* Update API documentation
* Update endpoints and pass dashcardId to endpoint fns
* Update cypress tests that reference previous endpoint
* Update placement of pivot in endpoint
* Update another endpoint + more e2e fixes
* update QB to hold onto dashcardId like it does with dashboardId
* Address PR feedback
Co-authored-by: Dalton Johnson <daltojohnso@users.noreply.github.com>
* Bump backend dependencies (Jan 2022)
* Revert java-time version upgrade for now until https://github.com/dm3/clojure.java-time/issues/77 is fixed
* Add license overrides
* Bump a few more deps (again). Revert Google/BigQuery and Vertica version bumps
* Revert MariaDB and Redshift version changes
Right now, datasets are all cards. In the future this could change so
record the original model of the dataset as a card. In the future, maybe
we care about the underlying model and this allows us to at least query
and distinguish
* Remove superfluous `beforeEach`
* Simplify `locks display to table` test
Cuts the test running time in half. It goes from 10s to 4-5s.
* Simplify `allows to edit GUI model query` test
Cuts the test running time in half. It goes from ~16s to ~8s.
* Group GUI models related tests into a separate `describe` block
* Simplify `allows to edit native model query` test
Cuts the test running time almost in half. It goes from ~12s to ~7s.
* Group native models related tests into a separate `describe` block
* Handle NULL value for integer fingerprints
Fixes#19976.
* conditionally show some or none of component depending on if numbers are present in fingerprint
* Make jsdoc return type accurate
* add unit tests for this scenario
* rmv unused import
Co-authored-by: Dalton Johnson <daltojohnso@users.noreply.github.com>
* Fix regression breaking support for user:password@host Postgres connection strings
* Actually we need to handle either Postgres OR MySQL
* Fix the helper `question` function
* Wait for the card query to load before typing
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
* Disable remapping when syncing Field values. Handle human readable values in GET /api/field/:id/values
* Don't require `:has_field_values` to be list to actually return anything.
* Make sure GET /api/field/:id/values returns :field_id or it breaks the FE
* Fix add-dimension-projections middleware not respecting disable-remaps? key
More stuff in #18676. Supposed to be the BE for #20004 Just continuing static viz work. Stacked graphs only have a simple viz-settings flag turned on so making sure that gets to FE bit.
No implementation of normalized stacks.
To avoid double runs of various checks (linters, tests, etc) on feature
branch, we mainly run on pull_request trigger, i.e. the checks are
carried out once that feature branch appears in a PR, and not before.
We do however still run on push trigger for the important branches
(master, release-*).
* Unused bindings cleanup
`clj-kondo --lint src:shared/src > lint` and then just work my way
through it. Note that there are warnings about deprecations that we will
need to get rid of as well. Most likely by turning off that warning
until we are ready to tackle the project.
* More unused and a sort ns
* Removing unused svg helpers that eastwood is complaining about
* Restore accidentally deleted `begin!` impl for xlsx
* clean ns
* clean ns
* Last few unused bindings
* kondo checks for empty docstrings
* Little more cleanup
* update translation build script to catch ts and tsx files
* add blank file for indonesian
* makes password resetting less awesome
* get rid of 'this item' text
* add updated translations
* Adjust E2E tests expectation of the strings (after the modification)
Co-authored-by: Ariya Hidayat <ariya@metabase.com>
* Use javax.sql.DataSource everywhere for app DB connection sources
* Sort namespaces
* Un-remove Kondo warning
* Minor tweaks to support 'postgres:' ...
* Remove ConnectionDataSource
* Add warning about PG without sslmode back
* PR feedback
* Sort namespaces
* Remove top-level calls to trs (not allowed because app DB isn't initialized yet anyway)
* Test fix 🔧 (MySQL)
Still pursuant to #18676
1. Funnel was previously not doing lato font for the bold bit because visx's text doesn't take weights, it takes styles
2. Columns can be nontrivial with respect to funnels, which was an oversight
3. For some reason the first try for fixing 2 also impinged upon values being strings for funnels, which breaks things at SVG level
4. And let's just shove in a nit for the display of trends if the previous value and current value are the same
* Remove DataSelector info popovers
* Remove DimensionList info popover
* Remove expression editor suggestion list info popover
* Remove FieldPicker info popover
* Remove DimensionListItem info popover
* Remove info popover from data selector search results
* remove TableBrowser info popover
* Remove an e2e test
CI was broken inasmuch as it wasn't running, so master was broken without us knowing it. Thankfully, to the best of our knowledge, it was a couple of nits. Fixes master.
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
* onDrop unneeded
* basic impl of reordering pinned items
* split cards and dashboards again
* Improve pin drop target styling
* Fix card drop target weirdness
* brand-light border --> brand
* pull out separate styled drop target component
* replace style prop usage
* reduce the z-index
* Remove prop that triggers drill functionality
* Fix clobbering of pinned list on update
* Fix card queries on every rerender
* Add pin drop zone & split drop target components
* lint fix
* fix & add a few tests
* update pin drop zone styling to match sorting
* Improve lifecycle of metadata
Previously we have assumed that if valid metadata is passed into the
card create and udpate, that that is valid metadata for the query. There
are a few scenarios where this can fail, but they all boil down to
editing the query after running it. Examples:
- when creating a query, come up with a query, visualize, realize you
wanted to not select all columns, edit to not select those, possibly
select a few extra, and then save. The saved metadata might only have
the columns from when you ran the query and not after you saved it.
- edit an existing query and save without rerunning. Again, adding and
removing some columns.
How it affects:
- if you remove columns, the preserved metadata can cause us to attempt
to select columns that are no longer in that question, leading to errors
for nested queries
- if you add columns, the query builder won't show the new columns until
that information is populated in the metadata by running the query.
Lifecycle now:
- should be encapsulated in `api.card/result-metadata-async`. But we
only allow metadata to remain if is is valid metadata and the query has
not been edited. If the query has been edited (and new queries always
satisfy this since the previous query will be nil) we rerun the query to
get the metadata. No more drift. However, when dealing with datasets we
will attempt to blend the existing metadata into the newly computed
metadata so that metadata edits can persevere.
Other changes:
- removed an extra indirection in the card api that made it harder to
reason about when to recompute metadata
- moved the `combine-metadata` function into a util namespace and gave
some more generic parameter names
- deleted two tests that are no longer relevant after removing the
checksum on metadata. One had to do with how we hash floats vs ints
which is no longer relevant since we aren't hashing at all (RIP
checksum) and one checked that we accepted "valid" checksum-ed
metadata.
- new test that updating a card will update its metadata by rerunning
the query
- when validating the checksum, do not call s/validate since this WILL
THROW. Instead check `(nil? (s/check ...))`.
* Normalize query before comparing for changes
When comparing db vs api-sent query, need to normalize otherwise they
will always be different and our optimization will never kick in
* Fix ns
* Cleanup after ourselves
* Move `combine-metadata` util functions to a better namespace
* Allow for no query in api/card/:id patch
Cypress tests would do a
```javascript
describe("simple mode", () => {
beforeEach(() => {
cy.request("PUT", "/api/card/1", {
name: "Orders Model",
dataset: true,
});
});
```
The metadata testing stuff would always use the query from the PUT to
check whether to dump or retain the metadata. In these instances, it
would dump the metadata and then i guess ask the qp for the metadata for
a nil query. Similar scenario if anyone uses the API to update
descriptions, etc.
The method is PUT not PATCH, but in the saving function we have
```clojure
(u/select-keys-when
card-updates
:present #{:collection_id :collection_position :description :cache_ttl :dataset}
:non-nil #{:dataset_query :display :name :visualization_settings
:archived :enable_embedding :embedding_params
:result_metadata})
```
So we kinda have a PATCH anyways.
* Normalize metadata before blending
* Ensure api blends metadata correctly
When blending the metadata, need to update the field_ref to keyword the
original. Otherwise we are attempting to match up the field with ref
["field" "subtotal"] against [:field "subtotal"] and they don't match.
* Normalize metadata from api correctly
if you just call normalize/normalize it doesn't know not to change
`:field_ref` -> `:field-ref` so it gets out of whack. Need to pass it
the function appropriate for that level.
Also add a test that you can update _just_ the metadata. This actually
already worked for a subtle reason, and that is possibly buggy. The
reasoning is that the result_metadata is clobbered conditionally now
instead of unconditionally. If the async metadata stuff returns nil it
won't clobber and then whatever was sent over the wire goes in.
* Ensure previous metadata is there
When updating the query of a dataset, handle the case where just the
query is sent, and not the whole card. If the client didn't send the
previous metadata, we did not look it up in the database
* Card api always uses metadata from `result-metadata-async`
Originally this did
(assoc card-data :result_metadata (a/<! result-metadata-chan))
But I changed that so it only optionally did so when that channel had
information. The problem with this is that if there was :result_metadata
on the original request but the channel returned nil for some reason,
whatever was in the request was going in the db. This includes invalid
metadata, non-json strings, what ever. Obviously bad.
But we need to handle PATCHs where clients don't send metadata or they
_ONLY_ send metadata and no query, etc. So this always uses the results
of `result-metadata-async` so it can go through that logic and we always
clobber.
And remember that if we only update the result_metadata when it is
non-nil (`update-card-async!`). The end result is that switching from a
PATCH model where you expect the full object to a PUT where things can
be optional has lots of footguns. Some examples:
- only updating the query
- updating the query along with edits to the metadata on a card (throw
the metadata away)
- updating the query along with edits on a dataset (save the metadata
but blend it into the fresh computation of the query's metadata)
- updating the query but not sending along the metadata. Need to grab
from the db and blend in.
- Sending invalid metadata, changing the description. We want to toss
away the metadata but save the description.
Adds an endpoint to the cards which are basically materially like dashboard/:id/copy, only it's for card/:id/copy - POST to it, get a copy of that entity.
* Add has-user-setup setting
- iff no user is setup aka has-user-setup == false, then redirect to /setup
- when set from the env variable the setup-token is completely
immutable, so can remove clear-token!
* make /api/setup only setup accounts when not has-user-setup
- react router changes to respect 'has-user-setup' setting
- include docstring for print-setup-url
* allow tests to setup multiple users via POST /api/setup
* remove unused function hasSetupToken
* Adds a test to enforce a single creation only
- we now throw an ex-info with status-code 403 when has-user-setup and
/api/setup route is hit (with error message mentioning the route)
- more code review responses
- fixup test to not delete users, (or set locale to spanish...)
* addressing code review concerns
- *disallow... -> *allow... for the dynamic var name
- has-user-settings test: do not assume the test db has users in it
- update test
* Make `getRevisionEvents` accept params object
* Use "You" for current user's revision events
* Fix "moved to" revision display
* Add extra bottom padding to events timeline
* Extract conditions into variables
* Remove saving changes from `setColumnType` helper
* Use single POST request to create a model in cypress
* Add E2E test
* Display metadata editing revision events
* Change message
* Add `dataset` to Card type
* Fix "source-table" type
* Don't use original model query in ad-hoc mode
* Handle model using `/dataset` endpoint in Cypress
* Rerun query when entering model editor
* Make it possible to only close the details sidebar
* Close details sidebar when entering model ad-hoc mode
* Move `isAdHocModelQuestion` to data-modeling utils
* Handle TableInteracting column width reset event
* Fix old isAdHoc util usage
* Trim whitespace around commas in schema filtering code
Change impl of `schema-pattern->re-pattern` so that strings are trimmed before being joined on `|`
Add test to confirm
* Support overriding ROWCOUNT for SQL Server
Add new "ROWCOUNT Override" connection property for `:sqlserver`, which will provide a DB-level mechanism to override the `ROWCOUNT` session level setting as needed for specific DBs
Change `max-results-bare-rows` from a hardcoded constant to a setting definition instead, which permits a DB level override, and move the former constant default to a new def instead (`default-max-results-bare-rows`)
For `:sqlserver`, set the DB-level setting override (if the connection property is set), via the `driver/normalize-db-details` impl
Add test to confirm the original scenario from #9940 works using this new override (set to `0`)
Move common computation function of overall row limit to the `metabase.query-processor.middleware.limit` namespace, and invoke it from execute now, called `determine-query-max-rows`
Add new clause to the `determine-query-max-rows` function that preferentially takes the value from `row-limit-override` (if defined)
Waterfall can now have pretty colors and goals now. Y-axis positions reverted back to the way Dan liked less but is more congruent to the dynamic visualizations.
* Apply schema inclusion/exclusion filtering to sql-jdbc drivers
Update `sql-jdbc` namespaces to handle schema inclusion/exclusion patterns when filtering schemas
Add new generic schema inclusion/exclusion test for sql-jdbc drivers that define the property
Update Snowflake and Redshift driver manifests to include schema filtering property
Create `db-details->schema-filter-patterns` util fn to turn DB details into the inclusion/exclusion patterns
Move schema inclusion/exclusion filtering code to new namespace (since it's not strictly used by `:sql-jdbc` derived drivers)
Move existing tests accordingly
Add schema inclusion/exclusion check to the new `filtered-syncable-schemas` multimethod (and updating docstring)
Change `:redshift` impl of `filtered-syncable-schemas` to call the `:sql-jdbc` version instead
Use new multimethod instead for `filtered-syncable-schemas`, and have default impl of `syncable-schemas` call that
Mark `syncable-schemas` as deprecated and include notes on the new method (and update driver markdown file accordingly)
2022-01-25 17:52:39 -06:00
2326 changed files with 200519 additions and 92375 deletions
name:Restore cached uberjar built in previous step
<<:*CacheKeyUberjar
- steps:<< parameters.before-steps >>
# Make both `test-files` and `source-folder` parameters optional. Translates to: if `parameter` => run associated flag (`--spec` and `--folder`, respectively)
# Make both `test-files`, `source-folder` and `currents-record` parameters optional. Translates to: if `parameter` => run associated flag (`--spec`, `--folder` and `--key $CURRENTS_KEY --record` respectively)
-5 minute [setup](https://metabase.com/docs/latest/setting-up-metabase.html) (We're not kidding)
- Let anyone on your team [ask questions](https://metabase.com/docs/latest/users-guide/04-asking-questions.html) without knowing SQL
-Rich beautiful [dashboards](https://metabase.com/docs/latest/users-guide/06-sharing-answers.html) with auto refresh and fullscreen
-[SQL Mode](https://www.metabase.com/docs/latest/users-guide/writing-sql.html) for analysts and data pros
- Create canonical [segments and metrics](https://metabase.com/docs/latest/administration-guide/07-segments-and-metrics.html) for your team to use
-Send data to Slack or email on a schedule with [dashboard subscriptions](https://www.metabase.com/docs/latest/users-guide/dashboard-subscriptions.html)
-[Humanize data](https://metabase.com/docs/latest/administration-guide/03-metadata-editing.html) for your team by renaming, annotating and hiding fields
- See changes in your data with [alerts](https://www.metabase.com/docs/latest/users-guide/15-alerts.html)
-[Set up in five minutes](https://metabase.com/docs/latest/setting-up-metabase.html) (we're not kidding).
- Let anyone on your team [ask questions](https://metabase.com/docs/latest/users-guide/04-asking-questions.html) without knowing SQL.
-Use the [SQL editor](https://www.metabase.com/docs/latest/users-guide/writing-sql.html) for more complex queries.
-Build handsome, interactive [dashboards](https://metabase.com/docs/latest/users-guide/06-sharing-answers.html) with filters, auto-refresh, fullscreen, and custom click behavior.
- Create [models](https://www.metabase.com/learn/getting-started/models) that clean up, annotate, and/or combine raw tables.
-Define canonical [segments and metrics](https://metabase.com/docs/latest/administration-guide/07-segments-and-metrics.html) for your team to use.
-Send data to Slack or email on a schedule with [dashboard subscriptions](https://www.metabase.com/docs/latest/users-guide/dashboard-subscriptions.html).
- Set up [alerts](https://www.metabase.com/docs/latest/users-guide/15-alerts.html) to have Metabase notify you when your data changes.
- [Embed charts and dashboards](https://www.metabase.com/docs/latest/administration-guide/13-embedding.html) in your app, or even [your entire Metabase](https://www.metabase.com/docs/latest/enterprise-guide/full-app-embedding.html).
For more information check out [metabase.com](https://metabase.com/)
Take a [tour of Metabase](https://www.metabase.com/learn/getting-started/tour-of-metabase).
## Supported databases
@@ -28,65 +29,33 @@ For more information check out [metabase.com](https://metabase.com/)
## Installation
Metabase can be run just about anywhere so checkout our [Installation Guides](https://www.metabase.com/docs/latest/operations-guide/installing-metabase.html) for detailed instructions for various deployments. Here's the TLDR:
Metabase can be run just about anywhere. Checkout our [Installation Guides](https://www.metabase.com/docs/latest/operations-guide/installing-metabase.html).
### Docker
## Contributing
To run Metabase via Docker, just type
To get started with a development installation of the Metabase, check out our [Developers Guide](https://www.metabase.com/docs/latest/developers-guide/start).
```
docker run -d -p 3000:3000 --name metabase metabase/metabase
```
## Internationalization
### JAR file
We want Metabase to be available in as many languages as possible. See which translations are available and help contribute to internationalization using our project over at [POEditor](https://poeditor.com/join/project/ynjQmwSsGh). You can also check out our [policies on translations](https://www.metabase.com/docs/latest/administration-guide/localization.html).
To run Metabase via a JAR file, you will need to have a Java Runtime Environment installed on your system.
We recommend the latest LTS version of JRE from [Eclipse Temurin](https://adoptium.net/) with HotSpot JVM and x64 architecture, but other [Java versions](https://www.metabase.com/docs/latest/operations-guide/java-versions.html) might work too.
Go to the [Metabase download page](https://metabase.com/start/jar.html) and download the latest release. Place the downloaded JAR file into a newly created directory (as it will create some files when it is run), and run it with the following command:
```
java -jar metabase.jar
```
Now, open a browser and go to [http://localhost:3000](http://localhost:3000) , and you will be asked a set of questions that will set up a user account, and then you can add a database connection. For this to work you will need to get some information about which database you want to connect to, such as the Host Name and Port that it is running on, the Database Name and the User and Password that you will be using.
Once you have added this connection, you will be taken into the app and you'll be ready to ask your first question.
For a more detailed walkthrough, check out our [Getting Started](https://www.metabase.com/docs/latest/getting-started.html) guide.
# Frequently Asked Questions
Some questions come up over and over again. Check here first:
To get started with a development installation of the Metabase, follow the instructions at our [Developers Guide](https://www.metabase.com/docs/latest/developers-guide.html).
Then take a look at our [Contribution Guide](https://www.metabase.com/docs/latest/contributing.html) for information about our process and where you can fit in!
# Internationalization
We want Metabase to be available in as many languages as possible. See which translations are available and help contribute to internationalization using our project over at [POEditor](https://poeditor.com/join/project/ynjQmwSsGh). You can also check out our [policies on translations](https://www.metabase.com/docs/latest/faq/general/what-languages-can-be-used-with-metabase.html).
# Extending and Deep Integrations
## Extending Metabase
Metabase also allows you to hit our Query API directly from Javascript to integrate the simple analytics we provide with your own application or third party services to do things like:
- Build moderation interfaces
- Export subsets of your users to third party marketing automation software
- Provide a specialized customer lookup application for the people in your company
- Build moderation interfaces.
- Export subsets of your users to third party marketing automation software.
- Provide a specialized customer lookup application for the people in your company.
Check out our guide, [Working with the Metabase API](https://www.metabase.com/learn/administration/metabase-api).
# License
## Security Disclosure
This repository contains the source code for both the Open Source edition of Metabase, released under the AGPL, as well as the commercial edition of Metabase Enterprise, released under the Metabase Commercial Software License.
See [SECURITY.md](./SECURITY.md) for details.
## License
This repository contains the source code for both the Open Source edition of Metabase, released under the AGPL, as well as the [commercial editions of Metabase](https://www.metabase.com/pricing/), which are released under the Metabase Commercial Software License.
com.google.guava/guava{:mvn/version"30.1.1-jre"}; dep for BigQuery, Spark, and GA. Require here rather than letting different dep versions stomp on each other — see comments on #9697
com.google.guava/guava{:mvn/version"31.0.1-jre"}; dep for BigQuery, Spark, and GA. Require here rather than letting different dep versions stomp on each other — see comments on #9697
honeysql/honeysql{:mvn/version"1.0.461"; Transform Clojure data structures to SQL
:exclusions[org.clojure/clojurescript]}
instaparse/instaparse{:mvn/version"1.4.10"}; Make your own parser
io.forward/yaml{:mvn/version"1.0.9"; Clojure wrapper for YAML library SnakeYAML. Don't upgrade yet, new version doesn't support Java 8 (see https://github.com/owainlewis/yaml/issues/37)
io.forward/yaml{:mvn/version"1.0.11"; Clojure wrapper for YAML library SnakeYAML. Don't upgrade yet, new version doesn't support Java 8 (see https://github.com/owainlewis/yaml/issues/37)
:exclusions[org.clojure/clojure
org.flatland/ordered
org.yaml/snakeyaml]}
javax.xml.bind/jaxb-api{:mvn/version"2.4.0-b180830.0359"}; add the `javax.xml.bind` classes which we're still using but were removed in Java 11
joda-time/joda-time{:mvn/version"2.10.10"}
joda-time/joda-time{:mvn/version"2.10.13"}
kixi/stats{:mvn/version"0.4.4"; Various statistic measures implemented as transducers
org.bouncycastle/bcpkix-jdk15on{:mvn/version"1.69"}; Bouncy Castle crypto library -- explicit version of BC specified to resolve illegal reflective access errors
org.bouncycastle/bcpkix-jdk15on{:mvn/version"1.70"}; Bouncy Castle crypto library -- explicit version of BC specified to resolve illegal reflective access errors
org.slf4j/slf4j-api{:mvn/version"1.7.32"}; abstraction for logging frameworks -- allows end user to plug in desired logging framework at deployment time
org.quartz-scheduler/quartz{:mvn/version"2.3.2"}; Quartz job scheduler, provided by quartzite but this is a newer version.
org.slf4j/slf4j-api{:mvn/version"1.7.35"}; abstraction for logging frameworks -- allows end user to plug in desired logging framework at deployment time
org.tcrawley/dynapath{:mvn/version"1.1.0"}; Dynamically add Jars (e.g. Oracle or Vertica) to classpath
org.threeten/threeten-extra{:mvn/version"1.7.0"}; extra Java 8 java.time classes like DayOfMonth and Quarter
org.yaml/snakeyaml{:mvn/version"1.29"}; YAML parser (required by liquibase)
pretty/pretty{:mvn/version"1.0.5"}; protocol for defining how custom types should be pretty printed
prismatic/schema{:mvn/version"1.1.12"}; Data schema declaration and validation library
prismatic/schema{:mvn/version"1.2.0"}; Data schema declaration and validation library
redux/redux{:mvn/version"0.1.4"}; Utility functions for building and composing transducers
riddley/riddley{:mvn/version"0.2.0"}; code walking lib -- used interally by Potemkin, manifold, etc.
ring/ring-core{:mvn/version"1.9.4"}; web server (Jetty wrapper)
ring/ring-jetty-adapter{:mvn/version"1.9.4"}; Ring adapter using Jetty webserver
ring/ring-core{:mvn/version"1.9.5"}; web server (Jetty wrapper)
ring/ring-jetty-adapter{:mvn/version"1.9.5"}; Ring adapter using Jetty webserver
ring/ring-json{:mvn/version"0.5.1"}; Ring middleware for reading/writing JSON automatically
robdaemon/clojure.java-time{:mvn/version"0.3.3-SNAPSHOT"}; Java 8 java.time wrapper. Fork to address #13102 - see upstream PR: https://github.com/dm3/clojure.java-time/pull/60
robdaemon/clojure.java-time{:mvn/version"0.3.3-SNAPSHOT"}; Java 8 java.time wrapper. Use this fork until https://github.com/dm3/clojure.java-time/issues/77 is fixed upstream
slingshot/slingshot{:mvn/version"0.12.2"}; enhanced throw/catch, used by other deps
stencil/stencil{:mvn/version"0.5.0"}; Mustache templates for Clojure
toucan/toucan{:mvn/version"1.15.4"; Model layer, hydration, and DB utilities
toucan/toucan{:mvn/version"1.17.0"; Model layer, hydration, and DB utilities
:exclusions[honeysql/honeysql
org.clojure/java.jdbc
org.clojure/tools.logging
org.clojure/tools.namespace]}
user-agent/user-agent{:mvn/version"0.1.0"}; User-Agent string parser, for Login History page & elsewhere
weavejester/dependency{:mvn/version"0.2.1"}; Dependency graphs and topological sorting
weavejester/dependency{:mvn/version"0.2.1"}}; Dependency graphs and topological sorting
@@ -5,7 +5,7 @@ Metabase is not yet fully compliant with [the US federal government's Section 50
- Metabase doesn't have a method to allow screen readers to skip over repetitive navigation elements.
- Metabase is extremely close but not 100% compliant at providing text equivalents for all non-text elements.
- Most of our form elements are selectable by tabbing through elements.
- Metabase has minimal transition animations in it, but we have not yet tested whether the range of flickering is always between 2 and 55 Hertz.
- Metabase has minimal transition animations in it, but we have not yet tested whether the range of flickering is always between 2 and 55 Hertz. If you've opted for [Reduce Motion / Remove Animation](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#user_preferences) settings in your OS to take advantage of the `prefers-reduced-motion` CSS media feature, Metabase will disable animations.
- Metabase's data tables do not have row and column headers identified in markup.
- We do not yet have a published description of our accessibility and compatibility features.
- Since Metabase is a React-based web application, it cannot function without scripting (i.e., JavaScript) turned on.
@@ -13,4 +13,4 @@ Metabase is not yet fully compliant with [the US federal government's Section 50
If you'd like to help us address these accessibility gaps, please see [our developers' guide][developers-guide].
- [Re-scanning a single table or field](#re-scanning-a-single-table-or-field)
- [Deleting databases](#deleting-databases)
- [Troubleshooting](#troubleshooting)
- [Further reading](#further-reading)
## Adding a database connection
@@ -14,18 +16,18 @@ In the main navigation bar, click on the **gears** icon in the top right, and se
Once in the Admin section, select the **Databases** tab from the navigation bar at the top of the screen. You’ll see a list of your connected databases (if any). To connect a database to Metabase, click **Add database** and follow the connection instructions for your database.
Although connection details differ database to database, in general you'll need to get connection info from your database admin, usually some combination of hostname (sometimes called endpoint), port, database username and password, and the name of the database.
Although connection details differ database to database, in general you'll need to get connection info from your database admin, usually some combination of hostname (sometimes called endpoint), port, database username and password, and the name of the database.
- [Google Analytics](databases/google-analytics.md) (version 3; if you're interested in support for version 4, let us know by adding your [+1 to this issue (#12905)](https://github.com/metabase/metabase/issues/12905))
Connection options differ depending on which database you're connecting to. Here's an overview:
- [Use a secure connection (SSL)](#use-a-secure-connection-ssl)
- [Use an SSH-tunnel for database connections](#use-an-ssh-tunnel-for-database-connections)
- [Choose when Metabase syncs and scans his](#choose-when-metabase-syncs-and-scans)
- [Use an SSH-tunnel for database connections](#use-an-ssh-tunnel-for-database-connections)
- [Choose when Metabase syncs and scans](#choose-when-metabase-syncs-and-scans)
- [Automatically run queries when doing simple filtering and summarizing](#automatically-run-queries-when-doing-simple-filtering-and-summarizing)
### Use a secure connection (SSL)
@@ -63,15 +65,11 @@ Metabase automatically tries to connect to databases with SSL first, then withou
See our [guide to SSH tunneling](ssh-tunnel-for-database-connections.md).
### Choose when Metabase syncs and scans
### Choose when Metabase syncs and scans
By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, we recommend turning on the option "This is a large database, let me choose when Metabase syncs and scans". Once on, you can review when and how often the field value scans happen. (Note: this setting used to be called "Enable in-depth analysis.")
By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, we recommend enabling the toggle **Choose when syncs and scans happen** found when you select **Show advanced options**. Once on, you can review when and how often the field value scans happen. (Note: this setting used to be called "Enable in-depth analysis.")
If you enable this and save your changes, you'll see a new tab at the top of the form called "Scheduling." Click on that, and you'll see options to change when and how often Metabase syncs and scans.
Metabase maintains its own information about the various tables and fields in each database to aid in querying. By default, Metabase performs this lightweight sync hourly to look for changes to the database such as new tables or fields. Metabase does _not_ copy any data from your database. It only maintains lists of the tables and columns.
@@ -95,13 +93,15 @@ By default, Metabase also performs a more intensive daily sampling of each field
If for some reason you need to flush out the cached field values for your database, click the button that says **Discard saved field values** in the top-right of the database's page.
### Automatically run queries when doing simple filtering and summarizing
### Automatically run queries when doing simple filtering and summarizing
By default, Metabase will auto-run queries when you use the Summarize and Filter buttons when viewing a table or chart. If your users are exploring data that is stored in a slow database, you may want to turn the auto-run off to avoid re-running the query every time your users change an option in the Summarize view. Turning this off presents the users with the option to re-run the query when they choose to.
By default, Metabase will auto-run queries when you use the Summarize and Filter buttons when viewing a table or chart. If your users are exploring data that is stored in a slow database, you may want to turn the auto-run off to avoid re-running the query every time your users change an option in the Summarize view. You can turn this option off in the **Show advanced options** section by deselecting the toggle next to **Rerun queries for simple explorations**. Turning this off presents the users with the option to re-run the query when they choose to.
### Periodically refingerprint tables
When syncing with this database, Metabase will scan a subset of values of fields to gather statistics that enable things like improved binning behavior in charts, and to generally make your Metabase instance smarter.
If this option is enabled, Metabase will scan a subset of values of fields when syncing with this database to gather statistics that enable things like improved binning behavior in charts, and to generally make your Metabase instance smarter.
You can turn this option on and off in the **Show advanced options** section.
### Additional JDBC connection string options
@@ -132,9 +132,19 @@ You can also delete a database from the database list: hover over the row with t
If you're having trouble with your database connection, you can check out this [troubleshooting guide](https://www.metabase.com/docs/latest/troubleshooting-guide/datawarehouse.html), or visit [Metabase's discussion forum](https://discourse.metabase.com/) to see if someone has encountered and resolved a similar issue.
@@ -10,27 +10,27 @@ This page will teach you how to create and manage your collections. For more inf
### Creating and editing collections
If a user has Curate access for a collection, they can create new sub-collections inside it and edit the contents of the collection. From the detail view of any collection, click on the `Create a collection` button to make a new one. Give your collection a name, choose where it should live, and give it a description if you'd like.
If a user has Curate access for a collection, they can create new sub-collections inside it and edit the contents of the collection. From the detail view of any collection, click on the **+** button and select **Collection** to make a new one. Give your collection a name, choose where it should live, and give it a description if you'd like.
By default, new collections will have the same permissions settings as the collection it was created in (its "parent" collection), but you can change those settings from the Edit menu.
By default, any new collection will have the same permissions settings as the collection it was created in (its "parent" collection), but you can change those settings from the Edit menu.
### Pinning things in collections

One great feature in Metabase is that you can pin the most important couple of items in each of your collections to the top. Pinning an item in a collection turns it into a big, eye-catching card that will help make sure that folks who are browsing your Metabase instance will always know what's most important.
One great feature in Metabase is that you can pin the most important couple of items in each of your collections to the top. Pinning an item in a collection turns it into a big, eye-catching card that will help make sure that folks who are browsing your Metabase instance will always know what's most important. And if you pin a question, Metabase will display a preview of its visualization.
Any user with curate permissions for a collection can pin items in it, making it easy to delegate curation responsibilities to other members of your team. To pin something, you can either click and drag it to the top of the page, or click on its menu and choose the pin action. Note that collections themselves can't be pinned, but if you're running [Metabase Pro or Enterprise Edition](https://www.metabase.com/pricing), admins can designate [Offical Collections][offical-collections].
Any user with curate permissions for a collection can pin items in it, making it easy to delegate curation responsibilities to other members of your team. To pin something, select the **pin icon** next to the item's name. Note that collections themselves can't be pinned, but if you're running [a paid plan](https://www.metabase.com/pricing), admins can designate [Offical Collections][offical-collections].
### Setting permissions for collections
Collection permissions are similar to [data access permissions](05-setting-permissions.md). You can set permissions on collections by clicking on the lock icon in the top-right of the screen while viewing the collection and clicking on `Edit permissions`. Only Administrators can edit collection permissions. Each [user group](05-setting-permissions.md) can have either View, Curate, or No access to a collection:
Collection permissions are similar to [data access permissions](05-setting-permissions.md). You can set permissions on collections by clicking on the lock icon in the top-right of the screen while viewing the collection and clicking on **Edit permissions**. Only Administrators can edit collection permissions. Each [user group](05-setting-permissions.md) can have either View, Curate, or No access to a collection:
- **Curate access:** the user can edit, move, and archive items saved in this collection, and can save or move new items into it. They can also create new sub-collections within this collection. In order to archive a sub-collection within this collection, they'll need to have Curate access for it and any and all collections within it.
- **View access:** the user can see all the questions, dashboards, and pulses in the collection. If the user does not have permission to view some or all of the questions included in a given dashboard or pulse then those questions will not be visible to them; but any questions that are saved in this collection _will_ be visible to them, _even if the user doesn't have access to the underlying data used to in the question._
- **No access:** the user won't see this collection listed, and doesn't have access to any of the items saved within it.
- **Curate access**: the user can edit, move, and archive items saved in this collection, and can save or move new items into it. They can also create new sub-collections within this collection. In order to archive a sub-collection within this collection, they'll need to have Curate access for it and any and all collections within it.
- **View access**: the user can see all the questions, dashboards, and pulses in the collection. If the user does not have permission to view some or all of the questions included in a given dashboard or pulse then those questions will not be visible to them; but any questions that are saved in this collection _will_ be visible to them, _even if the user doesn't have access to the underlying data used to in the question._
- **No access**: the user won't see this collection listed, and doesn't have access to any of the items saved within it.
@@ -48,15 +48,15 @@ To learn more, check out our Learn article on [working with collection permissio
### Personal collections
Each user has a personal collection where they're always allowed to save things, even if they don't have Curate permissions for any other collections. Administrators can see and edit the contents of every user's personal collection (even those belonging to other Administrators) by clicking on the "All personal collections" link from the "Our analytics" collection.
Each user has a personal collection where they're always allowed to save things, even if they don't have Curate permissions for any other collections. Administrators can see and edit the contents of every user's personal collection (even those belonging to other Administrators) by clicking on the **Other users' personal collections** link at the bottom of the sidebar when viewing "Our analytics".
A personal collection works just like any other collection except that its permissions can't be changed. If a sub-collection within a personal collection is moved to a different collection, it will inherit the permissions of that collection.
### Archiving collections
Users with curate permission for a collection can archive collections. Click the edit icon in the top-right of the collection screen and select `Archive this collection` to archive it. This will also archive all questions, dashboards, pulses, and all other sub-collections and their contents. Importantly, this will also remove any archived questions from all dashboards and Pulses that use them.
Users with curate permission for a collection can archive collections. Click the edit icon in the top-right of the collection screen and select **Archive this collection** to archive it. This will also archive all questions, dashboards, pulses, and all other sub-collections and their contents. Importantly, this will also remove any archived questions from all dashboards and Pulses that use them.
**Note:**the "Our analytics" collection and personal collections can't be archived.
**Note:**The "Our analytics" collection and personal collections can't be archived.
You can always _unarchive_ items. In the Collections list sidebar, at the bottom, click on __View archive__. Search for the item you'd like to unarchive (you'll either need to scroll down the page, or use the browser's find in page functionality, as archived items won't appear in Metabase's search results). Select the open box with an up arrow icon to "Unarchive this".
@@ -6,9 +6,8 @@ Metabase allows you to create your own segments and metrics so you can quickly a
A segment is just a special named filter or set of filters. You can create these to make sure that there is an official definition of a subset of customers, users, or products that everyone on your team can refer to consistently. For example, you might create a segment called “Active Users” that contains all the filters that are needed to correctly select active users.
To start, select a table that you want to add a segment to. When you’re done, this segment will be accessible from the filter list in the query builder when viewing this table (the segment will not be automatically applied to the table).
To start, select the **Segments** tab, followed by the **New segment** button on the right side of the screen. Choose the appropriate table and filters for your new segment and add a title and description. When you’re done, this segment will be accessible from the filter list in the query builder when viewing this table (the segment will not be automatically applied to the table).
Click on the **Add a Segment** link on the right side of the screen.

Now you’ll be looking at the segment builder, which is a limited version of the query builder, with only the option to add filters. Add your filter(s) as you would in the query builder, and then give your segment a name and a description (these will be visible in the query builder filter dropdown after you’ve saved). If you want to test out your segment in the query builder before you save it, just click the Preview button, which will open a new query builder window with your segment applied.
@@ -24,11 +23,10 @@ If you exit the Admin Panel and try asking a new question, then click on the but
A custom metric is an easy way to refer to a computed number that you reference often. This could be something like **revenue**, which you could arrive at by viewing the Sum of your Order’s Subtotal column, and applying any required filters —but it’s a pain to have to do this every time you want to do something with revenue.
So, you create a custom metric in a very similar way to how you create segments: start by clicking on the **Add a Metric**link from a table’s detail view in the Admin Panel.

You create a custom metric in a very similar way to how you create segments: start by clicking on the **Metrics**tab in the Data Model section of the Admin Panel, and select **New metric**.
Here you're presented with a slightly different version of the query builder, which only lets you select filters and aggregations. Filters are optional: a metric only requires an aggregation on a field. Note that you can use segments in the definition of metrics —pretty cool, right? Go ahead and select your filters, if any, and choose your aggregation. Give your metric a name and a description, and click **Save changes** when you’re done. Just like with segments, you can use the **Preview** button to see how your metric looks in the query builder before you save it.


Your new metric will now be available from the View dropdown in the query builder, under **Common Metrics**.
@@ -5,11 +5,10 @@ If you want to have your [Dashboard subscriptions][dashboard-subscriptions] sent
Here's an overview of the steps for setting up Slack:
1. [Create your Slack App](#create-your-slack-app)
2. [Give Slack your app manifest](#the-app-manifest)
3. [Install your app to your workspace](#install-your-app-to-your-workspace)
4. [Get the Bot User OAuth Token](#the-bot-user-oauth-token)
5. [Create a dedicated Metabase channel in your Slack](#create-a-dedicated-metabase-channel-in-your-slack)
6. [Save your changes](#save-your-changes-in-metabase)
2. [Install your app to your workspace](#install-your-app-to-your-workspace)
3. [Get the Bot User OAuth Token](#the-bot-user-oauth-token)
4. [Create a dedicated Metabase channel in your Slack](#create-a-dedicated-metabase-channel-in-your-slack)
5. [Save your changes](#save-your-changes-in-metabase)
## Create your Slack App
@@ -19,11 +18,48 @@ From any Metabase page, go to **Admin settings** > **Settings** > **Slack**.
Click on **Open Slack Apps**. Metabase will open a new browser tab and send you over to the Slack website to create the Slack app.
On the Slack website, click **Create an App**. Select **From an app manifest** and and select the Slack workspace you want Metabase to post to (you're not going to be developing an app, this is just telling Slack what workspace you want Metabase to post to).
On the Slack website, click **Create an App**.
## The app manifest
### Pick a workspace to develop your app
To get the app manifest, head back to Metabase and the Slack settings page, copy the manifest, and return to the Slack app creation page on the Slack website to paste in the manifest (the manifest is in YAML format). The manifest will take care of settings for your app and help speed things along. Once you've pasted the manifest, click the **Next** button. Then hit **Create** to set up your Slack app.
Select the workspace you want to create your app.
### The app manifest
When you click on **Open Slack App**, Metabase will pass along the app manifest, which Slack will use to set up your app.
You may get a warning that says:
**This app is created from a 3rd party manifest** Always verify URLs and permissions below.
This warning is expected (Metabase is the third party here). You can click on **Configure** to see the app manifest Metabase sent along in the URL. Here is the manifest in YAML format:
```
_metadata:
major_version: 1
minor_version: 1
display_information:
name: Metabase
description: Bringing the power of Metabase to your Slack #channels!
background_color: "#509EE3"
features:
bot_user:
display_name: Metabase
oauth_config:
scopes:
bot:
- users:read
- channels:read
- channels:join
- files:write
- chat:write
- chat:write.customize
- chat:write.public
```
The manifest just take cares of some settings for your app and helps speed things along.
Click the **Next** button. Then hit **Create** to set up your Slack app.
@@ -86,7 +86,7 @@ Metabase Pro and Enterprise Editions ship with more advanced LDAP features.
{% include plans-blockquote.html feature="LDAP user attribute syncing" %}
If you're running [Metabase Pro or Enterprise Edition](https://www.metabase.com/pricing) and using [data sandboxes](../enterprise-guide/data-sandboxes.md), you can use existing LDAP [user attributes](../enterprise-guide/data-sandboxes.html#getting-user-attributes) when granting sandboxed access.
If you're running a [paid version of Metabase](https://www.metabase.com/pricing) and using [data sandboxes](../enterprise-guide/data-sandboxes.md), you can use existing LDAP [user attributes](../enterprise-guide/data-sandboxes.html#getting-user-attributes) when granting sandboxed access.
Metabase includes a powerful application embedding feature that allows you to embed your saved questions or dashboards in your own web applications. You can even pass parameters to these embeds to customize them for different users.
### Key Concepts
## Key Concepts
#### Applications
### Applications
An important distinction to keep in mind is the difference between Metabase and the embedding application. The charts and dashboards you will be embedding live in the Metabase application, and will be embedded in your application (i.e. the embedding application).
#### Parameters
### Parameters
Some dashboards and questions have the ability to accept parameters. In dashboards, these are synonymous with dashboard filters. For example, if you have a dashboard with a filter on Publisher ID, this can be specified as a parameter when embedding, so that you could insert the dashboard filtered down to a specific Publisher ID.
Some dashboards and questions have the ability to accept [parameters](../users-guide/13-sql-parameters). In dashboards, these are synonymous with [dashboard filters](../users-guide/08-dashboard-filters). For example, if you have a dashboard with a filter on `Publisher ID`, this can be specified as a parameter when embedding, so that you could insert the dashboard filtered down to a specific `Publisher ID`.
SQLbased questions with template variables can also accept parameters for each variable. So for a query like
SQL-based questions with template variables can also accept parameters for each variable. So for a query like:
```
SELECT count(*)
@@ -20,44 +20,44 @@ FROM orders
WHERE product_id = {% raw %}{{productID}}{% endraw %}
```
you could specify a specific productID when embedding the question.
you could specify a specific `productID` when embedding the question.
#### Signed parameters
### Signed parameters
In general, when embedding a chart or dashboard, the server of your embedding application will need to sign a request for that resource.
If you choose to sign a specific parameter value, that means the user can't modify that, nor is a filter widget displayed for that parameter. For example, if the "Publisher ID" is assigned a value and the request signed, that means the front-end client that renders that dashboard on behalf of a given logged-in user can only see information for that publisher ID.
If you choose to sign a specific parameter value, that means the user can't modify that value, nor is a filter widget displayed for that parameter. For example, if the `Publisher ID` is assigned a value and the request signed, that means the front-end client that renders that dashboard on behalf of a given logged-in user can only see information for that publisher ID.
### Enabling embedding
## Enabling embedding
To enable embedding, go to the Admin Panel and under Settings, go to the "Embedding in other applications" tab. From there, click "Enable." Here you will see a secret signing key you can use later to sign requests. If you ever need to invalidate that key and generate a new one, just click on "Regenerate Key".
To enable embedding, go to the **Admin Panel** and select **Embedding in other Applications** from the left sidebar. When you click **Enable**, you'll see an **Embedding secret key** you can use later to sign requests. If you ever need to invalidate that key and generate a new one, just click on **Regenerate key**.
You can also see all questions and dashboards that have been marked as "Embeddable" here, as well as revoke any questions or dashboards that should no longer be embeddable in other applications.
You can also see all questions and dashboards that have been marked as embedded here, as well as revoke any questions or dashboards that should no longer be embeddable in other applications.
Once you've enabled the embedding feature on your Metabase instance, you should then go to the individual questions and dashboards you wish to embed to set them up for embedding.
Once you've enabled the embedding feature on your Metabase instance, next you'll want to set up individual questions and dashboards for embedding.
### Embedding charts and dashboards
## Embedding charts and dashboards
To make a question or dashboard embeddable, click the sharing icon on it:
To make a question or dashboard embeddable, click the **arrow icon** at the bottom right.

Then select "Embed this question in an application"
Then select **Embed this question in an application**.

Here you will see a preview of the question or dashboard as it will appear in your application, as well as a panel that shows you the code you will need to insert in your application.
You'll see a preview of the question or dashboard as it will appear in your application, as well as a panel showing the code you'll need to insert in your application. You can alternate between the preview and code with the toggle near the top of the page.

Importantly, you will need to hit "Publish" when you first set up a chart or dashboard for embedding and each time you change your embedding settings. Also, any changes you make to the resource might require you to update the code in your own application to the latest code sample in the "Code Pane".
Important: you'll need to hit **Publish** when you first set up a chart or dashboard for embedding *and* each time you change any embedding settings. Also, any changes you make to the resource may require you to update the code in your own application so that it matches the latest code sample in this panel.

We provide code samples for common frontend template languages as well as some common back-end web frameworks and languages. You may also use these as starting points for writing your own versions in other platforms.
Metabase provides code samples for common front-end template languages as well as some common back-end web frameworks and languages. You can also use these as starting points for writing your own versions in other platforms.
### Embedding charts and dashboards with locked parameters
## Embedding charts and dashboards with locked parameters
If you wish to have a parameter locked down to prevent your embedding application's end users from seeing other users' data, you can mark parameters as "Locked." This will prevent that parameter from being displayed as a filter widget, so its value must instead be set by the embedding application's server code.
@@ -73,7 +73,7 @@ params: {
...
```
### Hiding parameters
## Hiding parameters
If you have parameters that aren't required, but that you'd like to be hidden, instead of marking them as Locked you can use the `hide_parameters` URL option to hide one or more parameters (i.e., prevent it from showing up as a filter widget on screen). You'll want to add this option to the Metabase URL specified in your embedding iframe.
@@ -107,7 +107,7 @@ To specify multiple values for filters, though, you'll need to separate them wit
/dashboard/42?id=7&customer_name=janet
```
### Resizing dashboards to fit their content
## Resizing dashboards to fit their content
Dashboards are a fixed aspect ratio, so if you'd like to ensure they're automatically sized vertically to fit their contents you can use the [iFrame Resizer](https://github.com/davidjbradshaw/iframe-resizer) script. Metabase serves a copy for convenience:
@@ -116,7 +116,7 @@ Dashboards are a fixed aspect ratio, so if you'd like to ensure they're automati
These settings can also be changed under **Style** when previewing the embedded question or dashboard and its code in Metabase.
## Reference applications
To see concrete examples of how to embed Metabase in applications under a number of common frameworks, check out our [reference implementations](https://github.com/metabase/embedding-reference-apps) on Github.
## Premium embedding
## Further reading
If you'd like to embed Metabase dashboards or charts in your application without the "Powered by Metabase" attribution, you can purchase premium embedding from the Metabase store. [Find out more here](https://store.metabase.com/product/embedding).
To learn more about embedding, check out these articles:
- [Embedding charts and dashboards](https://www.metabase.com/learn/developing-applications/advanced-metabase/embedding-charts-and-dashboards)
- [Four strategies for delivering customer-facing analytics with Metabase](https://www.metabase.com/learn/developing-applications/advanced-metabase/embedding-overview)
- [Embed Metabase in your app to deliver multi-tenant, self-service analytics](https://www.metabase.com/learn/developing-applications/advanced-metabase/multi-tenant-self-service-analytics.html)
Check out the [Embedding track](/learn/embedding) in Learn Metabase.
Metabase now gives you the ability to automatically cache the results of queries that take a long time to run.
### Enabling caching
## Enabling caching
To start caching your queries, head to the Settings section of the Admin Panel, and click on the `Caching` tab at the bottom of the side navigation. Then turn the caching toggle to `Enabled`.

End-users will see a timestamp on cached questions in the top right of the question detail page showing the time when that question was last updated (i.e., the time when the current result was cached). Clicking on the `Refresh` button on a question page will manually rerun the query and override the cached result with the new result.
### Caching settings
## Caching settings
In Metabase, rather than setting cache settings manually on a per-query basis, we give you two parameters to set to automatically cache the results of long queries: the minimum average query duration, and the cache TTL multiplier.
#### Minimum query duration
### Minimum query duration
Your Metabase instance keeps track of the average query execution times of your queries, and it will cache the results of all saved questions with an average query execution time longer than the number you put in this box (in seconds).
#### Cache Time-to-live (TTL)
### Cache Time-to-live (TTL)
Instead of setting an absolute number of minutes or seconds for a cached result to persist, Metabase lets you put in a multiplier to determine the cache's TTL. Each query's cache TTL is computed by multiplying its average execution time by the number you put in this box. So if you put in `10`, a query that takes 5 seconds on average to execute will have its cache last for 50 seconds; and a query that takes 10 minutes will have a cached result lasting 100 minutes. This way, each query's cache is proportional to its execution time.
#### Max cache entry size
### Max cache entry size
Lastly, you can set the maximum size of each question's cache in kilobytes, to prevent them from taking up too much space on your server.
---
## Advanced caching controls
Paid plans ship with [additional caching options](../enterprise-guide/cache.md).
## Next: map customization
If you need to use a map tile server other than the one Metabase provides, you can find more information [on the next page](20-custom-maps.md).
This page covers permissions for databases and tables. If you haven't already, check out our [Permissions overview][permissons-overview].
This page covers permissions for databases and tables. If you haven't already, check out our [Permissions overview][permissions-overview].
## Permissions view
@@ -56,17 +56,16 @@ Only available in paid plans, Sandboxed access to a table can restrict access to
## Permissions and dashboard subscriptions
You don't explicitly set permissions on [dashboards subscriptions][dashboard-subscriptions], as the subscriptions are a feature of a dashboard. Which means that What you can do j
You don't explicitly set permissions on [dashboards subscriptions][dashboard-subscriptions], as the subscriptions are a feature of a dashboard. If a person is in a group that has __Curate access__ to the collection containing the dashboard, they can view and edit all subscriptions for the dashboard, including subscriptions created by other people.
If a person is in a group that has __Curate access__ to the collection containing the dashboard, they can view and edit all subscriptions for the dashboard, including subscriptions created by other people.
If a group has read-only access to a dashboard (based on its collection permissions), they can view all subscriptions for that dashboard. They can also create subscriptions and edit ones that they’ve created, but they can’t edit ones that other users created. (That last point is enforced by the BE only, the FE still needs to be updated to show the subscriptions as read-only.)
If a group has __read-only access__ to a dashboard (based on its collection permissions), they can view all subscriptions for that dashboard. They can also create subscriptions and edit ones that they’ve created, but they can’t edit ones that other users created. (That last point is enforced by the BE only, the FE still needs to be updated to show the subscriptions as read-only.)
If a group has no access to a dashboard, they can’t view any of its subscriptions, including ones that they may have created in the past, prior to having access revoked.
If you have read-only access to a dashboard, you can also unsubscribe yourself from a subscription that somebody else created via the new page in account settings.
## Further reading
- [Guide to data permissions](https://www.metabase.com/learn/organization/organization/data-permissions.html).
- [Guide to data permissions](https://www.metabase.com/learn/organization/organization/data-permissions.html)
This page provides information on how to create and manage a connection to a Google [BigQuery](https://cloud.google.com/bigquery) dataset.
This page provides information on how to create and manage a connection to a Google [BigQuery](https://cloud.google.com/bigquery) dataset, including one that uses [files stored in Google Drive](https://cloud.google.com/bigquery/external-data-drive) as a data source, like Google Sheets (GSheets).
- [Prerequisites](#prerequisites)
- [Google Cloud Platform: creating a service account and JSON file](#google-cloud-platform-creating-a-service-account-and-json-file)
- [Metabase: Adding a BigQuery dataset](#metabase-adding-a-bigquery-dataset)
- [Connecting Metabase to Google Drive data sources](#connecting-metabase-to-google-drive-data-sources)
- [Using Legacy SQL](#using-legacy-sql)
## Prerequisites
@@ -22,7 +29,7 @@ To create the service account JSON file, follow Google's documentation on [setti
- BigQuery Metadata Viewer
- BigQuery Job User (distinct from BigQuery User)
For more information on **roles** in BigQuery, see [Google Cloud Platform's documentation](https://cloud.google.com/bigquery/docs/access-control).
For more information on **roles** in BigQuery, see [Google Cloud Platform's documentation](https://cloud.google.com/bigquery/docs/access-control).
4.**Create key**. Once you have assigned roles to the service account, click on the **Create Key** button, and select **JSON** for the **key type**. The JSON file will download to your computer.
@@ -34,52 +41,120 @@ Once you have created and downloaded your service account JSON file for your Big
On the **ADD DATABASE** page, select **BigQuery** from the **Database type** dropdown. Metabase will present you with the relevant configuration settings to fill out:

### Settings
#### Name
#### Display name
**Name** is the title of your database in Metabase.
#### Dataset ID
#### Project ID (override)
Each BigQuery dataset will have a **Dataset ID**. You can find this ID via the [Google Cloud Console](https://console.cloud.google.com/). If you're not sure where to find the **Dataset ID**, see Google's documentation on [getting information on datasets](https://cloud.google.com/bigquery/docs/dataset-metadata#getting_dataset_information).
Each BigQuery dataset will have a **Project ID**. You can find this ID via the [Google Cloud Console](https://console.cloud.google.com/). If you're not sure where to find the **Project ID**, see Google's documentation on [getting information on datasets](https://cloud.google.com/bigquery/docs/dataset-metadata#getting_dataset_information).
> When entering the **Dataset ID**, omit the Project ID prefix. For example, if your ID is `project_name:dataset_id`, only enter `dataset_id`.
> When entering the **Project ID**, omit the Project ID prefix. For example, if your ID is `project_name:project_id`, only enter `project_id`.
#### Service account JSON file
Upload the service account JSON file you created when following the [steps above](#google-cloud-platform-creating-a-service-account-and-json-file). The JSON file contains the credentials your Metabase application will need to read and query your dataset, as defined by the **roles** you added to the service account. If you need to add additional **roles**, you have to create another service account, download the JSON file, and upload the file to Metabase.
#### Datasets
Here you can specify which datasets you want to sync and scan. Options are:
- All
- Only these...
- All except...
For the Only these and All except options, you can input a comma-separated list of values to tell Metabase which datasets you want to include (or exclude). For example:
```
foo,bar,baz
```
You can use the `*` wildcard to match multiple datasets.
Let's say you have three datasets: foo, bar, and baz.
- If you have **Only these...** set, and enter the string `b*`, you'll sync with bar and baz.
- If you have **All except...** set, and enter the string `b*`, you'll just sync foo.
Note that only the `*` wildcard is supported; you can't use other special characters or regexes.
### Advanced settings
#### Use the Java Virtual Machine (JVM) timezone
_Default: Disabled_
_Default: Off_
We suggest you leave this off unless you're doing manual timezone casting in many or most of your queries with this data.
#### Automatically run queries when doing simple filtering and summarizing.
#### Include User ID and query hash in queries
_Default: Enabled_
_Default: On_
When this slider is on, Metabase will automatically run queries when users do simple explorations with the Summarize and Filter buttons when viewing a table or chart. You can turn this off if querying this database is slow. This setting doesn’t affect drill-throughs or SQL queries.
This can be useful for auditing and debugging, but prevents BigQuery from caching results and may increase your costs.
#### This is a large database, so let me choose when Metabase syncs and scans
#### Rerun queries for simple explorations
_Default: Disabled_
_Default: On_
By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, we recommend turning this on and reviewing when and how often the field value scans happen.
We execute the underlying query when you explore data using Summarize or Filter. If performance is slow, you can try disabling this option to see if there's an improvement.
#### Choose when Metabase syncs and scans
_Default: Off_
Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, we recommend turning this on and reviewing when and how often the field value scans happen.
#### Periodically refingerprint tables
_Default: Off_
This enables Metabase to scan for additional field values during syncs allowing smarter behavior, like improved auto-binning on your bar charts.
#### Default reset cache duration
{% include plans-blockquote.html feature="Database-specific caching" %}
How long to keep question results. By default, Metabase will use the value you supply on the [cache settings page](../../administration-guide/14-caching.md), but if this database has other factors that influence the freshness of data, it could make sense to set a custom duration. You can also choose custom durations on individual questions or dashboards to help improve performance.
Options are:
- **Use instance default (TTL)**. TTL is time to live, meaning how long the cache remains valid before Metabase should run the query again.
- **Custom**.
If you are on a paid plan, you can also set cache duration per questions. See [Advanced caching controls](../../enterprise-guide/cache.md).
### Save your database configuration
When you're done, click the **Save** button. A modal should pop up, informing you that your database has been added.

You can click on **Explore this data** to see some automatic explorations of your data, or click **I'm good thanks** to stay in the Admin Panel.
When you're done, click the **Save** button.
Give Metabase some time to sync with your BigQuery dataset, then exit Admin mode, click on **Browse Data**, find your database, and start exploring your data.
## Connecting Metabase to Google Drive data sources
To connect to a data source stored in Google Drive (like a Google Sheet) first make sure you've completed the steps above, including creating a project in Google Cloud Platform, adding a BigQuery dataset, and creating a [service account](#google-cloud-platform-creating-a-service-account-and-json-file). Then:
### Share your Google Drive source with the service account
While viewing your Drive file, (e.g., a Google Sheet), click the **Share** button in the top right. In the text box labeled **Add people or groups**, paste in the email of your service account, which you can find on the [Service Accounts page](https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts?supportedpurview=project) in the Google Cloud Console.
That email address will look something like `service-account-name@your-project-name.iam.gserviceaccount.com`, with the your service account and project names filled in accordingly.
Choose **Viewer** from the dropdown, uncheck the **Notify people** option, and click **Share**.
### Create an external table in BigQuery that points to your Google Drive source
If you don't already have a BigQuery dataset, [create one](https://cloud.google.com/bigquery/docs/datasets).
Next, using the Google Cloud Console, [create an external table](https://cloud.google.com/bigquery/external-data-drive?hl=en#creating_and_querying_a_permanent_external_table) within your BigQuery dataset that points to your Google Sheet.
Be sure to specify the correct **Drive URI** and file format.
If you haven't already [added your BigQuery dataset to Metabase](#metabase-adding-a-bigquery-dataset), go ahead and do that now.
Once you've completed these steps, you'll be able to ask questions and create dashboards in Metabase using a Google Drive source as your data.
## Using Legacy SQL
As of version 0.30.0, Metabase tells BigQuery to interpret SQL queries as [Standard SQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/). If you prefer using [Legacy SQL](https://cloud.google.com/bigquery/docs/reference/legacy-sql) instead, you can tell Metabase to do so by including a `#legacySQL` directive at the beginning of your query, for example:
@@ -92,11 +167,11 @@ FROM [my_dataset.my_table]
## Troubleshooting
If you're having trouble with your BigQuery connection, you can check out this [troubleshooting guide](https://www.metabase.com/docs/latest/troubleshooting-guide/datawarehouse.html), or visit [Metabase's discussion forum](https://discourse.metabase.com/search?q=bigquery) to see if someone has encountered and resolved a similar issue.
If you're having trouble with your BigQuery connection, you can check out this [troubleshooting guide](../../troubleshooting-guide/bigquery-drive) that covers BigQuery issues, [this one](../../troubleshooting-guide/datawarehouse) on data warehouse connections, or visit [Metabase's discussion forum](https://discourse.metabase.com/search?q=bigquery) to see if someone has encountered and resolved a similar issue.
@@ -6,37 +6,76 @@ This page provides information on how to create and manage a connection to a [Go
You will need to have a [Google Cloud Platform][google-cloud] account and create the [project][google-cloud-create-project] you would like to use in Metabase. Consult the Google Cloud Platform documentation on how to [create and manage a project][google-cloud-management] if you do not have one.
## Google Cloud Platform: creating OAuth client ID
## Google Cloud Platform: creating a service account and JSON file
To get the Client ID and Client Secret you will need, follow Google's Cloud Platform Help on [how to create an OAuth client ID][google-cloud-oauth]. For application type, select "Desktop App" (this avoids a `redirect_uri_mismatch` when requesting Auth Codes).
You'll first need a [service account](https://cloud.google.com/iam/docs/service-accounts) JSON file that Metabase can
use to access your Google Analytics dataset. Service accounts are intended for non-human users (such as applications
like Metabase) to authenticate (who am I?) and authorize (what can I do?) their API calls.
To create the service account JSON file, follow Google's documentation on [setting up a service
account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) for your Google Analytics dataset.
Here's the basic flow:
1.**Create service account**. From your Google Cloud Platform project console, open the main sidebar menu on the
left, go to the **IAM & Admin** section, and select **Service account**. The console will list existing service
accounts, if any. At the top of the screen, click on **+ CREATE SERVICE ACCOUNT**.
2.**Fill out the service account details**. Name the service account, and add a description (the service account ID
will populate once you add a name). Then click the **Create** button.
3. The **Service account permissions (optional)** section is not required. Click **Continue**.
4.**Create key**. Once you have assigned roles to the service account, click on the **Create Key** button, and select
**JSON** for the **key type**. The JSON file will download to your computer.
> **You can only download the key once**. If you delete the key, you'll need to create another service account with
> the same roles.
### Adding the service account to your Google Analytics account
The newly created service account will have an email address that looks similar to:
You must add this service account user to your Google Analytics account in order to use it. Add it by following the
instructions [here][google-analytics-add-user]. Only Read and Analyze permissions are needed for Metabase.
### Enabling Google Analytics API
To enable the Google Analytics API, go to <https://console.cloud.google.com/apis/api/analytics.googleapis.com/overview> in the Google Cloud Platform console. Double-check that the previously created project is selected and click on "Enable". For further documentation please refer to [Enable and disable APIs][google-enable-disable-apis].
##### Adding the API scopes
Refer to Google's Analytics API documentation to set up the required [scopes][google-oauth-scopes].
## Metabase: adding a Google Analytics Dataset
## Metabase: adding a Google Analytics dataset
In your Metabase, click on **Settings** and select "Admin" to bring up the **Admin Panel**. In the **Databases** section, click on the **Add database** button, then select "Google Analytics" from the "Database type" dropdown and fill in the configuration settings:
- **Name** is the title of your database in Metabase.
#### Display name
- To get the **Google Analytics Account ID**, go to [Google Analytics][google-analytics] and click the **Admin** cog. In the admin tab, go to the **Account Settings** section: you will find the account ID below the "Basic Settings" heading.
**Name** is the title of your database in Metabase.
- Paste the **Client ID** and **Client Secret** you created when setting up the OAuth client ID above. These credentials must be correctly associated to scopes allowing interaction with the Google Analytics API.
#### Account ID
- Once you've provided **Client ID** and **Client Secret** with valid scopes, a **Click here to get an auth code** link will appear over the **Auth Code** text box. Authorize the connection with your Google login credentials to see the Auth Code, then copy and paste the code into this box.
To get the **Google Analytics Account ID**, go to [Google Analytics][google-analytics] and click the **Admin** cog. In
the admin tab, go to the **Account Settings** section: you will find the account ID below the "Basic Settings"
heading.
- **Automatically run queries when doing simple filtering and summarizing:** When this setting is enabled (which it is by default), Metabase automatically runs queries when users do simple explorations with the Summarize and Filter buttons when viewing a table or chart. You can turn this off if you find performance is slow. This setting doesn’t affect drill-throughs or SQL queries.
#### Service account JSON file
- **This is a large database, so let me choose when Metabase syncs and scans:** When this setting is disabled (which it is by default), Metabase regularly checks the database to update its internal metadata. If you have a large database, we you can turn this on and control when and how often the field value scans happen.
Upload the service account JSON file you created when following the steps above. The JSON file contains the
credentials your Metabase application will need to read and query your dataset.
Please see the [database sync and analysis documentation][sync-docs] for more details about the two toggle settings.
### Advanced settings
- **Rerun queries for simple explorations**: When this setting is enabled (which it is by default), Metabase automatically runs queries when users do simple explorations with the Summarize and Filter buttons when viewing a table or chart. You can turn this off if you find performance is slow. This setting doesn’t affect drill-throughs or SQL queries.
- **Choose when syncs and scans happen**: When this setting is disabled (which it is by default), Metabase regularly checks the database to update its internal metadata. If you have a large database, we you can turn this on and control when and how often the field value scans happen.
- **Periodically refingerprint tables**: This setting — disabled by default — enables Metabase to scan for additional field values during syncs allowing smarter behavior, like improved auto-binning on your bar charts.
Please see the [database sync and analysis documentation][sync-docs] for more details about these toggle settings.
## Save your database configuration
@@ -45,6 +84,7 @@ When you're done, click the **Save** button. A modal dialog will inform you that
Give Metabase some time to sync with your Google Analytics dataset, then exit the **Admin Panel**, click on **Browse Data**, find your Google Analytics database, and start exploring. Once Metabase is finished syncing, you will see the names of your Properties & Apps in the data browser.
@@ -14,7 +14,7 @@ Because MongoDB contains unstructured data, Metabase takes a different approach
## Connecting to MongoDB
Go to Admin -> Databases, and click the **Add database** button. Select MongoDB from the dropdown.
Go to Admin -> Databases, and click the **Add database** button. Select MongoDB from the dropdown, and enter your desired **Display name** for this database.
There are two ways to connect to MongoDB:
@@ -30,19 +30,18 @@ The default way to connect to MongoDB is to fill out your connection details in
- Port
- Username
- Password
- Authentication Database (optional database to use when authenticating)
- Authentication Database (optional)
- Additional connection string options (optional)
Additional settings:
You'll also have the option to **Use a secure connection (SSL)**. Enable SSL and paste the contents of the server's SSL certificate chain in the input text box. This option is available for this method of connection only (i.e. you cannot include a certificate when connecting with a connection string).
#### Advanced settings for direct connection
- **Use DNS SRV when connecting** Using this option requires that provided host is a FQDN. If connecting to an Atlas cluster, you might need to enable this option. If you don't know what this means, leave this disabled.
- **Use a secure connection (SSL)** Enable SSL and paste the contents of the server's SSL certificate chain in the input text box. This option is available for this method of connection only (i.e. you cannot include a certificate when connecting with a connection string).
### Using a connection string
If you'd prefer to connect to MongoDB using a [connection string](https://docs.mongodb.com/manual/reference/connection-string/),
click on **Paste a connection string**. The Metabase user interface will update with a field to paste your connection string.
If you'd prefer to connect to MongoDB using a [connection string](https://docs.mongodb.com/manual/reference/connection-string/), click on **Paste a connection string**. The Metabase user interface will update with a field to paste your connection string.
Metabase currently does NOT support the following connection string parameters:
@@ -54,9 +53,10 @@ If you need to use a certificate, connect via the [default method](#using-metaba
### Settings common to both connection options
- **Use an SSH tunnel for database connections.** Some database installations can only be accessed by connecting through an SSH bastion host. This option also provides an extra layer of security when a VPN is not available. Enabling this is usually slower than a direct connection.
- **Automatically run queries when doing simple filtering and summarizing.** When this is on, Metabase will automatically run queries when users do simple explorations with the Summarize and Filter buttons when viewing a table or chart. You can turn this off if querying this database is slow. This setting doesn’t affect drill-throughs or SQL queries.
- **This is a large database, so let me choose when Metabase syncs and scans.** By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, we recommend turning this on and reviewing when and how often the field value scans happen.
- **Use an SSH tunnel**: Some database installations can only be accessed by connecting through an SSH bastion host. This option also provides an extra layer of security when a VPN is not available. Enabling this is usually slower than a direct connection.
- **Rerun queries for simple exploration**: When this is on, Metabase will automatically run queries when users do simple explorations with the Summarize and Filter buttons when viewing a table or chart. You can turn this off if querying this database is slow. This setting doesn’t affect drill-throughs or SQL queries.
- **Choose when syncs and scans happen**: By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, we recommend turning this on and reviewing when and how often the field value scans happen.
- **Periodically refingerprint tables**: This setting — disabled by default — enables Metabase to scan for additional field values during syncs allowing smarter behavior, like improved auto-binning on your bar charts.
## Configuring SSL via the command line
@@ -111,4 +111,4 @@ One workaround is to include all possible keys in the first document of the coll
## Further reading
See our troubleshooting guide for [troubleshooting your connection](../../troubleshooting-guide/datawarehouse.md)
See our troubleshooting guide for [troubleshooting your connection](../../troubleshooting-guide/datawarehouse.md).
This page includes some helpful info for connecting Metabase to your MySQL database.
- [Conneting to MySQL 8+ servers](#connecting-to-mysql-8-servers)
- [Unable to log in with correct credentials](#unable-to-log-in-with-correct-credentials)
- [Raising a MySQL Docker container of MySQL 8+](#raising-a-mysql-docker-container-of-mysql-8)
- [Connecting to MySQL 8+ servers](#connecting-to-mysql-8-servers)
- [Unable to log in with correct credentials](#unable-to-log-in-with-correct-credentials)
- [Raising a MySQL Docker container of MySQL 8+](#raising-a-mysql-docker-container-of-mysql-8)
### Connecting to MySQL 8+ servers
## Connecting to MySQL 8+ servers
Metabase uses the MariaDB connector to connect to MariaDB and MySQL servers. The MariaDB connector does not currently support MySQL 8's default authentication plugin, so in order to connect, you'll need to change the plugin used by the Metabase user to `mysql_native_password`: `ALTER USER 'metabase'@'%' IDENTIFIED WITH mysql_native_password BY 'thepassword';`
### Unable to log in with correct credentials
## Unable to log in with correct credentials
**How to detect this:** Metabase fails to connect to your MySQL server with the error message "Looks like the username or password is incorrect", but you're sure that the username and password is correct. You may have created the MySQL user with an allowed host other than the host you're connecting from.
@@ -31,7 +31,7 @@ FLUSH PRIVILEGES;
Remember to drop the old user: `DROP USER 'metabase'@'localhost';`.
### Raising a MySQL Docker container of MySQL 8+
## Raising a MySQL Docker container of MySQL 8+
If you are spinning up a new MySQL container, and:
Starting in v0.20.0, Metabase provides a driver for connecting to Oracle databases. Under the hood, Metabase uses Oracle's JDBC driver; due to licensing restrictions, we can't
include it as part of Metabase. Luckily, downloading it yourself and making it available to Metabase is straightforward and only takes a few minutes.
## Downloading the Oracle JDBC Driver JAR
### Downloading the Oracle JDBC Driver JAR
You can download a JDBC driver from [Oracle's JDBC driver downloads page](https://www.oracle.com/technetwork/database/application-development/jdbc/downloads/index.html).
You can download the JDBC driver from [Oracle's JDBC driver downloads page](https://www.oracle.com/technetwork/database/application-development/jdbc/downloads/index.html).
Head to this page, accept the license agreement, and download `ojdbc8.jar`:
The minimum driver version should be 19c, regardless of which Java version or Oracle Database version you have.
Before downloading this JAR you may need to sign up for a free account with Oracle. We have had success with the latest version at the time of this writing, 19.3 (even with older Oracle 12c databases), but any version _should_ work.
## Adding the Oracle JDBC Driver JAR to the Metabase plugins directory
### Adding the Oracle JDBC Driver JAR to the Metabase Plugins Directory
In your Metabase directory (the directory where you keep and run your metabase.jar), create a directory called `plugins` (if it doesn't already exist.
Metabase will automatically make the Oracle driver available if it finds the Oracle JDBC driver JAR in the Metabase plugins directory when it starts up.
All you need to do is create the directory, move the JAR you just downloaded into it, and restart Metabase.
Move the JAR you just downloaded (`ojdbc8.jar`) into the plugins directory, and restart Metabase. Metabase will automatically make the Oracle driver available when it starts back up.
### Connecting with SSL
## Connecting with SSL
To connect to Oracle via SSL and enable encryption, check the `Use a secure connection (SSL)` option on the connection
setup page. You can add other SSL features (including client and/or server authentication) as explained below. You can
To connect to Oracle via SSL and enable encryption, check the `Use a secure connection (SSL)` option on the connection setup page. You can add other SSL features (including client and/or server authentication) as explained below. You can
use both client and server authentication (known as mutual authentication).
#### Server authentication
### Server authentication with a truststore
To configure the client (Metabase) to authenticate the identity of the server (the Oracle server), you may need to
configure a truststore file that includes the server's root CA, so that the JVM running Metabase trusts its
certificate chain. Refer to the
[Oracle documentation](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) on using `keytool` to
manage key and truststore files, importing certificates, etc. Once you have a truststore file ready, add the
With this done, the SSL connection to Oracle will authenticate the server.
[Oracle documentation](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) on using `keytool` to manage key and truststore files, importing certificates, etc.
For more information on setting up a truststore for AWS RDS Oracle instances, see the
[instructions provided by Amazon](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.Options.SSL.html#Appendix.Oracle.Options.SSL.JDBC).
Note that if you require connecting to other databases using SSL, instead of creating a new truststore, as shown in
those examples, you'll probably want to add the RDS CA to your existing truststore file (likely called `cacerts`),
#### Client authentication
If you need to connect to other databases using SSL, instead of creating a new truststore, you'll probably want to add the RDS CA to your existing truststore file (likely called `cacerts`).
### Client authentication with a keystore
To configure the server (the Oracle server) to authenticate the identity of the client (Metabase), you need to
configure a keystore file that includes the client's private key. The steps are almost identical to those
above, except that you will import the client's private key into the keystore rather than a root CA into a truststore
file.
configure a keystore file that includes the client's private key. You'll import the client's private key into the keystore (rather than a root CA into a truststore file). Add the following JVM options for Metabase:
With this done, the Oracle server will authenticate Metabase using the private key when Metabase tries to connect over
SSL.
With this done, the Oracle server will authenticate Metabase using the private key when Metabase tries to connect over SSL.
#### When running from a JAR
## When running from a JAR
By default, the plugins directory is called `plugins`, and lives in the same directory as the Metabase JAR.
@@ -73,6 +56,6 @@ For example, if you're running Metabase from a directory called `/app/`, you sho
/app/plugins/ojdbc8.jar
```
#### When running from Docker
## When running from Docker
The process for adding plugins when running via Docker is similar, but you'll need to mount the `plugins` directory. Refer to instructions [here](../../operations-guide/running-metabase-on-docker.html#adding-external-dependencies-or-plugins) for more details.
In addition to specifying the host, port, database name and user credentials for the database connection, you have the option of securing that connection.
## Use a secure connection (SSL)
### SSL Mode
PostgreSQL databases support different levels of security with their connections, with different levels of overhead.
SSL Mode options include:
- allow
- prefer
- require
- verify-ca
- verify-full
See the PostgreSQL docs for a table about the different [SSL Modes][ssl-modes], and select the option that works for you.
### SSL root certificate (PEM)
If you set the SSL Mode to either "verify-ca" or "verify-full", you'll need to specify a root certificate (PEM). You have the option of using a **Local file path** or an **Uploaded file path**. If you're on Metabase Cloud, you'll need to select **Uploaded file path** and upload your certificate.
### Authenticate client certificate
#### SSL Client Certificate (PEM)
You have the option of using a **Local file path** or an **Uploaded file path**. If you're on Metabase Cloud, you'll need to select **Uploaded file path** and upload your certificate.
#### SSL Client KEY (PKCS-8/DER or PKCS-12)
Again, you have the option of using a **Local file path** or an **Uploaded file path**. If you're on Metabase Cloud, you'll need to select **Uploaded file path** and upload your certificate.
You'll also need to input your **SSL Client Key Password**.
## Use an SSH tunnel
You can set up an SSH tunnel by supplying the tunnel host, port, tunnel username, and SSH authentication credentials, either using an SSH Key and passphrase, or a password.
For more, see [SSH tunneling in Metabase][ssh-tunnel].
## Advanced options
### Additional JDBC connection string options
Here you can add on to your connection string.
### Rerun queries for simple exploration
We execute the underlying query when you explore data using Summarize or Filter. This is on by default, but you can turn it off if performance is slow.
### Choose when syncs and scans happen
This is a lightweight process that checks for updates to this database’s schema. In most cases, you should be fine leaving this set to sync hourly.
### Periodically refingerprint tables
This enables Metabase to scan for additional field values during syncs allowing smarter behavior, like improved auto-binning on your bar charts.
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.