How to use filters for interactivity in Datazone Intelligent Apps.
Filters allow users to interactively control the data displayed in your Intelligent App dashboards. They are linked to variables and can be referenced in SQL queries to dynamically filter results.
The options object also accepts use_input (SQL options only) to enable server-side search.
The multiple attribute is only allowed for dropdown filters. Using it with other filter types (text, number, date) will result in a validation error.
If you define a filter in the Intelligent App layout but do not use it any layout tab, validations will fail. Make sure all defined filters are included in at least one tab’s filters list.
- type: date name: order_date_filter title: Order Date Filter affected_variable: order_date default_value: '2024-04-01'- type: number name: penalty_count_filter title: Penalty Count Filter affected_variable: penalty_count default_value: '10' placeholder: 'Enter penalty count'
All filter values are treated as strings. Ensure your queries handle type conversion as needed. Also if you pass
a non-numeric string from SQL based dropdown to a number filter, it will be ignored.
Example: SELECT distinct toString(year) as year FROM sales_order;
Dropdown filters support multi-select functionality by setting multiple: true. This allows users to select multiple values from the dropdown list simultaneously.
- type: dropdown name: region_filter title: Select Regions affected_variable: selected_regions multiple: true default_value: North # Optional: single default value options: type: static values: - value: North label: North Region - value: South label: South Region - value: East label: East Region - value: West label: West Region
When multiple: true is enabled, the variable will contain an array of selected values. Use Jinja’s join filter to format these values for SQL queries:
query: | SELECT * FROM customer_data WHERE 1=1 {% if selected_regions %} AND CustomerRegion IN ('{{ selected_regions | join("','") }}') {% endif %} LIMIT 100;
How it works:
When users select ['North', 'South'], the Jinja template transforms it to: 'North','South'
The final SQL becomes: AND CustomerRegion IN ('North','South')
If no values are selected, the condition is skipped entirely
By default, an SQL-driven dropdown fetches its full list of options once and then filters them client-side as the user types. This is fine for short lists, but it does not scale to high-cardinality columns (thousands of customers, product references, IDs, etc.) where you cannot — or do not want to — load every value into the browser.Setting use_input: true on an sql options block switches the dropdown to server-side search. The text the user types into the dropdown’s search box is sent back to your options query as the search_term variable, so the database does the filtering and returns only matching rows.
- type: dropdown name: order_reference_filter title: Order Reference affected_variable: order_reference multiple: true options: type: sql use_input: true query: | SELECT DISTINCT order_reference FROM orders WHERE 1=1 {% if search_term %} AND order_reference LIKE '%{{ search_term }}%' {% endif %} LIMIT 100
How it works:
As the user types in the dropdown, the input is debounced (~300ms) and sent to the options query as search_term.
Wrap the search condition in {% if search_term %} so the query still returns a sensible initial list (e.g. the first 100 rows) before the user types anything.
The database returns only the matching values, which populate the dropdown. Because filtering happens server-side, client-side filtering is disabled for that dropdown.
Always add a LIMIT to keep the result set small and responsive.
search_term is only injected when use_input: true.
use_input is only valid for type: sql options. Setting it on a type: static options block results in a validation error.
use_input works for both single-select and multi-select (multiple: true) dropdowns.
Filters can depend on other filters to create cascading filter effects. When one filter changes, dependent filters can update their options based on the selected value. This is particularly useful for hierarchical data like country/city relationships.
In this example, the city filter’s options are limited based on the selected country:
filters: - type: dropdown name: country_filter title: Country affected_variable: selected_country default_value: 'USA' options: type: sql query: "SELECT DISTINCT country FROM locations ORDER BY country" - type: dropdown name: city_filter title: City affected_variable: selected_city options: type: sql query: | SELECT DISTINCT city FROM locations WHERE 1=1 {% if selected_country is defined %} AND country = '{{ selected_country }}' {% endif %} ORDER BY city
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Datazone","colors":{"primary":"#E34F80","light":"#DD2360","dark":"#DD2360"},"logo":{"light":"https://mintcdn.com/datazone/yPfWMfb9oig-ubY2/logo/black.svg?fit=max\u0026auto=format\u0026n=yPfWMfb9oig-ubY2\u0026q=85\u0026s=5d4a144e52567326a111c04d35d95f68","dark":"https://mintcdn.com/datazone/yPfWMfb9oig-ubY2/logo/white.svg?fit=max\u0026auto=format\u0026n=yPfWMfb9oig-ubY2\u0026q=85\u0026s=509efaa9415d96133d23701653670425"},"favicon":"https://mintcdn.com/datazone/yPfWMfb9oig-ubY2/print_transparent.svg?fit=max\u0026auto=format\u0026n=yPfWMfb9oig-ubY2\u0026q=85\u0026s=d4fc324a530d388c29a2a1278be63e35","navbar":{"links":[{"href":"mailto:support@datazone.co","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.datazone.co"}},"footer":{"socials":{"github":"https://github.com/datazoneco","linkedin":"https://www.linkedin.com/company/datazoneco","youtube":"https://www.youtube.com/@Datazoneco"}},"icons":{"library":"lucide"},"integrations":{"posthog":{"apiKey":"phc_Bt6E747rOdROLBJ1nxdpIN8wkZBkJlVMViRBulDwoCb","apiHost":"https://eu.i.posthog.com"}},"banner":{"content":"✨ Introducing Agent Evals! Every agent conversation scored, the bad answers flagged, and suggestions to fix them. See [Agent Evals](/reference/agents/evaluations) for details.","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"AI Skills","icon":"sparkles","href":"/ai-skills"},{"anchor":"Blog","icon":"newspaper","href":"https://www.datazone.co/blog"},{"anchor":"Change Log","icon":"history","href":"/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"datazone","hasAudioNarration":false,"actualSubdomain":"datazone","customDomains":["docs.datazone.co"],"gitSource":{"type":"github","owner":"datazoneco","repo":"datazone-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aea5efebdb06a9f5f0c3787","collectionId":"7699629c-2ad3-439b-ba0d-c014e1609a47","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aea5efebdb06a9f5f0c3787"},"entitlements":{},"buildId":"6aea5efebdb06a9f5f0c3787","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Documentation","count":88},{"language":"default","tag":"Reference","count":78},{"language":"default","tag":"Data Ingestion","count":18},{"language":"default","tag":"Development","count":16},{"language":"default","tag":"Integration \u0026 APIs","count":9},{"language":"default","tag":"Intelligent Apps","count":8},{"language":"default","tag":"Agents","count":5},{"language":"default","tag":"Flows","count":5},{"language":"default","tag":"Authentication","count":5},{"language":"default","tag":"Get Started","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"reference/intelligent-apps/filters","slug":"/reference/intelligent-apps/filters","pageMetadata":{"title":"Filters","description":"How to use filters for interactivity in Datazone Intelligent Apps.","href":"/reference/intelligent-apps/filters"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to use filters for interactivity in Datazone Intelligent Apps.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Filters allow users to interactively control the data displayed in your Intelligent App dashboards. They are linked to variables and can be referenced in SQL queries to dynamically filter results.`}),`\n`,_jsx(Heading,{level:`2`,id:`filter-types`,children:`Filter Types`}),`\n`,_jsx(_components.p,{children:`Datazone supports several filter types:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`Free text input`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{children:`Numeric input`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dropdown`})}),_jsx(_components.td,{children:`Select from a list of options`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`date`})}),_jsx(_components.td,{children:`Date picker`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`filter-configuration`,children:`Filter Configuration`}),`\n`,_jsxs(_components.p,{children:[`Each filter is defined in the `,_jsx(_components.code,{children:`components.filters`}),` section of your YAML configuration. Key properties:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type`}),`: The filter type (`,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`dropdown`}),`, `,_jsx(_components.code,{children:`date`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),`: Unique filter name`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`title`}),`: Label shown to users`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`affected_variable`}),`: The variable this filter updates`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`default_value`}),`: (Optional) Default value`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`options`}),`: (For dropdown) Static or SQL-driven options`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`multiple`}),`: (Optional, `,_jsx(_components.strong,{children:`dropdown only`}),`) Enable multi-select functionality (default: `,_jsx(_components.code,{children:`false`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`placeholder`}),`: (Optional) Placeholder text`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`options`}),` object also accepts `,_jsx(_components.code,{children:`use_input`}),` (SQL options only) to enable `,_jsx(_components.a,{href:`#searchable-dropdown-filters`,children:`server-side search`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`multiple`}),` attribute is only allowed for `,_jsx(_components.code,{children:`dropdown`}),` filters. Using it with other filter types (`,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`date`}),`) will result in a validation error.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If you define a filter in the Intelligent App layout but do not use it any layout tab, validations will fail. Make sure all defined filters are included in at least one tab’s `,_jsx(_components.code,{children:`filters`}),` list.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`example-static-dropdown-filter`,children:`Example: Static Dropdown Filter`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`membership_type_filter_limited`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Membership Type`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`membership_type_second`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` default_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'all'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`static`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` values`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`all`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`All`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`basic`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Basic`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`premium`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Premium`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`vip`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`VIP`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`example-sql-driven-dropdown-filter`,children:`Example: SQL-Driven Dropdown Filter`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`membership_type_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Membership Type`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`membership_type`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sql`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SELECT distinct ProductGroup_Name FROM sales_order LIMIT 100;`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:`The query should return only one column with the values you want to display in the dropdown.`}),`\n`,_jsx(Heading,{level:`3`,id:`example-date-and-number-filters`,children:`Example: Date and Number Filters`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`date`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`order_date_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Order Date Filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`order_date`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` default_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-04-01'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`number`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`penalty_count_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Penalty Count Filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`penalty_count`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` default_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'10'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Enter penalty count'`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`All filter values are treated as strings. Ensure your queries handle type conversion as needed. Also if you pass\na non-numeric string from SQL based dropdown to a number filter, it will be ignored.\nExample: `,_jsx(_components.code,{children:`SELECT distinct toString(year) as year FROM sales_order;`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`using-filters-in-queries`,children:`Using Filters in Queries`}),`\n`,_jsx(_components.p,{children:`Filters update variables, which you can reference in your chart queries using double curly braces:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` select * from sales_order WHERE OrderDate > '{{ order_date }}' limit 100;`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`multi-select-dropdown-filters`,children:`Multi-Select Dropdown Filters`}),`\n`,_jsxs(_components.p,{children:[`Dropdown filters support multi-select functionality by setting `,_jsx(_components.code,{children:`multiple: true`}),`. This allows users to select multiple values from the dropdown list simultaneously.`]}),`\n`,_jsx(Heading,{level:`3`,id:`configuration-example`,children:`Configuration Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`region_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Select Regions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`selected_regions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` multiple`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` default_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`North`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Optional: single default value`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`static`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` values`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`North`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`North Region`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`South`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`South Region`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`East`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`East Region`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`West`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`West Region`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`using-multi-select-values-in-queries`,children:`Using Multi-Select Values in Queries`}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`multiple: true`}),` is enabled, the variable will contain an array of selected values. Use Jinja’s `,_jsx(_components.code,{children:`join`}),` filter to format these values for SQL queries:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SELECT * FROM customer_data`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` WHERE 1=1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {% if selected_regions %}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` AND CustomerRegion IN ('{{ selected_regions | join(\"','\") }}')`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {% endif %}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` LIMIT 100;`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`How it works:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`When users select `,_jsx(_components.code,{children:`['North', 'South']`}),`, the Jinja template transforms it to: `,_jsx(_components.code,{children:`'North','South'`})]}),`\n`,_jsxs(_components.li,{children:[`The final SQL becomes: `,_jsx(_components.code,{children:`AND CustomerRegion IN ('North','South')`})]}),`\n`,_jsx(_components.li,{children:`If no values are selected, the condition is skipped entirely`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`multi-select-with-sql-driven-options`,children:`Multi-Select with SQL-Driven Options`}),`\n`,_jsx(_components.p,{children:`You can also use SQL queries to populate multi-select dropdowns:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`product_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Select Products`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`selected_products`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` multiple`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sql`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SELECT DISTINCT ProductName`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` FROM products `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ORDER BY ProductName`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`searchable-dropdown-filters`,children:`Searchable Dropdown Filters`}),`\n`,_jsxs(_components.p,{children:[`By default, an SQL-driven dropdown fetches its full list of options once and then filters them `,_jsx(_components.strong,{children:`client-side`}),` as the user types. This is fine for short lists, but it does not scale to high-cardinality columns (thousands of customers, product references, IDs, etc.) where you cannot — or do not want to — load every value into the browser.`]}),`\n`,_jsxs(_components.p,{children:[`Setting `,_jsx(_components.code,{children:`use_input: true`}),` on an `,_jsx(_components.code,{children:`sql`}),` options block switches the dropdown to `,_jsx(_components.strong,{children:`server-side search`}),`. The text the user types into the dropdown’s search box is sent back to your options `,_jsx(_components.code,{children:`query`}),` as the `,_jsx(_components.code,{children:`search_term`}),` variable, so the database does the filtering and returns only matching rows.`]}),`\n`,_jsx(Heading,{level:`3`,id:`configuration-example-2`,children:`Configuration Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`order_reference_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Order Reference`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`order_reference`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` multiple`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sql`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` use_input`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SELECT DISTINCT order_reference`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` FROM orders`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` WHERE 1=1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {% if search_term %}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` AND order_reference LIKE '%{{ search_term }}%'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {% endif %}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` LIMIT 100`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`How it works:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`As the user types in the dropdown, the input is debounced (~300ms) and sent to the options `,_jsx(_components.code,{children:`query`}),` as `,_jsx(_components.code,{children:`search_term`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Wrap the search condition in `,_jsx(_components.code,{children:`{% if search_term %}`}),` so the query still returns a sensible initial list (e.g. the first 100 rows) before the user types anything.`]}),`\n`,_jsx(_components.li,{children:`The database returns only the matching values, which populate the dropdown. Because filtering happens server-side, client-side filtering is disabled for that dropdown.`}),`\n`,_jsxs(_components.li,{children:[`Always add a `,_jsx(_components.code,{children:`LIMIT`}),` to keep the result set small and responsive.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`search_term`}),` is only injected when `,_jsx(_components.code,{children:`use_input: true`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`use_input`}),` is only valid for `,_jsx(_components.code,{children:`type: sql`}),` options. Setting it on a `,_jsx(_components.code,{children:`type: static`}),` options block results in a validation error.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`use_input`}),` works for both single-select and multi-select (`,_jsx(_components.code,{children:`multiple: true`}),`) dropdowns.`]}),`\n`,_jsx(Heading,{level:`2`,id:`filter-dependencies`,children:`Filter Dependencies`}),`\n`,_jsx(_components.p,{children:`Filters can depend on other filters to create cascading filter effects. When one filter changes, dependent filters can update their options based on the selected value. This is particularly useful for hierarchical data like country/city relationships.`}),`\n`,_jsx(Heading,{level:`3`,id:`example-country-and-city-filters`,children:`Example: Country and City Filters`}),`\n`,_jsx(_components.p,{children:`In this example, the city filter’s options are limited based on the selected country:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`filters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`country_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Country`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`selected_country`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` default_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'USA'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sql`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SELECT DISTINCT country FROM locations ORDER BY country\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dropdown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`city_filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`City`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` affected_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`selected_city`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sql`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SELECT DISTINCT city FROM locations `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` WHERE 1=1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {% if selected_country is defined %}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` AND country = '{{ selected_country }}'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {% endif %}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ORDER BY city`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`key-points-for-filter-dependencies`,children:`Key Points for Filter Dependencies`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use conditional logic with `,_jsx(_components.code,{children:`{% if variable_name is defined %}`}),` to check if a filter value exists`]}),`\n`,_jsxs(_components.li,{children:[`Always include a fallback condition (like `,_jsx(_components.code,{children:`WHERE 1=1`}),`) to ensure valid SQL when no filters are applied`]}),`\n`,_jsx(_components.li,{children:`Dependent filters will automatically refresh when their parent filter changes`}),`\n`,_jsx(_components.li,{children:`You can chain multiple levels of dependencies (e.g., country → state → city)`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use descriptive titles and placeholders for better UX`}),`\n`,_jsx(_components.li,{children:`Use SQL-driven dropdowns for dynamic option lists`}),`\n`,_jsx(_components.li,{children:`Set sensible defaults to improve initial dashboard state`}),`\n`,_jsx(_components.li,{children:`Group filters logically on tabs for clarity`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See also: `,_jsx(_components.a,{href:`/reference/intelligent-apps/overview`,children:`Intelligent Apps Overview`}),`, `,_jsx(_components.a,{href:`/reference/intelligent-apps/charts`,children:`Chart Reference`})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Filters","description":"How to use filters for interactivity in Datazone Intelligent Apps.","href":"/reference/intelligent-apps/filters"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Filter Types","slug":"filter-types","depth":2,"children":[]},{"title":"Filter Configuration","slug":"filter-configuration","depth":2,"children":[{"title":"Example: Static Dropdown Filter","slug":"example-static-dropdown-filter","depth":3,"children":[]},{"title":"Example: SQL-Driven Dropdown Filter","slug":"example-sql-driven-dropdown-filter","depth":3,"children":[]},{"title":"Example: Date and Number Filters","slug":"example-date-and-number-filters","depth":3,"children":[]}]},{"title":"Using Filters in Queries","slug":"using-filters-in-queries","depth":2,"children":[]},{"title":"Multi-Select Dropdown Filters","slug":"multi-select-dropdown-filters","depth":2,"children":[{"title":"Configuration Example","slug":"configuration-example","depth":3,"children":[]},{"title":"Using Multi-Select Values in Queries","slug":"using-multi-select-values-in-queries","depth":3,"children":[]},{"title":"Multi-Select with SQL-Driven Options","slug":"multi-select-with-sql-driven-options","depth":3,"children":[]}]},{"title":"Searchable Dropdown Filters","slug":"searchable-dropdown-filters","depth":2,"children":[{"title":"Configuration Example","slug":"configuration-example-2","depth":3,"children":[]}]},{"title":"Filter Dependencies","slug":"filter-dependencies","depth":2,"children":[{"title":"Example: Country and City Filters","slug":"example-country-and-city-filters","depth":3,"children":[]},{"title":"Key Points for Filter Dependencies","slug":"key-points-for-filter-dependencies","depth":3,"children":[]}]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"datazone","siteName":"Datazone","title":"Filters - Datazone","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-25T15:58:16.064Z","originalFileLocation":"reference/intelligent-apps/filters.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to use filters for interactivity in Datazone Intelligent Apps.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Datazone\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Filters - Datazone\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to use filters for interactivity in Datazone Intelligent Apps.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Datazone\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.datazone.co/reference/intelligent-apps/filters\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://datazone.mintlify.site/_mintlify/api/og/v2?division=Intelligent+Apps\u0026amp;title=Filters\u0026amp;description=How+to+use+filters+for+interactivity+in+Datazone+Intelligent+Apps.\u0026amp;theme=c815b301431a747df6053b3c\u0026amp;signature=2e610ee4210ad9fd6abe3324a6ed98506753bc780d87fbb3501801f2f90bce19\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Filters - Datazone\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to use filters for interactivity in Datazone Intelligent Apps.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://datazone.mintlify.site/_mintlify/api/og/v2?division=Intelligent+Apps\u0026amp;title=Filters\u0026amp;description=How+to+use+filters+for+interactivity+in+Datazone+Intelligent+Apps.\u0026amp;theme=c815b301431a747df6053b3c\u0026amp;signature=2e610ee4210ad9fd6abe3324a6ed98506753bc780d87fbb3501801f2f90bce19\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/datazone/5td9R7ri96Mt6UN1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Datazone\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#E34F80\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.datazone.co/reference/intelligent-apps/filters\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/intelligent-apps/filters.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.datazone.co/#organization\",\"name\":\"Datazone\",\"url\":\"https://docs.datazone.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/datazone/yPfWMfb9oig-ubY2/logo/black.svg?fit=max\u0026auto=format\u0026n=yPfWMfb9oig-ubY2\u0026q=85\u0026s=5d4a144e52567326a111c04d35d95f68\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.datazone.co#website\",\"name\":\"Datazone\",\"url\":\"https://docs.datazone.co\",\"publisher\":{\"@id\":\"https://docs.datazone.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.datazone.co/reference/intelligent-apps/filters#webpage\",\"url\":\"https://docs.datazone.co/reference/intelligent-apps/filters\",\"name\":\"Filters\",\"description\":\"How to use filters for interactivity in Datazone Intelligent Apps.\",\"dateModified\":\"2026-06-25T15:58:16.064Z\",\"isPartOf\":{\"@id\":\"https://docs.datazone.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.datazone.co/reference/intelligent-apps/filters#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.datazone.co/reference/intelligent-apps/filters#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.datazone.co/reference/sources/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Intelligent Apps\",\"item\":\"https://docs.datazone.co/reference/intelligent-apps/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Filters\",\"item\":\"https://docs.datazone.co/reference/intelligent-apps/filters\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.datazone.co/reference/intelligent-apps/filters#article\",\"headline\":\"Filters\",\"name\":\"Filters\",\"description\":\"How to use filters for interactivity in Datazone Intelligent Apps.\",\"url\":\"https://docs.datazone.co/reference/intelligent-apps/filters\",\"mainEntityOfPage\":{\"@id\":\"https://docs.datazone.co/reference/intelligent-apps/filters#webpage\"},\"dateModified\":\"2026-06-25T15:58:16.064Z\",\"publisher\":{\"@id\":\"https://docs.datazone.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.datazone.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Datazone\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Datazone","nav":{"global":{"anchors":[{"anchor":"AI Skills","icon":"sparkles","href":"/ai-skills"},{"anchor":"Blog","icon":"newspaper","href":"https://www.datazone.co/blog"},{"anchor":"Change Log","icon":"history","href":"/changelog"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Key Concepts","href":"/key-concepts"},{"title":"Installation","href":"/installation"},{"title":"From Zero to Production!","sidebarTitle":"From Zero to Production","href":"/from-zero-to-production"}]},{"group":"Reference","pages":[{"group":"Data Ingestion","pages":[{"title":"Data Ingestion","href":"/reference/sources/overview"},{"title":"MySQL","href":"/reference/sources/mysql"},{"title":"Microsoft SQL Server","href":"/reference/sources/mssqlserver"},{"title":"Oracle","href":"/reference/sources/oracle"},{"title":"SAP HANA","href":"/reference/sources/sap-hana"},{"title":"PostgreSQL","href":"/reference/sources/postgresql"},{"title":"MongoDB","href":"/reference/sources/mongodb"},{"title":"AWS S3 CSV","href":"/reference/sources/aws-s3"},{"title":"Azure Blob Storage","href":"/reference/sources/azure-blob"},{"title":"Google BigQuery","href":"/reference/sources/bigquery"},{"title":"SAP ERP","href":"/reference/sources/sap-erp"},{"title":"SAP S/4HANA","href":"/reference/sources/sap-s4hana"},{"title":"SAP BW","href":"/reference/sources/sap-bw"},{"title":"HubSpot","href":"/reference/sources/hubspot"},{"title":"Salesforce","href":"/reference/sources/salesforce"},{"title":"SharePoint","href":"/reference/sources/sharepoint"},{"title":"OneDrive","href":"/reference/sources/onedrive"},{"title":"Google Drive","href":"/reference/sources/google-drive"}]},{"group":"Development","pages":[{"title":"Command Line","href":"/reference/development/command-line"},{"title":"Project Repository","href":"/reference/development/project"},{"title":"Pipeline","href":"/reference/development/pipeline"},{"title":"Transform","href":"/reference/development/transform"},{"title":"Context","href":"/reference/development/context"},{"title":"Variables","href":"/reference/development/variables"},{"title":"Actions","href":"/reference/development/actions"},{"title":"Widgets","href":"/reference/development/widgets"},{"title":"Vectors","href":"/reference/development/vectors"},{"title":"API Keys","href":"/reference/development/api-key"},{"title":"Access Keys","href":"/reference/development/access-keys"},{"title":"File Container","href":"/reference/development/file-container"},{"title":"Model Accounts","href":"/reference/development/model-accounts"},{"title":"Decision Models","href":"/reference/development/decision-models"},{"title":"Policy","href":"/reference/development/policy"},{"title":"Data Quality","href":"/reference/development/data-quality"}]},{"group":"Integration \u0026 APIs","pages":[{"title":"Overview","href":"/reference/integration/overview"},{"group":"Authentication","pages":[{"title":"API Key Authentication","href":"/reference/integration/authentication/api-key"},{"group":"SAML","pages":[{"title":"SAML Authentication","href":"/reference/integration/authentication/saml/overview"},{"title":"Azure AD (Entra ID) SAML Setup","href":"/reference/integration/authentication/saml/azure-ad"},{"title":"Okta SAML Setup","href":"/reference/integration/authentication/saml/okta"},{"title":"Google Workspace SAML Setup","href":"/reference/integration/authentication/saml/google-workspace"}]}]},{"title":"ODBC/JDBC Connections","href":"/reference/integration/odbc-jdbc-connection"},{"title":"Views","href":"/reference/integration/views"},{"title":"Endpoints","href":"/reference/integration/endpoints"}]},{"group":"Analysis","pages":[{"title":"Notebooks","href":"/reference/analysis/notebook"},{"title":"Kernels","href":"/reference/analysis/kernel"},{"title":"Toolkit","href":"/reference/analysis/toolkit"}]},{"group":"Intelligent Apps","pages":[{"title":"Overview","href":"/reference/intelligent-apps/overview"},{"title":"App Builder","href":"/reference/intelligent-apps/app-builder"},{"title":"Components","description":"Detailed reference for components in Datazone Intelligent Apps","href":"/reference/intelligent-apps/components"},{"title":"Filters","href":"/reference/intelligent-apps/filters"},{"title":"Variable Usage","description":"Examples of using variables and Jinja-style templating in Intelligent App queries.","href":"/reference/intelligent-apps/query-manipulation"},{"title":"Orion AI (LLM Assistant)","href":"/reference/intelligent-apps/orion-ai"},{"title":"YAML Reference","href":"/reference/intelligent-apps/yaml-reference"},{"title":"Embedding","href":"/reference/intelligent-apps/embedding"}]},{"group":"Studio Apps","pages":[{"title":"Overview","href":"/reference/studio-apps/overview"},{"title":"Getting Started","href":"/reference/studio-apps/getting-started"}]},{"group":"Knowledge Objects","pages":[{"title":"Overview","href":"/reference/knowledge-objects/overview"},{"title":"YAML Reference","href":"/reference/knowledge-objects/yaml-reference"},{"title":"Instance API","href":"/reference/knowledge-objects/api"},{"title":"Actions SDK","href":"/reference/knowledge-objects/actions-sdk"}]},{"group":"Flows","pages":[{"title":"Overview","href":"/reference/flows/overview"},{"title":"Node Reference","href":"/reference/flows/nodes"},{"title":"Triggers \u0026 Runs","href":"/reference/flows/triggers-and-runs"},{"title":"Templating \u0026 Expressions","href":"/reference/flows/templating"},{"title":"YAML Reference","href":"/reference/flows/yaml-reference"}]},{"group":"Agents","pages":[{"title":"Overview","href":"/reference/agents/overview"},{"title":"Chat Interface","href":"/reference/agents/chat"},{"title":"Embedding","href":"/reference/agents/embedding"},{"title":"Agent Evals","href":"/reference/agents/evaluations"},{"title":"Best Practices","href":"/reference/agents/best-practices"}]},{"group":"Platform","pages":[{"title":"Channels","href":"/reference/platform/channels"},{"title":"Reports","href":"/reference/platform/reports"},{"group":"Resources","pages":[{"title":"Resources Overview","href":"/reference/platform/resources/overview"},{"title":"Quotas","href":"/reference/platform/resources/quotas"}]}]},{"group":"UI Pages","pages":[{"title":"UI Overview","href":"/reference/ui/overview"},{"title":"SQL Explorer","href":"/reference/ui/sql-explorer"}]},{"title":"AI Skills","href":"/ai-skills"},{"title":"Change Logs","href":"/changelog"}]},{"group":"Deployment","pages":[{"group":"Datazone Editions","pages":[{"title":"Public Cloud","href":"/deployment/public-cloud"},{"title":"Private Cloud","href":"/deployment/private-cloud"}]}]},{"group":"Tutorial","pages":[{"title":"Datazone SDK","href":"/tutorial/datazone-sdk"},{"group":"Examples","pages":[{"title":"Building an AI-Powered Customer Response Automation System with Datazone","href":"/tutorial/examples/ai-powered-message-automation"},{"title":"Pyspark Examples in Datazone Transforms","sidebarTitle":"Pyspark Examples","href":"/tutorial/examples/pyspark-transform-examples"},{"title":"Pipeline Examples","href":"/tutorial/examples/pipeline-examples"}]}]}]}]},"basePath":"","title":"Filters - Datazone","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BcDCEkh6.js","dist-CwjSCXIK.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-eKJ4rcii.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}