blob: e86e7a030eb09aaa5ee38eeac59eecf2d28ecb0c [file] [log] [blame]
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-frequently-asked-questions">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.3.1">
<title data-rh="true">Frequently Asked Questions | Superset</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://superset.apache.org/docs/frequently-asked-questions"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Frequently Asked Questions | Superset"><meta data-rh="true" name="description" content="Frequently Asked Questions"><meta data-rh="true" property="og:description" content="Frequently Asked Questions"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://superset.apache.org/docs/frequently-asked-questions"><link data-rh="true" rel="alternate" href="https://superset.apache.org/docs/frequently-asked-questions" hreflang="en"><link data-rh="true" rel="alternate" href="https://superset.apache.org/docs/frequently-asked-questions" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://WR5FASX5ED-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","G-133LHD3B3N","auto"),ga("set","anonymizeIp",!0),ga("send","pageview")</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-133LHD3B3N"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-133LHD3B3N",{anonymize_ip:!0})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Superset" href="/opensearch.xml">
<script src="/script/matomo.js"></script>
<script src="https://www.bugherd.com/sidebarv2.js?apikey=enilpiu7bgexxsnoqfjtxa" async></script><link rel="stylesheet" href="/assets/css/styles.574a8f44.css">
<link rel="preload" href="/assets/js/runtime~main.508e0599.js" as="script">
<link rel="preload" href="/assets/js/main.633857fa.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/superset-logo-horiz.svg" alt="Superset Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/superset-logo-horiz-dark.svg" alt="Superset Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div></a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Documentation</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/intro">Getting Started</a></li><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/frequently-asked-questions">FAQ</a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Community</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/community">Resources</a></li><li><a href="https://github.com/apache/superset" target="_blank" rel="noopener noreferrer" class="dropdown__link">GitHub<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="http://bit.ly/join-superset-slack" target="_blank" rel="noopener noreferrer" class="dropdown__link">Slack<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://lists.apache.org/list.html?dev@superset.apache.org" target="_blank" rel="noopener noreferrer" class="dropdown__link">Mailing List<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://stackoverflow.com/questions/tagged/superset+apache-superset" target="_blank" rel="noopener noreferrer" class="dropdown__link">Stack Overflow<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="navbar__items navbar__items--right"><a href="https://github.com/apache/superset" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link" class="github-logo-container"></a><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/intro">Introduction</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/installation/installing-superset-using-docker-compose">Installation and Configuration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/databases/installing-database-drivers">Connecting to Databases</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/creating-charts-dashboards/creating-your-first-dashboard">Creating Charts and Dashboards</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/miscellaneous/country-map-tools">Miscellaneous</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/contributing/contributing-page">Contributing</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/frequently-asked-questions">Frequently Asked Questions</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/api">API</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/security">Security</a></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Frequently Asked Questions</span><meta itemprop="position" content="1"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><h2 class="anchor anchorWithStickyNavbar_LWe7" id="frequently-asked-questions">Frequently Asked Questions<a href="#frequently-asked-questions" class="hash-link" aria-label="Direct link to Frequently Asked Questions" title="Direct link to Frequently Asked Questions"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="can-i-join--query-multiple-tables-at-one-time">Can I join / query multiple tables at one time?<a href="#can-i-join--query-multiple-tables-at-one-time" class="hash-link" aria-label="Direct link to Can I join / query multiple tables at one time?" title="Direct link to Can I join / query multiple tables at one time?"></a></h3><p>Not in the Explore or Visualization UI. A Superset SQLAlchemy datasource can only be a single table
or a view.</p><p>When working with tables, the solution would be to materialize a table that contains all the fields
needed for your analysis, most likely through some scheduled batch process.</p><p>A view is a simple logical layer that abstract an arbitrary SQL queries as a virtual table. This can
allow you to join and union multiple tables, and to apply some transformation using arbitrary SQL
expressions. The limitation there is your database performance as Superset effectively will run a
query on top of your query (view). A good practice may be to limit yourself to joining your main
large table to one or many small tables only, and avoid using <em>GROUP BY</em> where possible as Superset
will do its own <em>GROUP BY</em> and doing the work twice might slow down performance.</p><p>Whether you use a table or a view, the important factor is whether your database is fast enough to
serve it in an interactive fashion to provide a good user experience in Superset.</p><p>However, if you are using SQL Lab, there is no such limitation. You can write SQL queries to join
multiple tables as long as your database account has access to the tables.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="how-big-can-my-datasource-be">How BIG can my datasource be?<a href="#how-big-can-my-datasource-be" class="hash-link" aria-label="Direct link to How BIG can my datasource be?" title="Direct link to How BIG can my datasource be?"></a></h3><p>It can be gigantic! Superset acts as a thin layer above your underlying databases or data engines.</p><p>As mentioned above, the main criteria is whether your database can execute queries and return
results in a time frame that is acceptable to your users. Many distributed databases out there can
execute queries that scan through terabytes in an interactive fashion.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="how-do-i-create-my-own-visualization">How do I create my own visualization?<a href="#how-do-i-create-my-own-visualization" class="hash-link" aria-label="Direct link to How do I create my own visualization?" title="Direct link to How do I create my own visualization?"></a></h3><p>We recommend reading the instructions in
<a href="/docs/contributing/creating-viz-plugins">Creating Visualization Plugins</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="can-i-upload-and-visualize-csv-data">Can I upload and visualize CSV data?<a href="#can-i-upload-and-visualize-csv-data" class="hash-link" aria-label="Direct link to Can I upload and visualize CSV data?" title="Direct link to Can I upload and visualize CSV data?"></a></h3><p>Absolutely! Read the instructions <a href="/docs/creating-charts-dashboards/exploring-data">here</a> to learn
how to enable and use CSV upload.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="why-are-my-queries-timing-out">Why are my queries timing out?<a href="#why-are-my-queries-timing-out" class="hash-link" aria-label="Direct link to Why are my queries timing out?" title="Direct link to Why are my queries timing out?"></a></h3><p>There are many reasons may cause long query timing out.</p><p>For running long query from Sql Lab, by default Superset allows it run as long as 6 hours before it
being killed by celery. If you want to increase the time for running query, you can specify the
timeout in configuration. For example:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>If you are seeing timeouts (504 Gateway Time-out) when loading dashboard or explore slice, you are
probably behind gateway or proxy server (such as Nginx). If it did not receive a timely response
from Superset server (which is processing long queries), these web servers will send 504 status code
to clients directly. Superset has a client-side timeout limit to address this issue. If query didn’t
come back within client-side timeout (60 seconds by default), Superset will display warning message
to avoid gateway timeout message. If you have a longer gateway timeout limit, you can change the
timeout settings in <strong>superset_config.py</strong>:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">SUPERSET_WEBSERVER_TIMEOUT = 60</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="why-is-the-map-not-visible-in-the-geospatial-visualization">Why is the map not visible in the geospatial visualization?<a href="#why-is-the-map-not-visible-in-the-geospatial-visualization" class="hash-link" aria-label="Direct link to Why is the map not visible in the geospatial visualization?" title="Direct link to Why is the map not visible in the geospatial visualization?"></a></h3><p>You need to register a free account at <a href="https://www.mapbox.com" target="_blank" rel="noopener noreferrer">Mapbox.com</a>, obtain an API key, and add it
to <strong>.env</strong> and <strong>.env-non-dev</strong> at the key MAPBOX_API_KEY:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">MAPBOX_API_KEY = &quot;longstringofalphanumer1c&quot;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="how-to-add-dynamic-filters-to-a-dashboard">How to add dynamic filters to a dashboard?<a href="#how-to-add-dynamic-filters-to-a-dashboard" class="hash-link" aria-label="Direct link to How to add dynamic filters to a dashboard?" title="Direct link to How to add dynamic filters to a dashboard?"></a></h3><p>Use the <strong>Filter Box</strong> widget, build a slice, and add it to your dashboard.</p><p>The <strong>Filter Box</strong> widget allows you to define a query to populate dropdowns that can be used for
filtering. To build the list of distinct values, we run a query, and sort the result by the metric
you provide, sorting descending.</p><p>The widget also has a checkbox <strong>Date Filter</strong>, which enables time filtering capabilities to your
dashboard. After checking the box and refreshing, you’ll see a from and a to dropdown show up.</p><p>By default, the filtering will be applied to all the slices that are built on top of a datasource
that shares the column name that the filter is based on. It’s also a requirement for that column to
be checked as “filterable” in the column tab of the table editor.</p><p>But what about if you don’t want certain widgets to get filtered on your dashboard? You can do that
by editing your dashboard, and in the form, edit the JSON Metadata field, more specifically the
<code>filter_immune_slices</code> key, that receives an array of sliceIds that should never be affected by any
dashboard level filtering.</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">{</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;filter_immune_slices&quot;: [324, 65, 92],</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;expanded_slices&quot;: {},</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;filter_immune_slice_fields&quot;: {</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;177&quot;: [&quot;country_name&quot;, &quot;__time_range&quot;],</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;32&quot;: [&quot;__time_range&quot;]</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> },</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;timed_refresh_immune_slices&quot;: [324]</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>In the json blob above, slices 324, 65 and 92 won’t be affected by any dashboard level filtering.</p><p>Now note the <code>filter_immune_slice_fields</code> key. This one allows you to be more specific and define
for a specific slice_id, which filter fields should be disregarded.</p><p>Note the use of the <code>__time_range</code> keyword, which is reserved for dealing with the time boundary
filtering mentioned above.</p><p>But what happens with filtering when dealing with slices coming from different tables or databases?
If the column name is shared, the filter will be applied, it’s as simple as that.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="how-to-limit-the-timed-refresh-on-a-dashboard">How to limit the timed refresh on a dashboard?<a href="#how-to-limit-the-timed-refresh-on-a-dashboard" class="hash-link" aria-label="Direct link to How to limit the timed refresh on a dashboard?" title="Direct link to How to limit the timed refresh on a dashboard?"></a></h3><p>By default, the dashboard timed refresh feature allows you to automatically re-query every slice on
a dashboard according to a set schedule. Sometimes, however, you won’t want all of the slices to be
refreshed - especially if some data is slow moving, or run heavy queries. To exclude specific slices
from the timed refresh process, add the <code>timed_refresh_immune_slices</code> key to the dashboard JSON
Metadata field:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">{</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;filter_immune_slices&quot;: [],</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;expanded_slices&quot;: {},</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;filter_immune_slice_fields&quot;: {},</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;timed_refresh_immune_slices&quot;: [324]</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>In the example above, if a timed refresh is set for the dashboard, then every slice except 324 will
be automatically re-queried on schedule.</p><p>Slice refresh will also be staggered over the specified period. You can turn off this staggering by
setting the <code>stagger_refresh</code> to false and modify the stagger period by setting <code>stagger_time</code> to a
value in milliseconds in the JSON Metadata field:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">{</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;stagger_refresh&quot;: false,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;stagger_time&quot;: 2500</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Here, the entire dashboard will refresh at once if periodic refresh is on. The stagger time of 2.5
seconds is ignored.</p><p><strong>Why does ‘flask fab’ or superset freezed/hung/not responding when started (my home directory is
NFS mounted)?</strong></p><p>By default, Superset creates and uses an SQLite database at <code>~/.superset/superset.db</code>. SQLite is
known to <a href="https://www.sqlite.org/lockingv3.html" target="_blank" rel="noopener noreferrer">not work well if used on NFS</a> due to broken file
locking implementation on NFS.</p><p>You can override this path using the <strong>SUPERSET_HOME</strong> environment variable.</p><p>Another workaround is to change where superset stores the sqlite database by adding the following in
<code>superset_config.py</code>:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">SQLALCHEMY_DATABASE_URI = &#x27;sqlite:////new/location/superset.db&#x27;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>You can read more about customizing Superset using the configuration file
<a href="/docs/installation/configuring-superset">here</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="what-if-the-table-schema-changed">What if the table schema changed?<a href="#what-if-the-table-schema-changed" class="hash-link" aria-label="Direct link to What if the table schema changed?" title="Direct link to What if the table schema changed?"></a></h3><p>Table schemas evolve, and Superset needs to reflect that. It’s pretty common in the life cycle of a
dashboard to want to add a new dimension or metric. To get Superset to discover your new columns,
all you have to do is to go to <strong>Data -&gt; Datasets</strong>, click the edit icon next to the dataset
whose schema has changed, and hit <strong>Sync columns from source</strong> from the <strong>Columns</strong> tab.
Behind the scene, the new columns will get merged it. Following this, you may want to re-edit the
table afterwards to configure the Columns tab, check the appropriate boxes and save again.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="what-database-engine-can-i-use-as-a-backend-for-superset">What database engine can I use as a backend for Superset?<a href="#what-database-engine-can-i-use-as-a-backend-for-superset" class="hash-link" aria-label="Direct link to What database engine can I use as a backend for Superset?" title="Direct link to What database engine can I use as a backend for Superset?"></a></h3><p>To clarify, the database backend is an OLTP database used by Superset to store its internal
information like your list of users, slices and dashboard definitions.</p><p>Superset is tested using Mysql, Postgresql and Sqlite for its backend. It’s recommended you install
Superset on one of these database server for production.</p><p>Using a column-store, non-OLTP databases like Vertica, Redshift or Presto as a database backend
simply won’t work as these databases are not designed for this type of workload. Installation on
Oracle, Microsoft SQL Server, or other OLTP databases may work but isn’t tested.</p><p>Please note that pretty much any databases that have a SqlAlchemy integration should work perfectly
fine as a datasource for Superset, just not as the OLTP backend.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="how-can-i-configure-oauth-authentication-and-authorization">How can I configure OAuth authentication and authorization?<a href="#how-can-i-configure-oauth-authentication-and-authorization" class="hash-link" aria-label="Direct link to How can I configure OAuth authentication and authorization?" title="Direct link to How can I configure OAuth authentication and authorization?"></a></h3><p>You can take a look at this Flask-AppBuilder
<a href="https://github.com/dpgaspar/Flask-AppBuilder/blob/master/examples/oauth/config.py" target="_blank" rel="noopener noreferrer">configuration example</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="how-can-i-set-a-default-filter-on-my-dashboard">How can I set a default filter on my dashboard?<a href="#how-can-i-set-a-default-filter-on-my-dashboard" class="hash-link" aria-label="Direct link to How can I set a default filter on my dashboard?" title="Direct link to How can I set a default filter on my dashboard?"></a></h3><p>Simply apply the filter and save the dashboard while the filter is active.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="is-there-a-way-to-force-the-use-specific-colors">Is there a way to force the use specific colors?<a href="#is-there-a-way-to-force-the-use-specific-colors" class="hash-link" aria-label="Direct link to Is there a way to force the use specific colors?" title="Direct link to Is there a way to force the use specific colors?"></a></h3><p>It is possible on a per-dashboard basis by providing a mapping of labels to colors in the JSON
Metadata attribute using the <code>label_colors</code> key.</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">{</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;label_colors&quot;: {</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;Girls&quot;: &quot;#FF69B4&quot;,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> &quot;Boys&quot;: &quot;#ADD8E6&quot;</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> }</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="does-superset-work-with-insert-database-engine-here">Does Superset work with <!-- -->[insert database engine here]<!-- -->?<a href="#does-superset-work-with-insert-database-engine-here" class="hash-link" aria-label="Direct link to does-superset-work-with-insert-database-engine-here" title="Direct link to does-superset-work-with-insert-database-engine-here"></a></h3><p>The <a href="/docs/databases/installing-database-drivers">Connecting to Databases section</a> provides the best
overview for supported databases. Database engines not listed on that page may work too. We rely on
the community to contribute to this knowledge base.</p><p>For a database engine to be supported in Superset through the SQLAlchemy connector, it requires
having a Python compliant <a href="https://docs.sqlalchemy.org/en/13/dialects/" target="_blank" rel="noopener noreferrer">SQLAlchemy dialect</a> as well
as a <a href="https://www.python.org/dev/peps/pep-0249/" target="_blank" rel="noopener noreferrer">DBAPI driver</a> defined. Database that have limited
SQL support may work as well. For instance it’s possible to connect to Druid through the SQLAlchemy
connector even though Druid does not support joins and subqueries. Another key element for a
database to be supported is through the Superset Database Engine Specification interface. This
interface allows for defining database-specific configurations and logic that go beyond the
SQLAlchemy and DBAPI scope. This includes features like:</p><ul><li>date-related SQL function that allow Superset to fetch different time granularities when running
time-series queries</li><li>whether the engine supports subqueries. If false, Superset may run 2-phase queries to compensate
for the limitation</li><li>methods around processing logs and inferring the percentage of completion of a query</li><li>technicalities as to how to handle cursors and connections if the driver is not standard DBAPI</li></ul><p>Beyond the SQLAlchemy connector, it’s also possible, though much more involved, to extend Superset
and write your own connector. The only example of this at the moment is the Druid connector, which
is getting superseded by Druid’s growing SQL support and the recent availability of a DBAPI and
SQLAlchemy driver. If the database you are considering integrating has any kind of of SQL support,
it’s probably preferable to go the SQLAlchemy route. Note that for a native connector to be possible
the database needs to have support for running OLAP-type queries and should be able to things that
are typical in basic SQL:</p><ul><li>aggregate data</li><li>apply filters</li><li>apply HAVING-type filters</li><li>be schema-aware, expose columns and types</li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="does-superset-offer-a-public-api">Does Superset offer a public API?<a href="#does-superset-offer-a-public-api" class="hash-link" aria-label="Direct link to Does Superset offer a public API?" title="Direct link to Does Superset offer a public API?"></a></h3><p>Yes, a public REST API, and the surface of that API formal is expanding steadily. You can read more about this API and
interact with it using Swagger <a href="/docs/api">here</a>.</p><p>Some of the
original vision for the collection of endpoints under <strong>/api/v1</strong> was originally specified in
<a href="https://github.com/apache/superset/issues/7259" target="_blank" rel="noopener noreferrer">SIP-17</a> and constant progress has been
made to cover more and more use cases.</p><p>The API available is documented using <a href="https://swagger.io/" target="_blank" rel="noopener noreferrer">Swagger</a> and the documentation can be
made available under <strong>/swagger/v1</strong> by enabling the following flag in <code>superset_config.py</code>:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">FAB_API_SWAGGER_UI = True</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>There are other undocumented <!-- -->[private]<!-- --> ways to interact with Superset programmatically that offer no
guarantees and are not recommended but may fit your use case temporarily:</p><ul><li>using the ORM (SQLAlchemy) directly</li><li>using the internal FAB ModelView API (to be deprecated in Superset)</li><li>altering the source code in your fork</li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="what-does-hours-offset-in-the-edit-dataset-view-do">What Does Hours Offset in the Edit Dataset view do?<a href="#what-does-hours-offset-in-the-edit-dataset-view-do" class="hash-link" aria-label="Direct link to What Does Hours Offset in the Edit Dataset view do?" title="Direct link to What Does Hours Offset in the Edit Dataset view do?"></a></h3><p>In the Edit Dataset view, you can specify a time offset. This field lets you configure the
number of hours to be added or subtracted from the time column.
This can be used, for example, to convert UTC time to local time.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/superset/tree/master/docs/docs/frequently-asked-questions.mdx" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/contributing/creating-viz-plugins"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Creating Visualization Plugins</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/api"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">API</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#frequently-asked-questions" class="table-of-contents__link toc-highlight">Frequently Asked Questions</a><ul><li><a href="#can-i-join--query-multiple-tables-at-one-time" class="table-of-contents__link toc-highlight">Can I join / query multiple tables at one time?</a></li><li><a href="#how-big-can-my-datasource-be" class="table-of-contents__link toc-highlight">How BIG can my datasource be?</a></li><li><a href="#how-do-i-create-my-own-visualization" class="table-of-contents__link toc-highlight">How do I create my own visualization?</a></li><li><a href="#can-i-upload-and-visualize-csv-data" class="table-of-contents__link toc-highlight">Can I upload and visualize CSV data?</a></li><li><a href="#why-are-my-queries-timing-out" class="table-of-contents__link toc-highlight">Why are my queries timing out?</a></li><li><a href="#why-is-the-map-not-visible-in-the-geospatial-visualization" class="table-of-contents__link toc-highlight">Why is the map not visible in the geospatial visualization?</a></li><li><a href="#how-to-add-dynamic-filters-to-a-dashboard" class="table-of-contents__link toc-highlight">How to add dynamic filters to a dashboard?</a></li><li><a href="#how-to-limit-the-timed-refresh-on-a-dashboard" class="table-of-contents__link toc-highlight">How to limit the timed refresh on a dashboard?</a></li><li><a href="#what-if-the-table-schema-changed" class="table-of-contents__link toc-highlight">What if the table schema changed?</a></li><li><a href="#what-database-engine-can-i-use-as-a-backend-for-superset" class="table-of-contents__link toc-highlight">What database engine can I use as a backend for Superset?</a></li><li><a href="#how-can-i-configure-oauth-authentication-and-authorization" class="table-of-contents__link toc-highlight">How can I configure OAuth authentication and authorization?</a></li><li><a href="#how-can-i-set-a-default-filter-on-my-dashboard" class="table-of-contents__link toc-highlight">How can I set a default filter on my dashboard?</a></li><li><a href="#is-there-a-way-to-force-the-use-specific-colors" class="table-of-contents__link toc-highlight">Is there a way to force the use specific colors?</a></li><li><a href="#does-superset-work-with-insert-database-engine-here" class="table-of-contents__link toc-highlight">Does Superset work with insert database engine here?</a></li><li><a href="#does-superset-offer-a-public-api" class="table-of-contents__link toc-highlight">Does Superset offer a public API?</a></li><li><a href="#what-does-hours-offset-in-the-edit-dataset-view-do" class="table-of-contents__link toc-highlight">What Does Hours Offset in the Edit Dataset view do?</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2023,
The <a href="https://www.apache.org/" target="_blank" rel="noreferrer">Apache Software Foundation</a>,
Licensed under the Apache <a href="https://apache.org/licenses/LICENSE-2.0" target="_blank" rel="noreferrer">License</a>. <br>
<small>Apache Superset, Apache, Superset, the Superset logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation. All other products or name brands are trademarks of their respective holders, including The Apache Software Foundation.
<a href="https://www.apache.org/" target="_blank">Apache Software Foundation</a> resources</small><br>
<small>
<a href="https://www.apache.org/security/" target="_blank" rel="noreferrer">Security</a>&nbsp;|&nbsp;
<a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noreferrer">Donate</a>&nbsp;|&nbsp;
<a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noreferrer">Thanks</a>&nbsp;|&nbsp;
<a href="https://apache.org/events/current-event" target="_blank" rel="noreferrer">Events</a>&nbsp;|&nbsp;
<a href="https://apache.org/licenses/" target="_blank" rel="noreferrer">License</a>
</small></div></div></div></footer></div>
<script src="/assets/js/runtime~main.508e0599.js"></script>
<script src="/assets/js/main.633857fa.js"></script>
</body>
</html>