diff --git a/_docs/master/dashboards/filters.md b/_docs/master/dashboards/filters.md index 6407c4c95d..230db2f4e2 100644 --- a/_docs/master/dashboards/filters.md +++ b/_docs/master/dashboards/filters.md @@ -16,20 +16,24 @@ redirect_from: ![Dashboard Filters](./images/filters.png) -Have you ever found yourself in a situation where it seems like you need to create nearly identical copies of the same dashboard, with just one different variable? Maybe you have an Earnings dashboard, but you want to see the data for each city your business is in, or maybe you have a KPI dashboard that you want to see broken out by month. +Instead of creating duplicate dashboards to show different cuts of the same data, you can add filter or parameter widgets to let people change variables for cards on a dashboard. -Instead of creating duplicate dashboards, you can add filter or parameter widgets to let people change variables for cards on a dashboard. - -## Adding a filter or parameter +## Adding a filter or parameter widget to a dashboard, heading, or card ![Add a Filter](./images/add-filter.png) -- Click the **pencil icon** to enter dashboard editing mode. -- Click the **filter icon** that appears in the top-right to add a filter. -- Select a [filter type](#filter-and-parameter-types) -- [Connect your filter or parameter widget to dashboard cards](#connecting-a-filter-or-parameter-widget-to-dashboard-cards) to one or more dashboard cards on any or all tabs. -- [Configure your filter](#editing-a-filter) -- **Save** your changes. +1. Click the **pencil icon** to enter dashboard editing mode. +2. You can add a filter or parameter widget to: + + - **The whole dashboard**. Metabase will only display dashboard-level widgets if they're connected to a card on the current tab. + - **Heading cards**. Not text cards, only [heading cards](./introduction#adding-headings-or-descriptions-with-text-cards). Can only be connected to cards on the current tab. + - **Question cards**. Can only be connected to cards on the current tab. + + Go to where you want to add a filter and click the **filter icon**. +3. Select a [filter type](#filter-and-parameter-types). +4. [Connect your filter or parameter widget to dashboard cards](#connecting-a-filter-or-parameter-widget-to-dashboard-cards) to one or more dashboard cards. Only dashboard-level widgets can be connected to cards on multiple tabs. +5. [Configure your filter](#editing-a-filter) +6. **Save** your changes. Metabase will display the filter only if the filter is connected to a card on the current dashboard tab. @@ -39,7 +43,7 @@ The type of filter or parameter widget you choose determines how the widget work ### Filter widgets -**Filters** determine what data to show. For example, a date filter might show only data from the last 30 days, or a category filter might show only specific product categories. +**Filters** determine _what_ data to show. For example, a date filter might show only data from the last 30 days, or a category filter might show only specific product categories. - [Date picker](#date-picker-filters) - [Location](#location-filters) @@ -50,13 +54,13 @@ The type of filter or parameter widget you choose determines how the widget work ### Parameter widgets - **Parameters** determine how to show the data. The time grouping parameter, for example, changes the granularity of time-based visualizations (like showing data by month instead of by day) without removing any data points. + **Parameters** determine _how_ to show the data. The time grouping parameter, for example, changes the granularity of time-based visualizations (like showing data by month instead of by day) without removing any data points. - [Time grouping](#time-grouping-parameter) ## Date picker filters -When picking a Time filter, Metabase will prompt you to pick a specific type of date picker widget: +When picking a Date picker filter, Metabase will prompt you to pick an operator: - Month and Year - Quarter and Year @@ -65,19 +69,17 @@ When picking a Time filter, Metabase will prompt you to pick a specific type of - Relative Date - All Options -Single Date and Date Range will provide a calendar widget, while the other options all provide slightly different dropdown interfaces for picking values. To get a widget that's just like the time filter in the query builder, choose All options. +Single Date and Date Range will provide a calendar widget, while the other options all provide slightly different dropdown interfaces for picking values. To get a widget that's just like the date picker in the query builder, choose All options. ## Time grouping parameter ![Time grouping](./images/time-grouping.png) -You can add a time grouping widget to a dashboard to change how charts are grouped by time. For example, you may want to look at the time series charts grouped by month by default, but give people the option to view the results by other groupings: by week, by quarter, and so on. - -> Time grouping parameter widget can only be connected to questions built with the [graphical query builder](../questions/query-builder/editor). +You can add a time grouping widget to a dashboard to change how charts are grouped by time. This widget won't filter the data; it'll change how Metabase displays the data. For example, you may want to look at the time series charts grouped by month by default, but give people the option to view the same results by other groupings: by week, by quarter, and so on. This widget doesn't filter data in the charts; the widget just changes the time granularity for any cards that have a datetime field connected to the widget. -You can group by: +Grouping options include: - Minute (or minute of hour) - Hour (or hour of day) @@ -87,6 +89,8 @@ You can group by: - Quarter (or quarter of year) - Year +To connect a time grouping widget to a SQL question, you'll need to insert time grouping parameters in your code. See [time grouping parameters](../questions/native-editor/time-grouping-parameters). + ## Location filters There are four types of Location filters to choose from: @@ -96,10 +100,21 @@ There are four types of Location filters to choose from: - ZIP or Postal Code - Country +Additionally, you can select an operator for the location filter: + +- **Is**. Select one or more values from a list or search box. Use **Is** when you just want to plug a value into a variable. For multiple values, the card must be either a question built using the query builder, or a native/SQL question using a [field filter](../questions/native-editor/sql-parameters#field-filter-variables). +- **Is not**. Exclude one or more specific values. +- **Contains**. Match values that contain the entered text. +- **Does not contain**. Filter out values that contain the entered text. +- **Starts with**. Match values that begin with the entered text. +- **Ends with**. Match values that end with the entered text. + ## ID filter The ID filter provides a simple input box where you can type the ID of a user, order, etc. +You can give people the option to pick one value or multiple values. + ## Number filter You can choose from: @@ -114,21 +129,25 @@ You can choose from: A flexible filter type that will let you create either a dropdown menu or an input box to filter on any category field in your cards. Options include: -- **Is**. Select one or more values from a list or search box. Use **Is** when you just want to plug a value into a variable. For multiple values, the card must be either a question built using the query builder, or a native/SQL question using a [field filter](../questions/native-editor/sql-parameters#the-field-filter-variable-type). +- **Is**. Select one or more values from a list or search box. Use **Is** when you just want to plug a value into a variable. For multiple values, the card must be either a question built using the query builder, or a native/SQL question using a [field filter](../questions/native-editor/sql-parameters#field-filter-variables). - **Is not**. Exclude one or more specific values. - **Contains**. Match values that contain the entered text. - **Does not contain**. Filter out values that contain the entered text. - **Starts with**. Match values that begin with the entered text. - **Ends with**. Match values that end with the entered text. +You can also select how people should filter on this column: + +- Dropdown list +- Search box +- Input box + ## Boolean filter A boolean filter allows people to filter data based on true/false values. ## Connecting a filter or parameter widget to dashboard cards -Dashboard widgets apply across all [dashboard tabs](./introduction#dashboard-tabs), though they'll only be displayed when a tab has cards connected to the widget. - For each widget that you add, you'll need to tell Metabase which column the filter should update for each card. Click on a card's dropdown menu to select the field that you want the widget to filter on. @@ -137,6 +156,11 @@ Here we've wired up a Text filter to the "Event types" card, telling Metabase th ![Wiring up a dashboard filter to a card](./images/wiring-cards.png) +Which cards you can connect a filter or parameter widget to depends on: + +- Whether the question card has the relevant field. +- Where the widget is located: on the dashboard, heading card, or question card. Only dashboard widgets can be connected to cards across all [dashboard tabs](./introduction#dashboard-tabs). Widgets on heading and question cards are restricted to the cards on their respective tabs. + ## Auto-connecting filters to cards If there are other cards that also have the field you select, Metabase will offer to automatically connect the filter to those cards too (including to relevant cards on other tabs). If you later add a card with the selected field, Metabase will also try to connect that filter to the new card. @@ -145,9 +169,9 @@ To undo this auto-connecting of cards, click on the toast that pops up when Meta ## Filtering dashboards with native/SQL questions -If you're trying to connect a filter to a card with a native/SQL questions, you'll need to [add a variable or field filter to your query](../questions/native-editor/sql-parameters). For an in-depth article, check out [Adding filters to dashboards with SQL questions](/learn/metabase-basics/querying-and-dashboards/sql-in-metabase/filters). +For filters, you'll need to [add a variable or field filter to your query](../questions/native-editor/sql-parameters). -You can't connect a time grouping parameter widget to a card with a SQL question. +For parameters, check out [Time grouping parameters](../questions/native-editor/time-grouping-parameters). ## Wiring up dashboard filters to text cards diff --git a/_docs/master/dashboards/linked-filters.md b/_docs/master/dashboards/linked-filters.md index 50e9dd50e5..36737fdd16 100644 --- a/_docs/master/dashboards/linked-filters.md +++ b/_docs/master/dashboards/linked-filters.md @@ -63,7 +63,7 @@ Metabase uses database column metadata to populate values for linked filters, wh - You can't create linked filters on custom columns. -- Native/SQL questions must have a [field filter](../questions/native-editor/sql-parameters#the-field-filter-variable-type) variable in order to be linked. Basic SQL variables aren't connected to database columns, so they won't work for linked filters. +- Native/SQL questions must have a [field filter](../questions/native-editor/sql-parameters#field-filter-variables) variable in order to be linked. Basic SQL variables aren't connected to database columns, so they won't work for linked filters. - You can't link filters that use "Custom List" or "From another model or question" as their value's source. diff --git a/_docs/master/data-modeling/field-types.md b/_docs/master/data-modeling/field-types.md index 29a3103338..fbdd6a28c7 100644 --- a/_docs/master/data-modeling/field-types.md +++ b/_docs/master/data-modeling/field-types.md @@ -173,7 +173,7 @@ When you [X-ray](../exploration-and-organization/x-rays) a table, model, or enti ### Field Filters -Knowing what field types are and how they work is helpful when using [field filters](/learn/metabase-basics/querying-and-dashboards/sql-in-metabase/field-filters), as you can only create field filters for [certain field types](../questions/native-editor/sql-parameters#field-filter-compatible-types). +Knowing what field types are and how they work is helpful when using [field filters](/learn/metabase-basics/querying-and-dashboards/sql-in-metabase/field-filters), as you can only create field filters for [certain field types](../questions/native-editor/sql-parameters#field-filters-are-only-compatible-with-certain-types). ### JSON unfolding diff --git a/_docs/master/developers-guide/community-drivers.md b/_docs/master/developers-guide/community-drivers.md index 813138954b..2b13b29798 100644 --- a/_docs/master/developers-guide/community-drivers.md +++ b/_docs/master/developers-guide/community-drivers.md @@ -37,7 +37,7 @@ Anyone can build a community driver. These are the currently known third-party d | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | [CSV](https://github.com/Markenson/csv-metabase-driver) | ![GitHub stars](https://img.shields.io/github/stars/Markenson/csv-metabase-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Markenson/csv-metabase-driver) | | [Databend](https://github.com/databendcloud/metabase-databend-driver) | ![GitHub stars](https://img.shields.io/github/stars/databendcloud/metabase-databend-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/databendcloud/metabase-databend-driver) | -| [DB2](https://github.com/damienchambe/metabase-db2-driver) | ![GitHub stars](https://img.shields.io/github/stars/damienchambe/metabase-db2-driver) | ![Github (Pre-)Release Date](https://img.shields.io/github/release-date-pre/damienchambe/metabase-db2-driver) | +| [DB2](https://github.com/damienchambe/metabase-db2-driver) | ![GitHub stars](https://img.shields.io/github/stars/damienchambe/metabase-db2-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/damienchambe/metabase-db2-driver) | | [Dremio](https://github.com/Baoqi/metabase-dremio-driver) | ![GitHub stars](https://img.shields.io/github/stars/Baoqi/metabase-dremio-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Baoqi/metabase-dremio-driver) | | [DuckDB](https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver) | ![GitHub stars](https://img.shields.io/github/stars/MotherDuck-Open-Source/metabase_duckdb_driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/MotherDuck-Open-Source/metabase_duckdb_driver) | | [Firebolt](https://github.com/firebolt-db/metabase-firebolt-driver) | ![GitHub stars](https://img.shields.io/github/stars/firebolt-db/metabase-firebolt-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/firebolt-db/metabase-firebolt-driver) | diff --git a/_docs/master/developers-guide/devenv.md b/_docs/master/developers-guide/devenv.md index b5798dc53c..14d6002437 100644 --- a/_docs/master/developers-guide/devenv.md +++ b/_docs/master/developers-guide/devenv.md @@ -28,6 +28,8 @@ yarn dev This runs both the [frontend](#frontend) and [backend](#backend). Alternatively, you can run them separately in two terminal sessions below. +To use any other database beside the default ones please take a look at [Building Drivers](#building-drivers) further down in this document. + ### Frontend Metabase depends on third-party libraries to run, so you'll need to keep those up to date. The Clojure CLI will automatically fetch the dependencies when needed. With JavaScript dependencies, however, you'll need to kick off the installation process manually. diff --git a/_docs/master/developers-guide/frontend.md b/_docs/master/developers-guide/frontend.md index 1031ea7210..1e0630eef2 100644 --- a/_docs/master/developers-guide/frontend.md +++ b/_docs/master/developers-guide/frontend.md @@ -266,7 +266,7 @@ function getFoo(a, b, c) { } ``` -- Be conservative with what comments you add to the codebase. Comments shouldn't be used as reminders or as todos--record those by creating a new issue in Github. Ideally, code should be written in such a way that it explains itself clearly. When it does not, you should first try rewriting the code. If for whatever reason you are unable to write something clearly, add a comment to explain the "why". +- Be conservative with what comments you add to the codebase. Comments shouldn't be used as reminders or as todos--record those by creating a new issue in GitHub. Ideally, code should be written in such a way that it explains itself clearly. When it does not, you should first try rewriting the code. If for whatever reason you are unable to write something clearly, add a comment to explain the "why". ```javascript diff --git a/_docs/master/developers-guide/versioning.md b/_docs/master/developers-guide/versioning.md index 655d42cd76..82e02cc6d8 100644 --- a/_docs/master/developers-guide/versioning.md +++ b/_docs/master/developers-guide/versioning.md @@ -68,5 +68,5 @@ E.g., ## Further reading -- [Metabase releases on Github](https://github.com/metabase/metabase/releases) +- [Metabase releases on GitHub](https://github.com/metabase/metabase/releases) - [Metabase release blog posts](/releases) diff --git a/_docs/master/embedding/sdk/api/BaseInteractiveQuestionProps.html b/_docs/master/embedding/sdk/api/BaseInteractiveQuestionProps.html index 7effd3582a..70e4b609e9 100644 --- a/_docs/master/embedding/sdk/api/BaseInteractiveQuestionProps.html +++ b/_docs/master/embedding/sdk/api/BaseInteractiveQuestionProps.html @@ -9,7 +9,7 @@ layout: docs-api --- -BaseInteractiveQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}
Embedded analytics SDK API
    Preparing search index...

    Interface BaseInteractiveQuestionProps

    interface BaseInteractiveQuestionProps {
        children?: ReactNode;
        entityTypes?: EmbeddingEntityType[];
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        questionId: null | SdkQuestionId;
        targetCollection?: SdkCollectionId;
        withDownloads?: boolean;
    }
    Index

    Properties

    children? +BaseInteractiveQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

    Interface BaseInteractiveQuestionProps

    interface BaseInteractiveQuestionProps {
        children?: ReactNode;
        entityTypes?: EmbeddingEntityType[];
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        questionId: null | SdkQuestionId;
        targetCollection?: SdkCollectionId;
        withDownloads?: boolean;
    }
    Index

    Properties

    isSaveEnabled?: boolean

    Whether to show the save button.

    onBeforeSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => Promise<void>

    A callback function that triggers before saving. Only relevant when isSaveEnabled = true

    onRun?: (question: undefined | MetabaseQuestion) => void

    A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

    -
    onSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    +
    onSave?: (
        question: MetabaseQuestion,
        context: { dashboardTabId?: number; isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    questionId: null | SdkQuestionId

    The ID of the question.
    This is either: diff --git a/_docs/master/embedding/sdk/api/CreateQuestion.html b/_docs/master/embedding/sdk/api/CreateQuestion.html index 74327bd7e7..dd1d9a4f9b 100644 --- a/_docs/master/embedding/sdk/api/CreateQuestion.html +++ b/_docs/master/embedding/sdk/api/CreateQuestion.html @@ -14,7 +14,7 @@

  • OptionalisSaveEnabled?: boolean

    Whether to show the save button.

  • OptionalonBeforeSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => Promise<void>

    A callback function that triggers before saving. Only relevant when isSaveEnabled = true

  • OptionalonRun?: (question: undefined | MetabaseQuestion) => void

    A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

    -
  • OptionalonSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    +
  • OptionalonSave?: (
        question: MetabaseQuestion,
        context: { dashboardTabId?: number; isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

  • Optionalplugins?: MetabasePluginsConfig
  • OptionaltargetCollection?: SdkCollectionId

    The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

  • OptionalwithDownloads?: boolean

    Enables the ability to download results in the interactive question.

  • Returns Element

    Use <InteractiveQuestion questionId="new" /> instead.

    diff --git a/_docs/master/embedding/sdk/api/CreateQuestionProps.html b/_docs/master/embedding/sdk/api/CreateQuestionProps.html index 634c78328d..162264812e 100644 --- a/_docs/master/embedding/sdk/api/CreateQuestionProps.html +++ b/_docs/master/embedding/sdk/api/CreateQuestionProps.html @@ -9,7 +9,7 @@ layout: docs-api --- -CreateQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

    Interface CreateQuestionProps

    interface CreateQuestionProps {
        entityTypes?: EmbeddingEntityType[];
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        targetCollection?: SdkCollectionId;
        withDownloads?: boolean;
    }
    Index

    Properties

    entityTypes? +CreateQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

    Interface CreateQuestionProps

    interface CreateQuestionProps {
        entityTypes?: EmbeddingEntityType[];
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        targetCollection?: SdkCollectionId;
        withDownloads?: boolean;
    }
    Index

    Properties

    isSaveEnabled?: boolean

    Whether to show the save button.

    onBeforeSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => Promise<void>

    A callback function that triggers before saving. Only relevant when isSaveEnabled = true

    onRun?: (question: undefined | MetabaseQuestion) => void

    A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

    -
    onSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    +
    onSave?: (
        question: MetabaseQuestion,
        context: { dashboardTabId?: number; isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    targetCollection?: SdkCollectionId

    The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

    withDownloads?: boolean

    Enables the ability to download results in the interactive question.

    diff --git a/_docs/master/embedding/sdk/api/DrillThroughQuestionProps.html b/_docs/master/embedding/sdk/api/DrillThroughQuestionProps.html index 1fe84cf504..4ef29e1abf 100644 --- a/_docs/master/embedding/sdk/api/DrillThroughQuestionProps.html +++ b/_docs/master/embedding/sdk/api/DrillThroughQuestionProps.html @@ -10,7 +10,7 @@ --- DrillThroughQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

    Interface DrillThroughQuestionProps

    Props for the drill-through question

    -
    interface DrillThroughQuestionProps {
        children?: ReactNode;
        className?: string;
        entityTypes?: EmbeddingEntityType[];
        height?: Height<string | number>;
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        style?: CSSProperties;
        targetCollection?: SdkCollectionId;
        title?: SdkQuestionTitleProps;
        width?: Width<string | number>;
        withChartTypeSelector?: boolean;
        withDownloads?: boolean;
        withResetButton?: boolean;
    }
    Index

    Properties

    interface DrillThroughQuestionProps {
        children?: ReactNode;
        className?: string;
        entityTypes?: EmbeddingEntityType[];
        height?: Height<string | number>;
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        style?: CSSProperties;
        targetCollection?: SdkCollectionId;
        title?: SdkQuestionTitleProps;
        width?: Width<string | number>;
        withChartTypeSelector?: boolean;
        withDownloads?: boolean;
        withResetButton?: boolean;
    }
    Index

    Properties

    isSaveEnabled?: boolean

    Whether to show the save button.

    onBeforeSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => Promise<void>

    A callback function that triggers before saving. Only relevant when isSaveEnabled = true

    onRun?: (question: undefined | MetabaseQuestion) => void

    A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

    -
    onSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    +
    onSave?: (
        question: MetabaseQuestion,
        context: { dashboardTabId?: number; isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    A custom style object to be added to the root element.

    targetCollection?: SdkCollectionId

    The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

    Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.

    diff --git a/_docs/master/embedding/sdk/api/EditableDashboard.html b/_docs/master/embedding/sdk/api/EditableDashboard.html index 340dbcd435..43f5381000 100644 --- a/_docs/master/embedding/sdk/api/EditableDashboard.html +++ b/_docs/master/embedding/sdk/api/EditableDashboard.html @@ -9,13 +9,9 @@ layout: docs-api --- -EditableDashboard | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

    Function EditableDashboard

    • A dashboard component with the features available in the InteractiveDashboard component, as well as the ability to add and update questions, layout, and content within your dashboard.

      -

      Parameters

      • props: {
            drillThroughQuestionHeight?: Height<string | number>;
            drillThroughQuestionProps?: DrillThroughQuestionProps;
            plugins?: MetabasePluginsConfig;
            renderDrillThroughQuestion?: () => ReactNode;
        } & {
            dashboardId: SdkDashboardId;
            hiddenParameters?: string[];
            initialParameters?: ParameterValues;
            withCardTitle?: boolean;
            withDownloads?: boolean;
            withTitle?: boolean;
        } & { className?: string; style?: CSSProperties } & {
            onLoad?: (dashboard: null | MetabaseDashboard) => void;
            onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void;
        } & {}
        • OptionaldrillThroughQuestionHeight?: Height<string | number>

          Height of a question component when drilled from the dashboard to a question level.

          -
        • OptionaldrillThroughQuestionProps?: DrillThroughQuestionProps

          Props of a question component when drilled from the dashboard to a question level.

          -
        • Optionalplugins?: MetabasePluginsConfig

          Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details.

          -
        • OptionalrenderDrillThroughQuestion?: () => ReactNode

          A custom React component to render the question layout. -Use namespaced InteractiveQuestion components to build the layout.

          -
        • dashboardId: SdkDashboardId

          The ID of the dashboard. +EditableDashboard | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

          Function EditableDashboard

          • A dashboard component with the features available in the InteractiveDashboard component, as well as the ability to add and update questions, layout, and content within your dashboard.

            +

            Parameters

            • props: EditableDashboardProps
              • OptionalclassName?: string

                A custom class name to be added to the root element.

                +
              • dashboardId: SdkDashboardId

                The ID of the dashboard.
                This is either:

                @@ -24,25 +20,30 @@
              • the string ID found in the entity_id key of the dashboard object when using the API directly or using the SDK Collection Browser to return data
              -
          • OptionalhiddenParameters?: string[]

            A list of parameters to hide. +

          • OptionaldataPickerProps?: Pick<InteractiveQuestionProps, "entityTypes">

            Additional props to pass to the query builder rendered by InteractiveQuestion when creating a new dashboard question.

            +
          • OptionaldrillThroughQuestionHeight?: Height<string | number>

            Height of a question component when drilled from the dashboard to a question level.

            +
          • OptionaldrillThroughQuestionProps?: DrillThroughQuestionProps

            Props of a question component when drilled from the dashboard to a question level.

            +
          • OptionalhiddenParameters?: string[]

            A list of parameters to hide.

            -
          • OptionalinitialParameters?: ParameterValues

            Query parameters for the dashboard. For a single option, use a string value, and use a list of strings for multiple options. +

          • OptionalinitialParameters?: ParameterValues

            Query parameters for the dashboard. For a single option, use a string value, and use a list of strings for multiple options.

            -
          • OptionalwithCardTitle?: boolean

            Whether the dashboard cards should display a title.

            -
          • OptionalwithDownloads?: boolean

            Whether to hide the download button.

            -
          • OptionalwithTitle?: boolean

            Whether the dashboard should display a title.

            -
          • OptionalclassName?: string

            A custom class name to be added to the root element.

            -
          • Optionalstyle?: CSSProperties

            A custom style object to be added to the root element.

            -
          • OptionalonLoad?: (dashboard: null | MetabaseDashboard) => void

            Callback that is called when the dashboard is loaded.

            -
          • OptionalonLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void

            Callback that is called when the dashboard is loaded without cards.

            -

        Returns Element

      +
    • OptionalonLoad?: (dashboard: null | MetabaseDashboard) => void

      Callback that is called when the dashboard is loaded.

      +
    • OptionalonLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void

      Callback that is called when the dashboard is loaded without cards.

      +
    • Optionalplugins?: MetabasePluginsConfig

      Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details.

      +
    • OptionalrenderDrillThroughQuestion?: () => ReactNode

      A custom React component to render the question layout. +Use namespaced InteractiveQuestion components to build the layout.

      +
    • Optionalstyle?: CSSProperties

      A custom style object to be added to the root element.

      +
    • OptionalwithCardTitle?: boolean

      Whether the dashboard cards should display a title.

      +
    • OptionalwithDownloads?: boolean

      Whether to hide the download button.

      +
    • OptionalwithTitle?: boolean

      Whether the dashboard should display a title.

      +
    • Returns Element

      diff --git a/_docs/master/embedding/sdk/api/EditableDashboardProps.html b/_docs/master/embedding/sdk/api/EditableDashboardProps.html index 80386abbe9..624a16cef9 100644 --- a/_docs/master/embedding/sdk/api/EditableDashboardProps.html +++ b/_docs/master/embedding/sdk/api/EditableDashboardProps.html @@ -9,8 +9,9 @@ layout: docs-api --- -EditableDashboardProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

      Interface EditableDashboardProps

      interface EditableDashboardProps {
          className?: string;
          dashboardId: SdkDashboardId;
          drillThroughQuestionHeight?: Height<string | number>;
          drillThroughQuestionProps?: DrillThroughQuestionProps;
          hiddenParameters?: string[];
          initialParameters?: ParameterValues;
          onLoad?: (dashboard: null | MetabaseDashboard) => void;
          onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void;
          plugins?: MetabasePluginsConfig;
          renderDrillThroughQuestion?: () => ReactNode;
          style?: CSSProperties;
          withCardTitle?: boolean;
          withDownloads?: boolean;
          withTitle?: boolean;
      }
      Index

      Properties

      className? +EditableDashboardProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

      Interface EditableDashboardProps

      interface EditableDashboardProps {
          className?: string;
          dashboardId: SdkDashboardId;
          dataPickerProps?: Pick<InteractiveQuestionProps, "entityTypes">;
          drillThroughQuestionHeight?: Height<string | number>;
          drillThroughQuestionProps?: DrillThroughQuestionProps;
          hiddenParameters?: string[];
          initialParameters?: ParameterValues;
          onLoad?: (dashboard: null | MetabaseDashboard) => void;
          onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void;
          plugins?: MetabasePluginsConfig;
          renderDrillThroughQuestion?: () => ReactNode;
          style?: CSSProperties;
          withCardTitle?: boolean;
          withDownloads?: boolean;
          withTitle?: boolean;
      }
      Index

      Properties

      className? dashboardId +dataPickerProps? drillThroughQuestionHeight? drillThroughQuestionProps? hiddenParameters? @@ -33,6 +34,7 @@
    • the string ID found in the entity_id key of the dashboard object when using the API directly or using the SDK Collection Browser to return data
    • +
      dataPickerProps?: Pick<InteractiveQuestionProps, "entityTypes">

      Additional props to pass to the query builder rendered by InteractiveQuestion when creating a new dashboard question.

      drillThroughQuestionHeight?: Height<string | number>

      Height of a question component when drilled from the dashboard to a question level.

      drillThroughQuestionProps?: DrillThroughQuestionProps

      Props of a question component when drilled from the dashboard to a question level.

      Type declaration

      Props for the drill-through question

      @@ -44,7 +46,7 @@
    • OptionalisSaveEnabled?: boolean

      Whether to show the save button.

    • OptionalonBeforeSave?: (
          question: undefined | MetabaseQuestion,
          context: { isNewQuestion: boolean },
      ) => Promise<void>

      A callback function that triggers before saving. Only relevant when isSaveEnabled = true

    • OptionalonRun?: (question: undefined | MetabaseQuestion) => void

      A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

      -
    • OptionalonSave?: (
          question: undefined | MetabaseQuestion,
          context: { isNewQuestion: boolean },
      ) => void

      A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

      +
    • OptionalonSave?: (
          question: MetabaseQuestion,
          context: { dashboardTabId?: number; isNewQuestion: boolean },
      ) => void

      A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    • Optionalplugins?: MetabasePluginsConfig
    • Optionalstyle?: CSSProperties

      A custom style object to be added to the root element.

    • OptionaltargetCollection?: SdkCollectionId

      The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

    • Optionaltitle?: SdkQuestionTitleProps

      Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.

      @@ -75,4 +77,4 @@
    • withCardTitle?: boolean

      Whether the dashboard cards should display a title.

      withDownloads?: boolean

      Whether to hide the download button.

      withTitle?: boolean

      Whether the dashboard should display a title.

      -

      +
      diff --git a/_docs/master/embedding/sdk/api/InteractiveDashboard.html b/_docs/master/embedding/sdk/api/InteractiveDashboard.html index 92561bc263..41e5061096 100644 --- a/_docs/master/embedding/sdk/api/InteractiveDashboard.html +++ b/_docs/master/embedding/sdk/api/InteractiveDashboard.html @@ -9,8 +9,8 @@ layout: docs-api --- -InteractiveDashboard | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}
      Embedded analytics SDK API
        Preparing search index...

        Function InteractiveDashboard

        dataPickerProps?: Pick<InteractiveQuestionProps, "entityTypes">

        Additional props to pass to the query builder rendered by InteractiveQuestion when creating a new dashboard question.

        drillThroughQuestionHeight?: Height<string | number>

        Height of a question component when drilled from the dashboard to a question level.

        drillThroughQuestionProps?: DrillThroughQuestionProps

        Props of a question component when drilled from the dashboard to a question level.

        Type declaration

        Props for the drill-through question

        @@ -44,7 +46,7 @@
      • OptionalisSaveEnabled?: boolean

        Whether to show the save button.

      • OptionalonBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>

        A callback function that triggers before saving. Only relevant when isSaveEnabled = true

      • OptionalonRun?: (question: undefined | MetabaseQuestion) => void

        A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

        -
      • OptionalonSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

        +
      • OptionalonSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

      • Optionalplugins?: MetabasePluginsConfig
      • Optionalstyle?: CSSProperties

        A custom style object to be added to the root element.

      • OptionaltargetCollection?: SdkCollectionId

        The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

      • Optionaltitle?: SdkQuestionTitleProps

        Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.

        @@ -75,4 +77,4 @@
      • withCardTitle?: boolean

        Whether the dashboard cards should display a title.

        withDownloads?: boolean

        Whether to hide the download button.

        withTitle?: boolean

        Whether the dashboard should display a title.

        -
        +
        diff --git a/_docs/master/embedding/sdk/api/InteractiveQuestion.html b/_docs/master/embedding/sdk/api/InteractiveQuestion.html index fc4385cf45..dc7989bff8 100644 --- a/_docs/master/embedding/sdk/api/InteractiveQuestion.html +++ b/_docs/master/embedding/sdk/api/InteractiveQuestion.html @@ -18,7 +18,7 @@
      • OptionalisSaveEnabled?: boolean

        Whether to show the save button.

      • OptionalonBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>

        A callback function that triggers before saving. Only relevant when isSaveEnabled = true

      • OptionalonRun?: (question: undefined | MetabaseQuestion) => void

        A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

        -
      • OptionalonSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

        +
      • OptionalonSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

      • Optionalplugins?: MetabasePluginsConfig
      • questionId: null | SdkQuestionId

        The ID of the question.
        This is either: diff --git a/_docs/master/embedding/sdk/api/InteractiveQuestionProps.html b/_docs/master/embedding/sdk/api/InteractiveQuestionProps.html index f95a95d61b..ab3d118292 100644 --- a/_docs/master/embedding/sdk/api/InteractiveQuestionProps.html +++ b/_docs/master/embedding/sdk/api/InteractiveQuestionProps.html @@ -9,7 +9,7 @@ layout: docs-api --- -InteractiveQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

        Interface InteractiveQuestionProps

        interface InteractiveQuestionProps {
            children?: ReactNode;
            className?: string;
            entityTypes?: EmbeddingEntityType[];
            height?: Height<string | number>;
            initialSqlParameters?: SqlParameterValues;
            isSaveEnabled?: boolean;
            onBeforeSave?: (
                question: undefined | MetabaseQuestion,
                context: { isNewQuestion: boolean },
            ) => Promise<void>;
            onRun?: (question: undefined | MetabaseQuestion) => void;
            onSave?: (
                question: undefined | MetabaseQuestion,
                context: { isNewQuestion: boolean },
            ) => void;
            plugins?: MetabasePluginsConfig;
            questionId: null | SdkQuestionId;
            style?: CSSProperties;
            targetCollection?: SdkCollectionId;
            title?: SdkQuestionTitleProps;
            width?: Width<string | number>;
            withChartTypeSelector?: boolean;
            withDownloads?: boolean;
            withResetButton?: boolean;
        }
        Index

        Properties

        children? +InteractiveQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

        Interface InteractiveQuestionProps

        interface InteractiveQuestionProps {
            children?: ReactNode;
            className?: string;
            entityTypes?: EmbeddingEntityType[];
            height?: Height<string | number>;
            initialSqlParameters?: SqlParameterValues;
            isSaveEnabled?: boolean;
            onBeforeSave?: (
                question: undefined | MetabaseQuestion,
                context: { isNewQuestion: boolean },
            ) => Promise<void>;
            onRun?: (question: undefined | MetabaseQuestion) => void;
            onSave?: (
                question: MetabaseQuestion,
                context: { dashboardTabId?: number; isNewQuestion: boolean },
            ) => void;
            plugins?: MetabasePluginsConfig;
            questionId: null | SdkQuestionId;
            style?: CSSProperties;
            targetCollection?: SdkCollectionId;
            title?: SdkQuestionTitleProps;
            width?: Width<string | number>;
            withChartTypeSelector?: boolean;
            withDownloads?: boolean;
            withResetButton?: boolean;
        }
        Index

        Properties

        isSaveEnabled?: boolean

        Whether to show the save button.

        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>

        A callback function that triggers before saving. Only relevant when isSaveEnabled = true

        onRun?: (question: undefined | MetabaseQuestion) => void

        A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

        -
        onSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

        +
        onSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

        questionId: null | SdkQuestionId

        The ID of the question.
        This is either: diff --git a/_docs/master/embedding/sdk/api/StaticDashboard.html b/_docs/master/embedding/sdk/api/StaticDashboard.html index b2934e2415..137b9f13ef 100644 --- a/_docs/master/embedding/sdk/api/StaticDashboard.html +++ b/_docs/master/embedding/sdk/api/StaticDashboard.html @@ -9,8 +9,8 @@ layout: docs-api --- -StaticDashboard | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

        Function StaticDashboard

        dataPickerProps?: Pick<InteractiveQuestionProps, "entityTypes">

        Additional props to pass to the query builder rendered by InteractiveQuestion when creating a new dashboard question.

        drillThroughQuestionHeight?: Height<string | number>

        Height of a question component when drilled from the dashboard to a question level.

        drillThroughQuestionProps?: DrillThroughQuestionProps

        Props of a question component when drilled from the dashboard to a question level.

        Type declaration

        Props for the drill-through question

        @@ -44,7 +46,7 @@
      • OptionalisSaveEnabled?: boolean

        Whether to show the save button.

      • OptionalonBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>

        A callback function that triggers before saving. Only relevant when isSaveEnabled = true

      • OptionalonRun?: (question: undefined | MetabaseQuestion) => void

        A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

        -
      • OptionalonSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

        +
      • OptionalonSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void

        A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

      • Optionalplugins?: MetabasePluginsConfig
      • Optionalstyle?: CSSProperties

        A custom style object to be added to the root element.

      • OptionaltargetCollection?: SdkCollectionId

        The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

      • Optionaltitle?: SdkQuestionTitleProps

        Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.

        @@ -75,4 +77,4 @@
        withCardTitle?: boolean

        Whether the dashboard cards should display a title.

        withDownloads?: boolean

        Whether to hide the download button.

        withTitle?: boolean

        Whether the dashboard should display a title.

        -
        +
        diff --git a/_docs/master/embedding/sdk/api/StaticQuestion.html b/_docs/master/embedding/sdk/api/StaticQuestion.html index e535dad836..51f2d9ff73 100644 --- a/_docs/master/embedding/sdk/api/StaticQuestion.html +++ b/_docs/master/embedding/sdk/api/StaticQuestion.html @@ -26,4 +26,5 @@
      • Optionalstyle?: CSSProperties

        A custom style object to be added to the root element.

      • Optionalwidth?: Width<string | number>

        A number or string specifying a CSS size value that specifies the width of the component

        -
      • OptionalwithChartTypeSelector?: boolean
      • Returns ReactNode

        +
      • OptionalwithChartTypeSelector?: boolean
      • OptionalwithDownloads?: boolean

        Enables the ability to download results in the interactive question.

        +
      • Returns ReactNode

        diff --git a/_docs/master/embedding/sdk/api/StaticQuestionProps.html b/_docs/master/embedding/sdk/api/StaticQuestionProps.html index 0cf406ab49..0ddc7ab72b 100644 --- a/_docs/master/embedding/sdk/api/StaticQuestionProps.html +++ b/_docs/master/embedding/sdk/api/StaticQuestionProps.html @@ -9,13 +9,14 @@ layout: docs-api --- -StaticQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}
        Embedded analytics SDK API
          Preparing search index...

          Interface StaticQuestionProps

          interface StaticQuestionProps {
              className?: string;
              height?: Height<string | number>;
              initialSqlParameters?: SqlParameterValues;
              questionId: null | SdkQuestionId;
              style?: CSSProperties;
              width?: Width<string | number>;
              withChartTypeSelector?: boolean;
          }
          Index

          Properties

          className? +StaticQuestionProps | Embedded analytics SDK API{% include docs/embedded-analytics-sdk-metadata.html %}

          Interface StaticQuestionProps

          interface StaticQuestionProps {
              className?: string;
              height?: Height<string | number>;
              initialSqlParameters?: SqlParameterValues;
              questionId: null | SdkQuestionId;
              style?: CSSProperties;
              width?: Width<string | number>;
              withChartTypeSelector?: boolean;
              withDownloads?: boolean;
          }
          Index

          Properties

          className?: string

          A custom class name to be added to the root element.

          height?: Height<string | number>

          A number or string specifying a CSS size value that specifies the height of the component

          initialSqlParameters?: SqlParameterValues

          Initial values for the SQL parameters.

          @@ -32,4 +33,5 @@

          A custom style object to be added to the root element.

          width?: Width<string | number>

          A number or string specifying a CSS size value that specifies the width of the component

          -
          withChartTypeSelector?: boolean

          +
          withChartTypeSelector?: boolean
          withDownloads?: boolean

          Enables the ability to download results in the interactive question.

          +
          diff --git a/_docs/master/embedding/sdk/api/assets/search.js b/_docs/master/embedding/sdk/api/assets/search.js index 5649aeca11..a91212dd5e 100644 --- a/_docs/master/embedding/sdk/api/assets/search.js +++ b/_docs/master/embedding/sdk/api/assets/search.js @@ -1 +1 @@ -window.searchData = "eJy9fdGS47iR7b9Uv9b0FRIkRc2bPZ4Jj9e79rp9vQ8dExOsEquKbomUJap72hPz7xsARQlIHJAJSfc+dUcJyEyCB4lEngT468O++3J4+Pbjrw+fmnb98C3lxeNDW23rh28ffl8d6h/bvt5Xz33zuf7vY33om679677bHR4eH477zUyj92/9dvPw+PC8qQ6H+vDw7cPDb4+jJrWg7Kzq+a3ZrPd1Kxf7zuniyH982FX7uu3nzI/YUbd903/9+9ddnfCE74Ze/anX/axp2qZvqs2Hf23+Wu2rbd3X+xSzTt0P/9rs3O53tO/wofpcf99WT5t6nWLY4VB9rutzv/tZ1LW/r1+6fW3sSjCoa59st8PQ7Z72/O2YAuqu3R/vi+iuTR6Lu4/CbnN8bdoU6F563M+Kf50a/ZgC1bFTc1+c9tX+te6/6zab+tk0TrBo6Prsdr2fXV+a/u0P3Zd201XrlPdl+q2dfjdZRIvVUuV0WYeOfR8sO5e/Ta4yXNZ3b9XejHu3P4u6/GlSUnEZpct7+71ZPmtHFv8lzTje+8/NwVh23DqTZ6rRtDZnaQ+E+KOLf05Yzk2L/zL/F0h8Z1u3Q2sMnIi5Me3n1s5UnzTg/NvENE+z4fvtrv/6Xdf2ddt/1213XWukSIypTc/noeez0/MeVnXtd5vm+ZPIjq59PrW9h+Zd9Vp/aP4tA4RpfBga30P3of+6kSkeW95D6+fm0Dxt6tnp66g/dXk+d7mjHd+DyFZgiyS0nb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X1TDyA8fpDcvlIPZPFAIHE8GiQyzpqYT7IiHVrEsM1hVzWTwuP0Labz9hpklttpYU7OUcaZqjIPcinhSf52s1ns1vl9rnIUULklGsTuLIlyz2wcjpUbo5Fyjxu+1psmi++PHflEjq+dnv0AwT3IARJoefUMoEYzGU5tTBvaBiDag3Te+TutbSwBIjJCwHi7ry08DRGLxQtSuSGsVq4cvjigIneGRUh8rqvfhhL3k0Bp8DztCMezicrNfznvDc+H29eDUeC9LBHEUZ/Z5LaW3u8k+5DKbEw8xDQ3p5k78ix7H2CmN/dOAtrtLri8FJ2kUy/VwjfC8hOQ7sYTl0Jr+joykNXBWGw61OEcVZX/otRmu5Tn09DnVNiUrFB3tBNL5GwPMT6cy+R40BmMZT8D7tbJbxLpGuabVf5xfHuCTgSlsnxQyPKOzA+lCOTcJk47jfw+LGbChemwY5tyY71FvvK9wNetlPmocxyaCony3rz65fuULZ7s5XwxbobbmFRnl0z/AS4+y7mMqS8VW31tC3B1QDk3cyRIix2CMV9I7IX4u2MQFDvpjqFHvVLtelevanhmLUYCmiGrII6l2oLN7UmY2XSVcEMdA/8D8uBUud1IUH62OUgbhL5fHDgfHGG0BdbLRYQhhw1xfO+N3a30PnwKMI7DIzsoXaUlXU5Uk+OKRuSzqcnWZ6c/2rwYMN9ImpxHshzlbfMFxl7TP3ntqq9nLJ7rZGwmsqIimyJ3SzY8ux1ZfPciA3R5ESHqwG05wsyJGvNz48P+2pfmqKah28//fz77/8LAWmV6g=="; \ No newline at end of file diff --git a/_docs/master/embedding/sdk/api/snippets/BaseInteractiveQuestionProps.md b/_docs/master/embedding/sdk/api/snippets/BaseInteractiveQuestionProps.md index d03dbf391e..c3205ce9c4 100644 --- a/_docs/master/embedding/sdk/api/snippets/BaseInteractiveQuestionProps.md +++ b/_docs/master/embedding/sdk/api/snippets/BaseInteractiveQuestionProps.md @@ -23,7 +23,7 @@ layout: new-docs | `isSaveEnabled?` | `boolean` | Whether to show the save button. | | `onBeforeSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | A callback function that triggers before saving. Only relevant when `isSaveEnabled = true` | | `onRun?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion)) => `void` | A callback function that triggers when a question is updated, including when a user clicks the `Visualize` button in the question editor | -| `onSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | +| `onSave?` | (`question`: [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `dashboardTabId?`: `number`; `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | | `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | - | | `questionId` | `null` \| [`SdkQuestionId`](./api/SdkQuestionId) | The ID of the question.
          This is either:
          - The numerical ID when accessing a question link, e.g., `http://localhost:3000/question/1-my-question` where the ID is `1`
          - The `entity_id` key of the question object. You can find a question's Entity ID in the info panel when viewing a question
          - `new` to show the notebook editor for creating new questions. `isSaveEnabled` must be `true` to allow saving the question | | `targetCollection?` | [`SdkCollectionId`](./api/SdkCollectionId) | The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions. | diff --git a/_docs/master/embedding/sdk/api/snippets/CreateQuestionProps.md b/_docs/master/embedding/sdk/api/snippets/CreateQuestionProps.md index 8f7635b747..a5ea63f17b 100644 --- a/_docs/master/embedding/sdk/api/snippets/CreateQuestionProps.md +++ b/_docs/master/embedding/sdk/api/snippets/CreateQuestionProps.md @@ -22,7 +22,7 @@ layout: new-docs | `isSaveEnabled?` | `boolean` | Whether to show the save button. | | `onBeforeSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | A callback function that triggers before saving. Only relevant when `isSaveEnabled = true` | | `onRun?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion)) => `void` | A callback function that triggers when a question is updated, including when a user clicks the `Visualize` button in the question editor | -| `onSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | +| `onSave?` | (`question`: [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `dashboardTabId?`: `number`; `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | | `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | - | | `targetCollection?` | [`SdkCollectionId`](./api/SdkCollectionId) | The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions. | | `withDownloads?` | `boolean` | Enables the ability to download results in the interactive question. | diff --git a/_docs/master/embedding/sdk/api/snippets/DrillThroughQuestionProps.md b/_docs/master/embedding/sdk/api/snippets/DrillThroughQuestionProps.md index 477f88f90c..722e953a73 100644 --- a/_docs/master/embedding/sdk/api/snippets/DrillThroughQuestionProps.md +++ b/_docs/master/embedding/sdk/api/snippets/DrillThroughQuestionProps.md @@ -27,7 +27,7 @@ Props for the drill-through question | `isSaveEnabled?` | `boolean` | Whether to show the save button. | | `onBeforeSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | A callback function that triggers before saving. Only relevant when `isSaveEnabled = true` | | `onRun?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion)) => `void` | A callback function that triggers when a question is updated, including when a user clicks the `Visualize` button in the question editor | -| `onSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | +| `onSave?` | (`question`: [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `dashboardTabId?`: `number`; `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | | `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | - | | `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | | `targetCollection?` | [`SdkCollectionId`](./api/SdkCollectionId) | The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions. | diff --git a/_docs/master/embedding/sdk/api/snippets/EditableDashboard.md b/_docs/master/embedding/sdk/api/snippets/EditableDashboard.md index fc427dcb2a..ac04f5dd59 100644 --- a/_docs/master/embedding/sdk/api/snippets/EditableDashboard.md +++ b/_docs/master/embedding/sdk/api/snippets/EditableDashboard.md @@ -10,27 +10,7 @@ layout: new-docs --- ```ts -function EditableDashboard( - props: { - drillThroughQuestionHeight?: Height; - drillThroughQuestionProps?: DrillThroughQuestionProps; - plugins?: MetabasePluginsConfig; - renderDrillThroughQuestion?: () => ReactNode; - } & { - dashboardId: SdkDashboardId; - hiddenParameters?: string[]; - initialParameters?: ParameterValues; - withCardTitle?: boolean; - withDownloads?: boolean; - withTitle?: boolean; - } & { - className?: string; - style?: CSSProperties; - } & { - onLoad?: (dashboard: null | MetabaseDashboard) => void; - onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void; - } & {}, -): Element; +function EditableDashboard(props: EditableDashboardProps): Element; ``` A dashboard component with the features available in the `InteractiveDashboard` component, as well as the ability to add and update questions, layout, and content within your dashboard. @@ -39,9 +19,9 @@ A dashboard component with the features available in the `InteractiveDashboard` -| Parameter | Type | Description | -| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------- | -| `props` | \{ `drillThroughQuestionHeight?`: `Height`\<`string` \| `number`\>; `drillThroughQuestionProps?`: [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps); `plugins?`: [`MetabasePluginsConfig`](./api/MetabasePluginsConfig); `renderDrillThroughQuestion?`: () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478); \} & \{ `dashboardId`: [`SdkDashboardId`](./api/SdkDashboardId); `hiddenParameters?`: `string`[]; `initialParameters?`: [`ParameterValues`](./api/ParameterValues); `withCardTitle?`: `boolean`; `withDownloads?`: `boolean`; `withTitle?`: `boolean`; \} & \{ `className?`: `string`; `style?`: [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579); \} & \{ `onLoad?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; `onLoadWithoutCards?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; \} & \{ \} | | +| Parameter | Type | Description | +| :-------- | :---------------------------------------------------------- | :---------- | +| `props` | [`EditableDashboardProps`](./api/EditableDashboardProps) | | diff --git a/_docs/master/embedding/sdk/api/snippets/EditableDashboardProps.md b/_docs/master/embedding/sdk/api/snippets/EditableDashboardProps.md index 70fad729f1..69186d18d2 100644 --- a/_docs/master/embedding/sdk/api/snippets/EditableDashboardProps.md +++ b/_docs/master/embedding/sdk/api/snippets/EditableDashboardProps.md @@ -15,21 +15,22 @@ layout: new-docs -| Property | Type | Description | -| :-------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `className?` | `string` | A custom class name to be added to the root element. | -| `dashboardId` | [`SdkDashboardId`](./api/SdkDashboardId) | The ID of the dashboard.
          This is either:
          - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
          - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data | -| `drillThroughQuestionHeight?` | `Height`\<`string` \| `number`\> | Height of a question component when drilled from the dashboard to a question level. | -| `drillThroughQuestionProps?` | [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps) | Props of a question component when drilled from the dashboard to a question level. | -| `hiddenParameters?` | `string`[] | A list of [parameters to hide](/docs/master/embedding/public-links#appearance-parameters).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | -| `initialParameters?` | [`ParameterValues`](./api/ParameterValues) | Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | -| `onLoad?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded. | -| `onLoadWithoutCards?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded without cards. | -| `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. | -| `renderDrillThroughQuestion?` | () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478) | A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. | -| `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | -| `withCardTitle?` | `boolean` | Whether the dashboard cards should display a title. | -| `withDownloads?` | `boolean` | Whether to hide the download button. | -| `withTitle?` | `boolean` | Whether the dashboard should display a title. | +| Property | Type | Description | +| :-------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `className?` | `string` | A custom class name to be added to the root element. | +| `dashboardId` | [`SdkDashboardId`](./api/SdkDashboardId) | The ID of the dashboard.
          This is either:
          - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
          - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data | +| `dataPickerProps?` | [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`InteractiveQuestionProps`](./api/InteractiveQuestionProps), `"entityTypes"`\> | Additional props to pass to the query builder rendered by `InteractiveQuestion` when creating a new dashboard question. | +| `drillThroughQuestionHeight?` | `Height`\<`string` \| `number`\> | Height of a question component when drilled from the dashboard to a question level. | +| `drillThroughQuestionProps?` | [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps) | Props of a question component when drilled from the dashboard to a question level. | +| `hiddenParameters?` | `string`[] | A list of [parameters to hide](/docs/master/embedding/public-links#appearance-parameters).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | +| `initialParameters?` | [`ParameterValues`](./api/ParameterValues) | Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | +| `onLoad?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded. | +| `onLoadWithoutCards?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded without cards. | +| `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. | +| `renderDrillThroughQuestion?` | () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478) | A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. | +| `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | +| `withCardTitle?` | `boolean` | Whether the dashboard cards should display a title. | +| `withDownloads?` | `boolean` | Whether to hide the download button. | +| `withTitle?` | `boolean` | Whether the dashboard should display a title. | diff --git a/_docs/master/embedding/sdk/api/snippets/InteractiveDashboard.md b/_docs/master/embedding/sdk/api/snippets/InteractiveDashboard.md index 80ee8b4c82..3f026cc008 100644 --- a/_docs/master/embedding/sdk/api/snippets/InteractiveDashboard.md +++ b/_docs/master/embedding/sdk/api/snippets/InteractiveDashboard.md @@ -29,6 +29,8 @@ function InteractiveDashboard( } & { onLoad?: (dashboard: null | MetabaseDashboard) => void; onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void; + } & { + dataPickerProps?: Pick; } & {}, ): Element; ``` @@ -39,9 +41,9 @@ A dashboard component with drill downs, click behaviors, and the ability to view -| Parameter | Type | Description | -| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------- | -| `props` | \{ `drillThroughQuestionHeight?`: `Height`\<`string` \| `number`\>; `drillThroughQuestionProps?`: [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps); `plugins?`: [`MetabasePluginsConfig`](./api/MetabasePluginsConfig); `renderDrillThroughQuestion?`: () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478); \} & \{ `dashboardId`: [`SdkDashboardId`](./api/SdkDashboardId); `hiddenParameters?`: `string`[]; `initialParameters?`: [`ParameterValues`](./api/ParameterValues); `withCardTitle?`: `boolean`; `withDownloads?`: `boolean`; `withTitle?`: `boolean`; \} & \{ `className?`: `string`; `style?`: [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579); \} & \{ `onLoad?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; `onLoadWithoutCards?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; \} & \{ \} | | +| Parameter | Type | Description | +| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------- | +| `props` | \{ `drillThroughQuestionHeight?`: `Height`\<`string` \| `number`\>; `drillThroughQuestionProps?`: [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps); `plugins?`: [`MetabasePluginsConfig`](./api/MetabasePluginsConfig); `renderDrillThroughQuestion?`: () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478); \} & \{ `dashboardId`: [`SdkDashboardId`](./api/SdkDashboardId); `hiddenParameters?`: `string`[]; `initialParameters?`: [`ParameterValues`](./api/ParameterValues); `withCardTitle?`: `boolean`; `withDownloads?`: `boolean`; `withTitle?`: `boolean`; \} & \{ `className?`: `string`; `style?`: [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579); \} & \{ `onLoad?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; `onLoadWithoutCards?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; \} & \{ `dataPickerProps?`: [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`InteractiveQuestionProps`](./api/InteractiveQuestionProps), `"entityTypes"`\>; \} & \{ \} | | diff --git a/_docs/master/embedding/sdk/api/snippets/InteractiveDashboardProps.md b/_docs/master/embedding/sdk/api/snippets/InteractiveDashboardProps.md index 5b34cbca34..f479613fcb 100644 --- a/_docs/master/embedding/sdk/api/snippets/InteractiveDashboardProps.md +++ b/_docs/master/embedding/sdk/api/snippets/InteractiveDashboardProps.md @@ -15,21 +15,22 @@ layout: new-docs -| Property | Type | Description | -| :-------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `className?` | `string` | A custom class name to be added to the root element. | -| `dashboardId` | [`SdkDashboardId`](./api/SdkDashboardId) | The ID of the dashboard.
          This is either:
          - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
          - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data | -| `drillThroughQuestionHeight?` | `Height`\<`string` \| `number`\> | Height of a question component when drilled from the dashboard to a question level. | -| `drillThroughQuestionProps?` | [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps) | Props of a question component when drilled from the dashboard to a question level. | -| `hiddenParameters?` | `string`[] | A list of [parameters to hide](/docs/master/embedding/public-links#appearance-parameters).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | -| `initialParameters?` | [`ParameterValues`](./api/ParameterValues) | Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | -| `onLoad?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded. | -| `onLoadWithoutCards?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded without cards. | -| `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. | -| `renderDrillThroughQuestion?` | () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478) | A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. | -| `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | -| `withCardTitle?` | `boolean` | Whether the dashboard cards should display a title. | -| `withDownloads?` | `boolean` | Whether to hide the download button. | -| `withTitle?` | `boolean` | Whether the dashboard should display a title. | +| Property | Type | Description | +| :-------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `className?` | `string` | A custom class name to be added to the root element. | +| `dashboardId` | [`SdkDashboardId`](./api/SdkDashboardId) | The ID of the dashboard.
          This is either:
          - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
          - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data | +| `dataPickerProps?` | [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`InteractiveQuestionProps`](./api/InteractiveQuestionProps), `"entityTypes"`\> | Additional props to pass to the query builder rendered by `InteractiveQuestion` when creating a new dashboard question. | +| `drillThroughQuestionHeight?` | `Height`\<`string` \| `number`\> | Height of a question component when drilled from the dashboard to a question level. | +| `drillThroughQuestionProps?` | [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps) | Props of a question component when drilled from the dashboard to a question level. | +| `hiddenParameters?` | `string`[] | A list of [parameters to hide](/docs/master/embedding/public-links#appearance-parameters).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | +| `initialParameters?` | [`ParameterValues`](./api/ParameterValues) | Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | +| `onLoad?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded. | +| `onLoadWithoutCards?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded without cards. | +| `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. | +| `renderDrillThroughQuestion?` | () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478) | A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. | +| `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | +| `withCardTitle?` | `boolean` | Whether the dashboard cards should display a title. | +| `withDownloads?` | `boolean` | Whether to hide the download button. | +| `withTitle?` | `boolean` | Whether the dashboard should display a title. | diff --git a/_docs/master/embedding/sdk/api/snippets/InteractiveQuestionProps.md b/_docs/master/embedding/sdk/api/snippets/InteractiveQuestionProps.md index 3c2c95efc9..58e17b122f 100644 --- a/_docs/master/embedding/sdk/api/snippets/InteractiveQuestionProps.md +++ b/_docs/master/embedding/sdk/api/snippets/InteractiveQuestionProps.md @@ -25,7 +25,7 @@ layout: new-docs | `isSaveEnabled?` | `boolean` | Whether to show the save button. | | `onBeforeSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | A callback function that triggers before saving. Only relevant when `isSaveEnabled = true` | | `onRun?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion)) => `void` | A callback function that triggers when a question is updated, including when a user clicks the `Visualize` button in the question editor | -| `onSave?` | (`question`: `undefined` \| [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | +| `onSave?` | (`question`: [`MetabaseQuestion`](./api/MetabaseQuestion), `context`: \{ `dashboardTabId?`: `number`; `isNewQuestion`: `boolean`; \}) => `void` | A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true` | | `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | - | | `questionId` | `null` \| [`SdkQuestionId`](./api/SdkQuestionId) | The ID of the question.
          This is either:
          - The numerical ID when accessing a question link, e.g., `http://localhost:3000/question/1-my-question` where the ID is `1`
          - The `entity_id` key of the question object. You can find a question's Entity ID in the info panel when viewing a question
          - `new` to show the notebook editor for creating new questions. `isSaveEnabled` must be `true` to allow saving the question | | `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | diff --git a/_docs/master/embedding/sdk/api/snippets/StaticDashboard.md b/_docs/master/embedding/sdk/api/snippets/StaticDashboard.md index 69822c2f65..3136fb39f0 100644 --- a/_docs/master/embedding/sdk/api/snippets/StaticDashboard.md +++ b/_docs/master/embedding/sdk/api/snippets/StaticDashboard.md @@ -29,6 +29,8 @@ function StaticDashboard( } & { onLoad?: (dashboard: null | MetabaseDashboard) => void; onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void; + } & { + dataPickerProps?: Pick; } & {}, ): Element; ``` @@ -39,9 +41,9 @@ A lightweight dashboard component. -| Parameter | Type | Description | -| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------- | -| `props` | \{ `drillThroughQuestionHeight?`: `Height`\<`string` \| `number`\>; `drillThroughQuestionProps?`: [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps); `plugins?`: [`MetabasePluginsConfig`](./api/MetabasePluginsConfig); `renderDrillThroughQuestion?`: () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478); \} & \{ `dashboardId`: [`SdkDashboardId`](./api/SdkDashboardId); `hiddenParameters?`: `string`[]; `initialParameters?`: [`ParameterValues`](./api/ParameterValues); `withCardTitle?`: `boolean`; `withDownloads?`: `boolean`; `withTitle?`: `boolean`; \} & \{ `className?`: `string`; `style?`: [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579); \} & \{ `onLoad?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; `onLoadWithoutCards?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; \} & \{ \} | | +| Parameter | Type | Description | +| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------- | +| `props` | \{ `drillThroughQuestionHeight?`: `Height`\<`string` \| `number`\>; `drillThroughQuestionProps?`: [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps); `plugins?`: [`MetabasePluginsConfig`](./api/MetabasePluginsConfig); `renderDrillThroughQuestion?`: () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478); \} & \{ `dashboardId`: [`SdkDashboardId`](./api/SdkDashboardId); `hiddenParameters?`: `string`[]; `initialParameters?`: [`ParameterValues`](./api/ParameterValues); `withCardTitle?`: `boolean`; `withDownloads?`: `boolean`; `withTitle?`: `boolean`; \} & \{ `className?`: `string`; `style?`: [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579); \} & \{ `onLoad?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; `onLoadWithoutCards?`: (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void`; \} & \{ `dataPickerProps?`: [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`InteractiveQuestionProps`](./api/InteractiveQuestionProps), `"entityTypes"`\>; \} & \{ \} | | diff --git a/_docs/master/embedding/sdk/api/snippets/StaticDashboardProps.md b/_docs/master/embedding/sdk/api/snippets/StaticDashboardProps.md index 973d587f57..048fcb36ab 100644 --- a/_docs/master/embedding/sdk/api/snippets/StaticDashboardProps.md +++ b/_docs/master/embedding/sdk/api/snippets/StaticDashboardProps.md @@ -15,21 +15,22 @@ layout: new-docs -| Property | Type | Description | -| :-------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `className?` | `string` | A custom class name to be added to the root element. | -| `dashboardId` | [`SdkDashboardId`](./api/SdkDashboardId) | The ID of the dashboard.
          This is either:
          - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
          - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data | -| `drillThroughQuestionHeight?` | `Height`\<`string` \| `number`\> | Height of a question component when drilled from the dashboard to a question level. | -| `drillThroughQuestionProps?` | [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps) | Props of a question component when drilled from the dashboard to a question level. | -| `hiddenParameters?` | `string`[] | A list of [parameters to hide](/docs/master/embedding/public-links#appearance-parameters).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | -| `initialParameters?` | [`ParameterValues`](./api/ParameterValues) | Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | -| `onLoad?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded. | -| `onLoadWithoutCards?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded without cards. | -| `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. | -| `renderDrillThroughQuestion?` | () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478) | A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. | -| `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | -| `withCardTitle?` | `boolean` | Whether the dashboard cards should display a title. | -| `withDownloads?` | `boolean` | Whether to hide the download button. | -| `withTitle?` | `boolean` | Whether the dashboard should display a title. | +| Property | Type | Description | +| :-------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `className?` | `string` | A custom class name to be added to the root element. | +| `dashboardId` | [`SdkDashboardId`](./api/SdkDashboardId) | The ID of the dashboard.
          This is either:
          - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
          - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data | +| `dataPickerProps?` | [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`InteractiveQuestionProps`](./api/InteractiveQuestionProps), `"entityTypes"`\> | Additional props to pass to the query builder rendered by `InteractiveQuestion` when creating a new dashboard question. | +| `drillThroughQuestionHeight?` | `Height`\<`string` \| `number`\> | Height of a question component when drilled from the dashboard to a question level. | +| `drillThroughQuestionProps?` | [`DrillThroughQuestionProps`](./api/DrillThroughQuestionProps) | Props of a question component when drilled from the dashboard to a question level. | +| `hiddenParameters?` | `string`[] | A list of [parameters to hide](/docs/master/embedding/public-links#appearance-parameters).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | +| `initialParameters?` | [`ParameterValues`](./api/ParameterValues) | Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to filter data on the frontend is a [security risk](/docs/master/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
          - Combining [initialParameters](./api/StaticDashboardProps#initialparameters) and [hiddenParameters](./api/StaticDashboardProps#hiddenparameters) to declutter the user interface is fine. | +| `onLoad?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded. | +| `onLoadWithoutCards?` | (`dashboard`: `null` \| [`MetabaseDashboard`](./api/MetabaseDashboard)) => `void` | Callback that is called when the dashboard is loaded without cards. | +| `plugins?` | [`MetabasePluginsConfig`](./api/MetabasePluginsConfig) | Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. | +| `renderDrillThroughQuestion?` | () => [`ReactNode`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L478) | A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. | +| `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | +| `withCardTitle?` | `boolean` | Whether the dashboard cards should display a title. | +| `withDownloads?` | `boolean` | Whether to hide the download button. | +| `withTitle?` | `boolean` | Whether the dashboard should display a title. | diff --git a/_docs/master/embedding/sdk/api/snippets/StaticQuestionProps.md b/_docs/master/embedding/sdk/api/snippets/StaticQuestionProps.md index 6ddcd0fcd0..b652cbc226 100644 --- a/_docs/master/embedding/sdk/api/snippets/StaticQuestionProps.md +++ b/_docs/master/embedding/sdk/api/snippets/StaticQuestionProps.md @@ -24,5 +24,6 @@ layout: new-docs | `style?` | [`CSSProperties`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/index.d.ts#L2579) | A custom style object to be added to the root element. | | `width?` | `Width`\<`string` \| `number`\> | A number or string specifying a CSS size value that specifies the width of the component | | `withChartTypeSelector?` | `boolean` | - | +| `withDownloads?` | `boolean` | Enables the ability to download results in the interactive question. | diff --git a/_docs/master/questions/images/02-widget.png b/_docs/master/questions/images/02-widget.png deleted file mode 100644 index 4ce9fda455..0000000000 Binary files a/_docs/master/questions/images/02-widget.png and /dev/null differ diff --git a/_docs/master/questions/images/filter-and-parameter.png b/_docs/master/questions/images/filter-and-parameter.png new file mode 100644 index 0000000000..5416059a66 Binary files /dev/null and b/_docs/master/questions/images/filter-and-parameter.png differ diff --git a/_docs/master/questions/native-editor/basic-sql-parameters.md b/_docs/master/questions/native-editor/basic-sql-parameters.md new file mode 100644 index 0000000000..eda7cfe7da --- /dev/null +++ b/_docs/master/questions/native-editor/basic-sql-parameters.md @@ -0,0 +1,77 @@ +--- +version: master +has_magic_breadcrumbs: true +show_category_breadcrumb: true +show_title_breadcrumb: true +category: Questions +title: 'Basic SQL parameters' +source_url: 'https://github.com/metabase/metabase/blob/master/docs/questions/native-editor/basic-sql-parameters.md' +layout: new-docs +summary: 'Text, number, and date variables let you plug basic values into your SQL code.' +--- + +# Basic SQL parameters + +> If you want to filter on a database field in your query, you should prefer using [field filter variables](./sql-parameters), which require a different syntax. + +To add a basic variable to a SQL query, enclose the variable in double braces: `{% raw %}{{variable_name}}{% endraw %}`. + +This example defines a **Text** variable called `category`: + +```sql +{% raw %} +SELECT + count(*) +FROM + products +WHERE + category = {{category}} +{% endraw %} +``` + +These basic variables (that just allow basic string/number interpolation) have a different syntax than field filters. + +Here's the [field filter](./sql-parameters#field-filter-variables) syntax: + +```sql +{% raw %} +WHERE + {{category}} +{% endraw %} +``` + +Whereas the basic variable syntax includes an `=` operator: + +```sql +{% raw %} +WHERE + category = {{category}} +{% endraw %} +``` + +Here, we don't connect the variable to a database field; we merely insert the value into the variable. + +Metabase will read the variable and attach a filter widget to the query, which people can use to change the value inserted into the `category` variable. So if someone enters "Gizmo" into the filter widget, the query Metabase would run would be: + +```sql +SELECT + count(*) +FROM + products +WHERE + category = 'Gizmo' +``` + +If you're writing a native MongoDB query, your query would look more like this, with the `category` variable being defined inside the `match` clause: + +``` +{% raw %}[{ $match: { category: {{category}} } }]{% endraw %} +``` + +## Basic SQL variables offer limited options for filter types + +- **Text**: a plain input box +- **Number**: a plain input box +- **Date**: a simple date picker + +If you want a more expressive filter widget, like a dynamic date picker, you should use a [field filter variable](./sql-parameters#field-filter-variables). diff --git a/_docs/master/questions/native-editor/filter-widgets.md b/_docs/master/questions/native-editor/filter-widgets.md new file mode 100644 index 0000000000..faab61f575 --- /dev/null +++ b/_docs/master/questions/native-editor/filter-widgets.md @@ -0,0 +1,117 @@ +--- +version: master +has_magic_breadcrumbs: true +show_category_breadcrumb: true +show_title_breadcrumb: true +category: Questions +title: 'Filter and parameter widgets for native code' +source_url: 'https://github.com/metabase/metabase/blob/master/docs/questions/native-editor/filter-widgets.md' +layout: new-docs +--- + +# Filter and parameter widgets for native code + +When you add a [SQL variable or parameter](./sql-parameters) to your native/SQL query, Metabase will add a widget to the top of the query that people can use to set the variable's value. + +## How to create different types of filter and parameter widgets + +The kind of filter widget that Metabase displays when you create a field filter widget depends on a setting for that field in Metabase called **Filtering on this field**. Admins can set this field option to: + +- [Input box](#input-box) +- [Search box](#search-box) +- [Dropdown list](#dropdown-menu-and-search) + +Date fields will either have a simple date filter (for date variables) or a dynamic date picker (for field filters mapped to a date field). + +If you want to change the default filter widget for a particular field, you'll need to ask an admin to update that field in [the Table Metadata](../../data-modeling/metadata-editing) and set the desired "Filtering on this field" option. + +For dropdown lists and search boxes, you can also customize values available in the list. See below. + +### Input box + +1. Include a SQL variable in your query. +2. Set the **Variable type** to **Field filter**. If the query lacks a database field, you could use a Text or Number type as well, depending on what you're filtering. +3. Set **Field to map to** to the appropriate field (only if you selected the field filter variable type). +4. Set **Filter widget operator** to whatever [operator](#filter-widget-operators) you want. +5. Set **How should users filter on this variable** to "Input box". + +### Search box + +1. Include a SQL variable in your query. +2. Set the **Variable type** to **Field filter**. If the query lacks a database field, you could use a Text or Number type as well, depending on what you're filtering. +3. Set **Field to map to** to a field of type "Category" (only if you selected the field filter variable type). +4. Set **Filter widget operator** to whatever [operator](#filter-widget-operators) you want. +5. Set **How should users filter on this variable** to "Search box". If you're not using a field filter, you'll need to edit the search box settings to [tell Metabase where to get the values to search](#customizing-values-for-dropdown-lists-and-search-boxes). + +To guard against SQL injection attacks, Metabase converts whatever is in the search box to a string. If you want to use wildcards, check out [our Learn article][sql-variables]. + +### Dropdown menu and search + +To create a dropdown menu with search and a list of all values: + +1. Include a variable in your query. +2. Set the **Variable type** to **Field filter**. If the query lacks a database field, you could use a Text or Number type as well, depending on what you're filtering. +3. Set **Field to map to** to the appropriate field (only if you selected the field filter variable type). +4. Set **Filter widget operator** to whatever [operator](#filter-widget-operators) you want. +5. Set **How should users filter on this variable** to "Dropdown list". If you're not using a field filter, you'll need to edit the dropdown list settings to [tell Metabase where to get the values to list in the dropdown](#customizing-values-for-dropdown-lists-and-search-boxes). + +If there are too many different values in that column to display in a dropdown menu, Metabase will simply display a search box instead. So if you have a lot of email addresses, you may just get a search box anyway. The dropdown menu widgets work better when there's a small set of values to choose from (like the fifty U.S. states). + +## Customizing values for dropdown lists and search boxes + +When you add a dropdown menu or search box, you can tell Metabase which values people can choose from when using a filter with a dropdown list or search box. + +1. Add a dropdown list or search box. +2. Next to the option you chose, click **Edit**. +3. Metabase will pop up a modal where you can select **Where the values should come from**. + +You can choose: + +- **From connected fields**. If you selected the Field filter variable type, you'll also have the option to use the connected field. +- **From another model or question**. If you select this option, you'll need to pick a model or question, then a field from that model or question that Metabase will use to supply the values for that dropdown or search box. For example, if you want the dropdown to list the different plans an account could be on, you could select an "Account" model you created, and select the field "Plan" to power that dropdown. The dropdown would then list all of the distinct plan options that appear in the "Plan" column in the Accounts model. +- **Custom list**. Enter each item on a line. You can enter any string values you like. + +You can also [change a dashboard filter's selectable values](../../dashboards/filters#change-a-filters-selectable-values). + +## Requiring a value for a filter widget + +In the **Variable** settings sidebar, you can toggle the **Always require a value** option. If you turn this on: + +- You must enter a default value. +- The default value will override any [optional syntax](./sql-parameters#making-variables-optional) in your code (like an optional `WHERE` clause). If no value is passed to the filter, Metabase will run the query using the default value. Click on the **Eye** icon in the editor to preview the SQL Metabase will run. + +## Filter widget operators + +For text, number, and date filter widgets, you'll need to select a filter operator. + +### Text + +Filter operator options include: + +- String +- String is not +- String contains +- String does not contain +- String starts with +- String ends with + +### Number + +Filter operator options include: + +- Equal to +- Not equal to +- Between +- Greater than or equal to +- Less than or equal to + +### Dates + +Filter operator options include: + +- Month and year +- Quarter and year +- Single date +- Date range +- Relative date +- All options diff --git a/_docs/master/questions/native-editor/sql-parameters.md b/_docs/master/questions/native-editor/sql-parameters.md index a6d6a59cc0..4d90a8416b 100644 --- a/_docs/master/questions/native-editor/sql-parameters.md +++ b/_docs/master/questions/native-editor/sql-parameters.md @@ -7,123 +7,52 @@ category: Questions title: 'SQL parameters' source_url: 'https://github.com/metabase/metabase/blob/master/docs/questions/native-editor/sql-parameters.md' layout: new-docs +summary: 'Create SQL templates by adding filters and parameters to your SQL questions in the native code editor.' redirect_from: - /docs/master/users-guide/13-sql-parameters --- # SQL parameters -You can create SQL templates by adding variables to your SQL queries in the [Native/SQL editor][sql-editor]. These variables will create filter widgets that you can use to change the variable's value in the query. You can also add parameters to your question's URL to set the filters' values, so that when the question loads, those values are inserted into the variables. +![Variables](../images/filter-and-parameter.png) -![Variables](../images/02-widget.png) +You can create SQL templates by adding parameters (a.k.a. variables) to your SQL queries in the [Native/SQL editor](./writing-sql). -## Defining variables +These variables create filter widgets that people can use to change the variables' values in the query. -Typing `{% raw %}{{variable_name}}{% endraw %}` in your native query creates a variable called `variable_name`. - -Field Filters, a special type of filter, have a [slightly different syntax](#field-filter-syntax). - -This example defines a **Text** variable called `category`: - -```sql -{% raw %} -SELECT - count(*) -FROM - products -WHERE - category = {{category}} -{% endraw %} -``` - -Metabase will read the variable and attach a filter widget to the query, which people can use to change the value inserted into the `cat` variable with quotes. So if someone entered "Gizmo" into the filter widget, the query Metabase would run would be: - -```sql -SELECT - count(*) -FROM - products -WHERE - category = 'Gizmo' -``` - -If you're writing a native MongoDB query, your query would look more like this, with the `cat` variable being defined inside of the `match` clause. - -``` -{% raw %}[{ $match: { category: {{cat}} } }]{% endraw %} -``` - -## Setting SQL variables - -To set a SQL variable to a value, you can either: - -- Enter a value into the filter widget, and re-run the question, or -- Add a parameter to the URL and load the page. - -To add a value to the URL, follow this syntax: - -``` -?variable_name=value -``` - -For example, to set the `{% raw %}{{cat}}{%endraw%}` variable on a question to the value "Gizmo", your URL would look something like: - -``` -https://metabase.example.com/question/42-eg-question?cat=Gizmo -``` - -To set multiple variables, separate parameters with an ampersand (`&`): - -``` -https://metabase.example.com/question/42-eg-question?cat=Gizmo&maxprice=50 -``` +You can also add parameters to your question's URL to set the filters' values, so that when the question loads, those values are inserted into the variables. ## SQL variable types -When you define a variable, the **Variables** side panel will appear. You can set a type for a variable, which changes the kind of filter widget that Metabase presents. +When you define a variable, the **variables and parameters** side panel will appear. You can set a type for a variable, which changes the kind of filter widget that Metabase presents. -There are four types of variables: +Variable types include: -- **Text**: a plain input box. -- **Number**: a plain input box. -- **Date**: a simple date picker. If you want a more expressive date picker, like specifying a range, you'll want to use a Field Filter. -- **[Field Filter](#the-field-filter-variable-type)**: different filter widgets, depending on the mapped field. +- **[Field filter variables](#field-filter-variables)**: create "smart" filter widgets with date pickers or dropdown menus. To use a field filter, you'll need to connect to a database field included in your query. +- **[Basic variables](./basic-sql-parameters)**: text, number, and date variables. You'll almost always want to use field filters instead of these basic variables, as field filters create "smart" filter widgets, but Metabase provides these basic variables for situations where you can't use field filters. +- **[Time grouping parameters](./time-grouping-parameters)**: allows people to change how the results are grouped by a date column: by month, week, day, etc. -That last variable type, [Field Filter](#the-field-filter-variable-type), is special; it lets you create "smart" filter widgets, like a search box, or a dropdown menu of values, or a dynamic date picker that allows you to specify a date range. +You can include multiple variables in a single query, and Metabase will add multiple filter widgets to the question. When you have multiple filter widgets, you can click on a filter widget and drag it around to rearrange the order. -You can include multiple variables in the query, and Metabase will add multiple filter widgets to the question. When you have multiple filter widgets, you can click on a filter widget and drag it around to rearrange the order. +## When to use a field filter variable vs a basic variable -## The Field Filter variable type +In general, prefer using field filter variables. They offer "smart" filter widgets with dropdown menus and dynamic date pickers. -Setting a variable to the **Field Filter** type allows you to map the variable to a field in any table in the current database. Field filters let you create a "smart" filter widget that makes sense for that field. +If your query lacks a database field for the filter to connect to, however, then you'll instead need to use a [basic variable](./basic-sql-parameters). See other [field filter limitations](#field-filter-limitations). -Field Filter variables should be used inside of a `WHERE` clause in SQL, or a `$match` clause in MongoDB. +## Field filter variables -### Field Filter compatible types +To add a field filter: -Field Filters ONLY work with the following field types: +1. [Add a variable to a `WHERE` clause](#field-filter-syntax). +2. [Connect the field filter to a database field](#connect-the-field-filter-to-a-database-field). +3. [Configure your filter widget](#configure-your-filter-widget). -- Category -- Entity Name -- Entity Key -- Foreign Key -- City -- State -- ZIP or Postal Code - -The field can also be a date or timestamp, which can be left as "No semantic type" in the [Table Metadata](../../data-modeling/metadata-editing). - -When you set the **Variable type** to "Field Filter", Metabase will present an option to set the **Field to map to**, as well as the **Filter widget type**. The options available for the Filter widget type depend on the field's type. For example, if you map to a field of type Category, you'll see options for either "Category" or None. If you map to a Date Field, you'll see options for None, Month and year, Quarter and year, Single date, Date range, or Date filter. - -If you're not seeing the option to display a filter widget, make sure the mapped field is set to one of the above types, and then try manually syncing your database from the "Databases" section of the Admin Panel to force Metabase to scan and cache the field's values. +### Field filter syntax -If you want to map a Field Filter to a field that isn't one of the compatible types listed above, you'll need an Admin to change the field type for that column. See [metadata editing](../../data-modeling/metadata-editing). - -## Field Filter syntax +Let's say you want to create a field filter variable that filters the `People` table by the `state` field. -Let's say you want to create a Field Filter that filters the `People` table by state, and you want people to be able to select multiple states at a time. Here's the query: - -The syntax for Field Filters differs from a Text, Number, or Date variable. +Here's the field filter syntax: ```sql {% raw %} @@ -136,81 +65,45 @@ WHERE {% endraw %} ``` -Then, in the side panel, select the "Field Filter" variable type, and choose which field to map your variable to (in this case, `State`). - -Note the lack of the column and operator (like `=`). The reason you need to structure Field Filters this way is to handle cases where Metabase generates the code for you. For example, for handling cases where someone selects multiple values in the filter widget, or a range of dates. With Field Filters, you can't control the generated SQL, so if you need greater control, you should use one (or more) Text, Number, or Date variables. +Note the lack of the column and operator (it's not `{% raw %}WHERE state = {{state}}{% endraw %}`, it's just `{% raw %}WHERE {{state}}{% endraw %}`). The reason you need to structure field filter variables in this way is to handle cases where Metabase generates the code for you. For example, for handling cases where someone selects _multiple_ values in the filter widget, or a _range_ of dates, Metabase will have to interpolate the SQL code to handle those inputs into the variable. -A MongoDB native query example might look like this: +In a MongoDB native query, you'll need to put the field filter in a `$match` clause. ``` {% raw %}[ {$match: {{date_var}} } ]{% endraw %} ``` -For a more in-depth guide, check out [Field Filters: create smart filter widgets for SQL questions][field-filter]. - -### Field filters in BigQuery and Oracle - -Make sure your SQL dialect matches the database you've selected. Common issues involving how tables are quoted in the query: - -| Database | Dialect quirk | Example | -| -------- | --------------------------------------------------- | -------------------------- | -| BigQuery | Schemas and tables must be quoted with backticks. | `` FROM `dataset.table` `` | -| Oracle | Schemas and tables must be quoted in double quotes. | `FROM schema.table` | - -For more help, see [Troubleshooting SQL error messages](../../troubleshooting-guide/error-message#sql-editor). - -## How to create different types of filter widgets - -The kind of filter widget that Metabase displays when you create a Field Filter widget depends on a setting for that field in Metabase called **Filtering on this field**. Admins can set this field option to: - -- Plain input box -- Search box -- A list of all values (also known as a dropdown menu) - -Date fields will either have a simple date filter (for Date variables) or a dynamic date picker (for Field Filters mapped to a date field). - -If you want to change the filter widget for a particular field, you'll need to ask an Admin to update that field in [the Table Metadata](../../data-modeling/metadata-editing) and set the desired "Filtering on this field" option. - -### Filter widget with plain input box - -Create a simple **Text** or **Number** variable. Additionally, you can use a Field Filter with a field that has its **Filtering on this field** value set to "Plain input box". - -Note: to guard against SQL injection attacks, Metabase converts whatever is in the Search box to a string. If you want to use wildcards, check out [our Learn article][sql-variables]. +### Connect the field filter to a database field -### Filter widget with search box +In order for a field filter variable to work, you'll need to associate the variable with a database field. -- Include a SQL variable in your query. -- Set the **Variable type** to **Field Filter**. -- Set the **Field to map to** to a field of type "Category" that has its **Filtering on this field** option set to "Search box" +1. Go to the variables and parameters side panel. +2. Under **Variable type**, select the "Field filter" variable type. +3. Choose which **Field to map to** your variable (in this case, we'll map the `Category` field in the products table). -### Filter widget with dropdown menu and search +You can only map a field filter to a database field. See [field filter limitations](#field-filter-limitations). -To create a dropdown menu with search and a list of all values, you need to: +### Configure your filter widget -- Include a SQL variable in your query. -- Set the **Variable type** to **Field Filter**. -- Set the **Field to map to** to a field of type "Category" that has its **Filtering on this field** option set to "A list of all values". -- Set the **Filter widget type** to "Category". +1. Set the **Filter widget type**. Options will differ depending on the field's data type. +2. Set the **Filter widget** label. +3. Set **How should users filter on this variable?**: + - [Dropdown list](../../dashboards/filters#dropdown-list). A dropdown list shows all available values for the field in a selectable list. + - [Search box](../../dashboards/filters#search-box). A search box allows people to type to search for specific values. + - [Input box](../../dashboards/filters#plain-input-box). An input box provides a simple text field for entering values. +4. Optionally, set a **Default filter widget value**. -If the field you want to create a dropdown for is not set to the type "Category" with **Filtering on this field** set to "A list of all values", an Admin will need to update the settings for that field. For example, if you want to create a dropdown menu for an incompatible field type like an Email field, an admin will need to change that field type to "Category", set the **Filtering on this field** option to **A list of all values**, then re-scan the values for that field. - -If however, there are too many different values in that column to display in a dropdown menu, Metabase will simply display a search box instead. So if you have a lot of email addresses, you may just get a search box anyway. The dropdown menu widgets work better when there's a small set of values to choose from (like the fifty U.S. states). +Check out [filter widgets](./filter-widgets). ## Field filter limitations -Some things that could trip you up when trying to set up a Field Filter variable. - -### Field Filters don't work with table aliases - -You won't be able to select values from field filters in queries that use table aliases for joins or CTEs. - -The reason is that field filters generate SQL based on the mapped field; Metabase doesn't parse the SQL, so it can't tell what an alias refers to. You have three options for workarounds, depending on the complexity of your query. +Field filters: -1. Use full table names. -2. Replace CTEs with subqueries. -3. Create a view in your database, and use the view as the basis of your query. +- [Must be connected to database fields included in the query](#field-filters-must-be-connected-to-database-fields-included-in-the-query) +- [Are only compatible with certain types](#field-filters-are-only-compatible-with-certain-types) +- [Don't work with table aliases](#field-filters-dont-work-with-table-aliases) -### Field Filters must be connected to fields included in the query +### Field Filters must be connected to database fields included in the query Your main query should be aware of all the tables that your Field Filter variable is pointing to, otherwise you'll get a SQL syntax error. For example, let's say that your main query includes a field filter like this: @@ -239,30 +132,77 @@ WHERE {% endraw %} ``` -## Customizing dropdown lists and search box values +### Field filters are only compatible with certain types + +- Category +- Entity Name +- Entity Key +- Foreign Key +- City +- State +- ZIP or Postal Code +- Date +- Timestamp -With Text and Field filter variables, you can tell Metabase what values people can choose from when using a filter with a dropdown list or search box. +The field can also be a date or timestamp, even when the field is set to "No semantic type" in the [Table Metadata](../../data-modeling/metadata-editing). -1. In the native editor, add a {% raw %}{{variable}}{% endraw %} in double braces. -2. If the sidebar doesn't open, you can click on the **{x}** icon on the right to open the **Variables** sidebar. -3. In the **Settings** tab, set the **Variable type** to either "Text" or "Field Filter". -4. In the sidebar, go to **How should users filter on this variable?** Pick either **Dropdown list** or **Search box**. -5. Next to the option you chose, click **Edit**. -6. Metabase will pop up a modal where you can select **Where the values should come from**. +If you want to map a Field Filter to a field that isn't one of the compatible types listed above, you'll need an Admin to change the field type for that column. See [metadata editing](../../data-modeling/metadata-editing). -You can choose: +### Field Filters don't work with table aliases -- **From connected fields** If you selected the Field filter variable type, you'll also have the option to use the connected field. -- **From another model or question**. If you select this option, you'll need to pick a model or question, then a field from that model or question that Metabase will use to supply the values for that dropdown or search box. For example, if you want the dropdown to list the different plans an account could be on, you could select an "Account" model you created, and select the field "Plan" to power that dropdown. The dropdown would then list all of the distinct plan options that appear in the "Plan" column in the Accounts model. -- **Custom list**. Enter each item on a line. You can enter any string values you like. +You won't be able to select values from field filters in queries that use table aliases for joins or CTEs. + +The reason is that field filters generate SQL based on the mapped field; Metabase doesn't parse the SQL, so it can't tell what an alias refers to. You have three options for workarounds, depending on the complexity of your query. + +- Use full table names. +- Replace CTEs with subqueries. +- Create a view in your database, and use the view as the basis of your query. -You can also [change a dashboard filter's selectable values](../../dashboards/filters#change-a-filters-selectable-values). +## Field filters in BigQuery and Oracle + +Make sure your SQL dialect matches the database you've selected. Common issues involving how tables are quoted in the query: + +| Database | Dialect quirk | Example | +| -------- | --------------------------------------------------- | -------------------------- | +| BigQuery | Schemas and tables must be quoted with backticks. | `` FROM `dataset.table` `` | +| Oracle | Schemas and tables must be quoted in double quotes. | `FROM "schema.table"` | + +For more help, see [Troubleshooting SQL error messages](../../troubleshooting-guide/error-message#sql-editor). + +## Setting values for SQL variables + +To set a SQL variable to a value, you can either: + +- Enter a value into the filter widget, and re-run the question. +- Add a parameter to the URL and load the page. + +### Setting a parameter via URL + +To add a value to the URL, follow this syntax: + +``` +?variable_name=value +``` + +For example, to set the `{% raw %}{{category}}{%endraw%}` variable on a question to the value "Gizmo", your URL would look something like: + +``` +https://metabase.example.com/question/42-eg-question?category=Gizmo +``` + +To set multiple variables, separate parameters with an ampersand (`&`): + +``` +https://metabase.example.com/question/42-eg-question?category=Gizmo&maxprice=50 +``` ## Setting a default value in the filter widget -In the variables sidebar, you can set a default value for your variable. This value will be inserted into the corresponding filter widget by default (even if the filter widget is empty). You'll need to insert a new value into the filter widget to override the default. +In the variables sidebar, you can set a default value for your variable. This value will be inserted into the corresponding filter widget by default (even if the filter widget is empty). -## Setting complex default values in the query +To override the default value, insert a new value into the filter widget. + +### Setting complex default values in the query You can also define default values directly in your query by enclosing comment syntax inside the end brackets of an optional parameter. @@ -289,13 +229,6 @@ If you pass a value to the variable, the `WHERE` clause runs, including the comm Note that the hash (`--`) used to comment the text might need to be replaced by the comment syntax specific to the database you're using. -## Requiring a value for a filter widget - -In the **Variable** settings sidebar, you can toggle the **Always require a value** option. If you turn this on: - -- You must enter a default value. -- The default value will override any optional syntax in your code (like an optional `WHERE` clause). If no value is passed to the filter, Metabase will run the query using the default value. Click on the **Eye** icon in the editor to preview the SQL Metabase will run. - ## Making variables optional You can make a clause optional in a query. For example, you can create an optional `WHERE` clause that contains a SQL variable, so that if no value is supplied to the variable (either in the filter or via the URL), the query will still run as if there were no `WHERE` clause. @@ -342,9 +275,7 @@ FROM WHERE ``` -which is not a valid SQL query. - -Instead, put the entire `WHERE` clause in `[[ ]]`: +Which is not a valid SQL query. Instead, put the entire `WHERE` clause in `[[ ]]`: ```sql {% raw %} @@ -353,11 +284,11 @@ SELECT FROM products [[WHERE - category = {{cat}}]] + category = {{category}}]] {% endraw %} ``` -When there's no value given for `cat`, Metabase will just execute: +When there's no value given for `category`, Metabase will still execute a valid query: ```sql {% raw %} @@ -368,8 +299,6 @@ FROM {% endraw %} ``` -which is still a valid query. - ### You need at least one `WHERE` when using multiple optional clauses To use multiple optional clauses, you must include at least one regular `WHERE` clause followed by optional clauses, each starting with `AND`: @@ -382,7 +311,7 @@ FROM products WHERE TRUE - [[AND id = {{id}}] + [[AND id = {{id}}]] [[AND {{category}}]] {% endraw %} ``` @@ -391,7 +320,7 @@ That last clause uses a Field filter (note the lack of a column in the `AND` cla ### Optional variables in MongoDB -If you're using MongoDB, you can make an clause optional like so: +If you're using MongoDB, you can make a clause optional like so: ``` {% raw %} @@ -422,27 +351,24 @@ Or with multiple optional filters: ## Connecting a SQL question to a dashboard filter -In order for a saved SQL/native question to be usable with a dashboard filter, the question must contain at least one variable. +In order for a SQL/native question to be usable with a dashboard filter, the question must contain at least one variable or parameter. -The kind of dashboard filter that can be used with the SQL question depends on the field. For example, if you have a field filter called `{% raw %}{{var}}{% endraw %}` and you map it to a State field, you can map a Location dashboard filter to your SQL question. In this example, you'd create a new dashboard (or go to an existing dashboard), click the **Pencil icon** to enter **Dashboard edit mode**, add the SQL question that contains your State Field Filter variable, add a new dashboard filter (or edit an existing Location filter), then click the dropdown on the SQL question card to see the State Field Filter. +The kind of dashboard filter that can be used with the SQL question depends on the field. For example, if you have a field filter called `{% raw %}{{var}}{% endraw %}` and you map it to a State field, you can map a location dashboard filter to your SQL question. In this example, you'd: -If you add a **Date** variable to the question, then it's only possible to use the dashboard filter option **Single Date**. So if you are trying to use one of the other Time options on the dashboard, you'll need to change the variable to a [Field Filter](#the-field-filter-variable-type) variable and map it to a date column. +1. Create a new dashboard (or go to an existing dashboard). +2. Click the **Pencil icon** to enter **Dashboard edit mode**. +3. Add the SQL question that contains your `State` field filter. +4. Add a new dashboard filter (or edit an existing Location filter). +5. Click the dropdown on the SQL question card to connect the widget to the `State` field filter. -![Field filter](../images/state-field-filter.png) +If you add a basic **Date** variable to the question (i.e., not a field filter), then it's only possible to use the dashboard filter option **Single Date**. So if you're trying to use one of the other Time options on the dashboard, you'll need to change the variable to a [field filter](#field-filter-variables) and map it to a date field. -More on [Dashboard filters][dashboard-filters]. +![Field filter](../images/state-field-filter.png) ## Further reading -- [Create filter widgets for charts using SQL variables][sql-variables]. -- [Field Filters: create smart filter widgets for SQL questions][field-filter]. -- [Troubleshooting SQL][troubleshooting-sql]. -- [Troubleshooting filters][troubleshooting-filters]. -- [Dashboard filters][dashboard-filters]. - -[sql-editor]: ./writing-sql -[dashboard-filters]: ../../dashboards/filters -[field-filter]: /learn/metabase-basics/querying-and-dashboards/sql-in-metabase/field-filters -[sql-variables]: /learn/metabase-basics/querying-and-dashboards/sql-in-metabase/sql-variables -[troubleshooting-filters]: ../../troubleshooting-guide/filters -[troubleshooting-sql]: ../../troubleshooting-guide/sql +- [Create filter widgets for charts using SQL variables](/learn/metabase-basics/querying-and-dashboards/sql-in-metabase/sql-variables). +- [Field Filters: create smart filter widgets for SQL questions](/learn/metabase-basics/querying-and-dashboards/sql-in-metabase/field-filters). +- [Troubleshooting SQL](../../troubleshooting-guide/sql). +- [Troubleshooting filters](../../troubleshooting-guide/filters). +- [Dashboard filters](../../dashboards/filters). diff --git a/_docs/master/questions/native-editor/time-grouping-parameters.md b/_docs/master/questions/native-editor/time-grouping-parameters.md new file mode 100644 index 0000000000..6e42615320 --- /dev/null +++ b/_docs/master/questions/native-editor/time-grouping-parameters.md @@ -0,0 +1,66 @@ +--- +version: master +has_magic_breadcrumbs: true +show_category_breadcrumb: true +show_title_breadcrumb: true +category: Questions +title: 'Time grouping parameter' +source_url: 'https://github.com/metabase/metabase/blob/master/docs/questions/native-editor/time-grouping-parameters.md' +layout: new-docs +--- + +# Time grouping parameter + +You can add a parameter to SQL questions to change how results are grouped by time: by day, week, month, and so on. + +To make this work, you'll need to add parameters in both the `SELECT` and `GROUP BY` clauses. + +## Time grouping parameter example + +Here's an example that counts the number of orders in the `orders` table and inserts a parameter to allow people to change how Metabase groups the results by the `created_at` column. + +```sql +{% raw %} +SELECT + COUNT(*) AS "Orders", + {{mb.time_grouping("Time grouping", "created_at")}} AS "Created At" +FROM + orders +GROUP BY + {{mb.time_grouping("Time grouping", "created_at")}} +{% endraw %} +``` + +Like in all SQL groupings, you must include the parameter in both the `SELECT` and `GROUP BY` clauses. You can also use the `mb.time_grouping` function on different columns in the same query, like this: + +```sql +SELECT + COUNT(*) AS "Orders", + {{mb.time_grouping("Time grouping", "created_at")}} AS "Created At", + {{mb.time_grouping("Trial ends at", "trial_ends_at")}} AS "Trial ends at" +FROM + accounts +GROUP BY + {{mb.time_grouping("Time grouping", "created_at")}}, + {{mb.time_grouping("Trial ends at", "trial_ends_at")}} +``` + +## Time grouping parameter syntax + +To include a time grouping parameter, include an `mb.time_grouping` function call: + +```sql +{% raw %}{{mb.time_grouping(name, column)}}{% endraw %} +``` + +- `mb.time_grouping` is the function that handles the time grouping. It takes two arguments: `name` and `column`. +- `name` is what you want to call the parameter. The name can be anything, but it must be wrapped in either single or double quote marks. E.g., `"Unit"` or `'Time Grouping'`. By default, this name will change the label on the widget. You can also set a different label for the widget in the variables sidebar. +- `column` is the name of the column you want to group by. The column name must be wrapped in either single or double quote marks, e.g., `"created_at"` (`created_at` without the quotes won't work). + +Like with all parameters, you can set a default value (e.g., "month"). With time grouping parameters, you're limited to the options for the [time grouping parameter](../../dashboards/filters#time-grouping-parameter). + +If people don't set a value for the parameter, Metabase won't group to a date part (like day or week). It will just group by untruncated dates. + +## Connecting to a dashboard filter + +See [dashboard filters and parameters](../../dashboards/filters). diff --git a/_docs/master/troubleshooting-guide/bugs.md b/_docs/master/troubleshooting-guide/bugs.md index 6dc76f07ae..7ec6b908d5 100644 --- a/_docs/master/troubleshooting-guide/bugs.md +++ b/_docs/master/troubleshooting-guide/bugs.md @@ -11,7 +11,7 @@ layout: new-docs # Reporting a bug -If you come across something that looks like a bug, please start by searching our [Github issues][metabase-issues] to see if it has already been reported. If it has, please let us know you're experiencing the same issue by reacting with a thumbs up emoji or adding a comment to provide additional information. +If you come across something that looks like a bug, please start by searching our [GitHub issues][metabase-issues] to see if it has already been reported. If it has, please let us know you're experiencing the same issue by reacting with a thumbs up emoji or adding a comment to provide additional information. If the bug has not yet been reported, go ahead and [open a bug report][metabase-file-bug]. The following information will help us reproduce your issue: diff --git a/_docs/master/troubleshooting-guide/filters.md b/_docs/master/troubleshooting-guide/filters.md index ffe3c11bdc..d4644d2522 100644 --- a/_docs/master/troubleshooting-guide/filters.md +++ b/_docs/master/troubleshooting-guide/filters.md @@ -47,7 +47,7 @@ If a question filter is giving you no results or the wrong results: If you're having trouble filtering on a: - [Custom column](../questions/query-builder/editor#custom-columns): check if the custom expression is working as expected. For example, your custom expression might be returning blank values when you expect numbers. -- [SQL field filter](../questions/native-editor/sql-parameters#the-field-filter-variable-type): make sure you're using the correct [field filter syntax](../questions/native-editor/sql-parameters#field-filter-syntax), then see [Troubleshooting SQL variables](./sql#sql-variables-and-field-filters). +- [SQL field filter](../questions/native-editor/sql-parameters#field-filter-variables): make sure you're using the correct [field filter syntax](../questions/native-editor/sql-parameters#field-filter-syntax), then see [Troubleshooting SQL variables](./sql#sql-variables-and-field-filters). **Explanation** diff --git a/_docs/master/troubleshooting-guide/known-issues.md b/_docs/master/troubleshooting-guide/known-issues.md index 5ae4b67ed7..29a783865a 100644 --- a/_docs/master/troubleshooting-guide/known-issues.md +++ b/_docs/master/troubleshooting-guide/known-issues.md @@ -17,7 +17,7 @@ If you can't find or solve your problem using the [troubleshooting guides](./ind If your work in Metabase is crashing, missing, or not being saved, you might have found a bug. -1. Go to the [Metabase Github issues page](https://github.com/metabase/metabase/issues). +1. Go to the [Metabase GitHub issues page](https://github.com/metabase/metabase/issues). 2. Click on the **Label** dropdown and select `Type: Bug`. @@ -37,7 +37,7 @@ If your work in Metabase is crashing, missing, or not being saved, you might hav If the functionality you're looking for simply doesn't exist (i.e., it hasn't suddenly gone missing), you might be running into a product limitation. -1. Go to the [Metabase Github issues page](https://github.com/metabase/metabase/issues). +1. Go to the [Metabase GitHub issues page](https://github.com/metabase/metabase/issues). 2. Click on the **Label** dropdown and select `Type: New Feature`. diff --git a/_docs/master/troubleshooting-guide/linked-filters.md b/_docs/master/troubleshooting-guide/linked-filters.md index 2313faf8a6..1d5a3445fc 100644 --- a/_docs/master/troubleshooting-guide/linked-filters.md +++ b/_docs/master/troubleshooting-guide/linked-filters.md @@ -21,11 +21,11 @@ If you are having problems with a regular [filter widget][filter-widget-gloss], ## Does a connected dashboard card use a SQL variable? -**Root cause**: Native/SQL questions must have a [field filter](../questions/native-editor/sql-parameters#the-field-filter-variable-type) variable in order to be linked. Regular SQL variables won't work. +**Root cause**: Native/SQL questions must have a [field filter](../questions/native-editor/sql-parameters#field-filter-variables) variable in order to be linked. Regular SQL variables won't work. **Steps to take**: -1. Update the card's query to change the regular variable to a [field filter](../questions/native-editor/sql-parameters#the-field-filter-variable-type) variable. +1. Update the card's query to change the regular variable to a [field filter](../questions/native-editor/sql-parameters#field-filter-variables) variable. See [Limitations of linking filters](../dashboards/linked-filters#limitations-of-linked-filters). diff --git a/_docs/master/troubleshooting-guide/sql.md b/_docs/master/troubleshooting-guide/sql.md index 6149dd0a04..25bf519ab0 100644 --- a/_docs/master/troubleshooting-guide/sql.md +++ b/_docs/master/troubleshooting-guide/sql.md @@ -23,8 +23,8 @@ layout: new-docs - [Filter widget doesn't display a dropdown menu of values](../data-modeling/metadata-editing#changing-a-search-box-filter-to-a-dropdown-filter). - [SQL query contains table aliases](../questions/native-editor/sql-parameters#field-filters-dont-work-with-table-aliases). -- [SQL syntax error: missing `FROM` clause](../questions/native-editor/sql-parameters#field-filters-must-be-connected-to-fields-included-in-the-query). -- [No option to display a filter widget](../questions/native-editor/sql-parameters#field-filter-compatible-types). +- [SQL syntax error: missing `FROM` clause](../questions/native-editor/sql-parameters#field-filters-must-be-connected-to-database-fields-included-in-the-query). +- [No option to display a filter widget](../questions/native-editor/sql-parameters#field-filters-are-only-compatible-with-certain-types). - [I don't know the SQL variable type](/learn/metabase-basics/querying-and-dashboards/sql-in-metabase/sql-variables) ## SQL syntax errors diff --git a/_site/docs/master/CONTRIBUTING.html b/_site/docs/master/CONTRIBUTING.html index a1fe4be4cb..db7b53fccc 100644 --- a/_site/docs/master/CONTRIBUTING.html +++ b/_site/docs/master/CONTRIBUTING.html @@ -1521,6 +1521,8 @@
          Analytics
          + +
        • Getting started @@ -1537,6 +1539,8 @@
          Analytics
          + +
        • Metabase concepts @@ -1553,6 +1557,8 @@
          Analytics
          + +
        • Queries and charts @@ -1574,6 +1580,8 @@
          Analytics
          + +
        • Introduction @@ -1587,6 +1595,8 @@
          Analytics
          + +
        • Query builder @@ -1603,36 +1613,42 @@
          Analytics