Data source class for populating number range parameter options from a database table or query.This class can be imported from the squirrels.data_sources or the squirrels module.
Either the name of the table to use, or a SQL query to run. If using a SQL query, it must start with “SELECT” (ignoring case and leading whitespaces) followed by a whitespace.The available tables are based on the source argument. If the source is SourceEnum.CONNECTION, then the SQL syntax is based on the underlying database from the connection argument. Otherwise, the SQL syntax is DuckDB SQL.
Name of the connection to use. Only used if the source is SourceEnum.CONNECTION. Connection must be defined in squirrels.yml or the connections.py file.If None, uses the default connection (specified by SQRL_CONNECTIONS__DEFAULT_NAME_USED environment variable or ‘default’).
A NumberRangeDataSource object is created in the pyconfigs/parameters.py file. It must be created in a function decorated with the create_from_source factory method from NumberRangeParameter.
from squirrels import parameters as p, data_sources as ds@p.NumberRangeParameter.create_from_source( name="price_range", label="Price Range", description="Filter products by price range")def price_range_source(): return ds.NumberRangeDataSource( table_or_query=""" SELECT 0 AS min_price, 1000 AS max_price, 10 AS price_step, 100 AS default_lower, 500 AS default_upper """, min_value_col="min_price", max_value_col="max_price", increment_col="price_step", default_lower_value_col="default_lower", default_upper_value_col="default_upper" )
In addition, the following are some additional examples for creating a NumberRangeDataSource object.
Enabling cascading effects with a parent parameter
In this example, the range constraints and defaults are determined by the selected value of another parameter called “product_category”.
@p.NumberRangeParameter.create_from_source( name="quantity_range", label="Quantity Range", description="The quantity range for the selected category", parent_name="product_category")def quantity_range_source(): return ds.NumberRangeDataSource( table_or_query="category_quantity_ranges", min_value_col="min_quantity", max_value_col="max_quantity", increment_col="quantity_increment", default_lower_value_col="default_min_qty", default_upper_value_col="default_max_qty", parent_id_col="category_id" # Cascades based on category selection )
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Squirrels Docs","colors":{"primary":"#B85707","light":"#EF9750","dark":"#9B4907"},"logo":{"light":"https://mintcdn.com/squirrels/kzLxoqeVmuUz8Q-T/images/logo/light.svg?fit=max\u0026auto=format\u0026n=kzLxoqeVmuUz8Q-T\u0026q=85\u0026s=d41cdc5597d9b7eebba9bb463f096f13","dark":"https://mintcdn.com/squirrels/kzLxoqeVmuUz8Q-T/images/logo/dark.svg?fit=max\u0026auto=format\u0026n=kzLxoqeVmuUz8Q-T\u0026q=85\u0026s=3d943a615801d6adedb350645121d13c"},"favicon":"/images/logo/main.svg","navbar":{"links":[{"label":"Support","href":"mailto:support@pysquirrels.com"}],"primary":{"type":"button","label":"GitHub","href":"https://github.com/squirrels-analytics/squirrels"}},"footer":{"socials":{"github":"https://github.com/squirrels-analytics/squirrels"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"squirrels","hasAudioNarration":false,"actualSubdomain":"squirrels","customDomains":["docs.pysquirrels.com"],"gitSource":{"type":"github","owner":"squirrels-analytics","repo":"squirrels-docs","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e8e6bd0a90f91cb49fad","collectionId":"66b2804e-2ab5-4098-a17d-9ed84140e44f","schemaVersion":"v2"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6a21e8e6bd0a90f91cb49fad:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"References","count":54},{"language":"default","tag":"Python reference","count":45},{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"Project files","count":14},{"language":"default","tag":"CLI reference","count":9},{"language":"default","tag":"CLI commands","count":8},{"language":"default","tag":"types","count":8},{"language":"default","tag":"Concepts","count":7},{"language":"default","tag":"arguments","count":7},{"language":"default","tag":"data_sources","count":7}]},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":".home-page{max-width:1000px;margin:0 auto;padding:0 24px 80px}.home-section-title,.home-title{text-align:left;margin-bottom:24px}.home-title{margin-top:24px;font-size:3rem;color:#555}.dark .home-title{color:#fff}.home-section-title{margin-top:48px;font-size:2rem}.dark .home-section-title{color:#eee}.home-description{text-align:left;font-size:1.25rem;max-width:700px;margin-left:auto;margin-right:auto}.dark .home-description{color:#ddd}.card:not(:hover){border-color:#bbb}.home-hero{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:24px;align-items:start}.home-hero-right pre{margin:0}.home-terminal{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#f8fafc}.dark .home-terminal{border-color:#374151;background:#0b1222}.home-terminal-header{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px;background:#eef2f7;border-bottom:1px solid #e5e7eb}.dark .home-terminal-header{background:#555;border-bottom-color:#424242}.home-terminal-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.home-terminal-dot--red{background:#ff5f56}.home-terminal-dot--yellow{background:#ffbd2e}.home-terminal-dot--green{background:#27c93f}.home-terminal-title{margin-left:auto;font-size:.85rem;color:#6b7280}.dark .home-terminal-title{color:#c7c7c7}.home-code{overflow:auto;padding:16px 20px;background:#f5f7fa;border:1px solid #e5e7eb;font-size:.95rem;line-height:1.6}.dark .home-code{background:#444;border-color:#424242}.home-hero-left .home-description{margin-left:0;margin-right:0}.home-code .comment{color:#6a9955}.home-code .command{color:#569cd6;font-weight:700}.home-code .command::before{content:\"$ \";color:#888;font-weight:400}.home-get-started-btn{display:inline-block;margin-top:24px;padding:12px 32px;background-color:#9b4907;color:#fff;text-decoration:none;border-radius:8px;font-weight:600;font-size:16px;transition:background-color .2s}@media (max-width:650px){.home-hero{grid-template-columns:1fr}}"}],"page":{"pagePath":"references/python/data_sources/numberrangedatasource","slug":"/references/python/data_sources/numberrangedatasource","pageMetadata":{"title":"NumberRangeDataSource","tag":"class","description":"Lookup table for number range parameter options","href":"/references/python/data_sources/numberrangedatasource","hidden":false},"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: \"Lookup table for number range parameter options\"\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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Data source class for populating number range parameter options from a database table or query.`}),`\n`,_jsxs(_components.p,{children:[`This class can be imported from the `,_jsx(_components.code,{children:`squirrels.data_sources`}),` or the `,_jsx(_components.code,{children:`squirrels`}),` module.`]}),`\n`,_jsx(Heading,{level:`2`,id:`constructor`,children:`Constructor`}),`\n`,_jsxs(_components.p,{children:[`Creates a `,_jsx(_components.code,{children:`NumberRangeDataSource`}),` object.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` __init__`}),_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\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`table_or_query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`min_value_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`max_value_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`increment_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`default_lower_value_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_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\":`#9CDCFE`},children:` default_upper_value_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_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\":`#9CDCFE`},children:` source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: SourceEnum `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SourceEnum.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CONNECTION`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user_group_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_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\":`#9CDCFE`},children:` parent_id_col`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`]})})}),`\n`,_jsxs(Expandable,{title:`arguments`,defaultOpen:true,children:[_jsxs(ResponseField,{name:`table_or_query`,type:`str`,required:true,id:`param-table-or-query`,children:[_jsx(_components.p,{children:`Either the name of the table to use, or a SQL query to run. If using a SQL query, it must start with “SELECT” (ignoring case and leading whitespaces) followed by a whitespace.`}),_jsxs(_components.p,{children:[`The available tables are based on the `,_jsx(_components.code,{children:`source`}),` argument. If the source is `,_jsx(_components.code,{children:`SourceEnum.CONNECTION`}),`, then the SQL syntax is based on the underlying database from the `,_jsx(_components.code,{children:`connection`}),` argument. Otherwise, the SQL syntax is DuckDB SQL.`]})]}),_jsx(ResponseField,{name:`min_value_col`,type:`str`,required:true,id:`param-min-value-col`,children:_jsx(_components.p,{children:`The column name for the minimum value constraint.`})}),_jsx(ResponseField,{name:`max_value_col`,type:`str`,required:true,id:`param-max-value-col`,children:_jsx(_components.p,{children:`The column name for the maximum value constraint.`})}),_jsx(ResponseField,{name:`increment_col`,type:`str | None`,default:`None`,id:`param-increment-col`,children:_jsx(_components.p,{children:`The column name for the increment/step value. If None, defaults to 1.`})}),_jsx(ResponseField,{name:`default_lower_value_col`,type:`str | None`,default:`None`,id:`param-default-lower-value-col`,children:_jsx(_components.p,{children:`The column name for the default lower value of the range. If None, defaults to the minimum value.`})}),_jsx(ResponseField,{name:`default_upper_value_col`,type:`str | None`,default:`None`,id:`param-default-upper-value-col`,children:_jsx(_components.p,{children:`The column name for the default upper value of the range. If None, defaults to the maximum value.`})}),_jsx(ResponseField,{name:`source`,type:`SourceEnum`,default:`SourceEnum.CONNECTION`,id:`param-source`,children:_jsxs(_components.p,{children:[`The source to fetch data from as a `,_jsx(_components.a,{href:`/references/python/data_sources/sourceenum`,children:`SourceEnum`}),` value.`]})}),_jsx(ResponseField,{name:`user_group_col`,type:`str | None`,default:`None`,id:`param-user-group-col`,children:_jsx(_components.p,{children:`The column name of the user group for option visibility. If None, all users will see all options.`})}),_jsxs(ResponseField,{name:`parent_id_col`,type:`str | None`,default:`None`,id:`param-parent-id-col`,children:[_jsx(_components.p,{children:`The column name of the parent option id for cascading.`}),_jsx(_components.p,{children:`If None, then this parameter has no parent and its options will not be cascaded.`})]}),_jsxs(ResponseField,{name:`connection`,type:`str | None`,default:`None`,id:`param-connection`,children:[_jsxs(_components.p,{children:[`Name of the connection to use. Only used if the source is `,_jsx(_components.code,{children:`SourceEnum.CONNECTION`}),`. Connection must be defined in `,_jsx(_components.code,{children:`squirrels.yml`}),` or the `,_jsx(_components.code,{children:`connections.py`}),` file.`]}),_jsxs(_components.p,{children:[`If None, uses the default connection (specified by `,_jsx(_components.code,{children:`SQRL_CONNECTIONS__DEFAULT_NAME_USED`}),` environment variable or ‘default’).`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`NumberRangeDataSource`}),` object is created in the `,_jsx(_components.code,{children:`pyconfigs/parameters.py`}),` file. It must be created in a function decorated with the `,_jsx(_components.code,{children:`create_from_source`}),` factory method from `,_jsx(_components.a,{href:`/references/python/parameters/numberrangeparameter`,children:`NumberRangeParameter`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`usage-example-in-parameters-py`,children:`Usage example in parameters.py`}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]`,numberOfLines:`23`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` squirrels `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` parameters `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p, data_sources `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ds`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@p.NumberRangeParameter.create_from_source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"price_range\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Price Range\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Filter products by price range\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` price_range_source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ds.NumberRangeDataSource(`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` table_or_query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"\"`})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SELECT `})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 0 AS min_price,`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1000 AS max_price,`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 10 AS price_step,`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 100 AS default_lower,`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 500 AS default_upper`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` min_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"min_price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"max_price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` increment_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"price_step\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_lower_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default_lower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_upper_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default_upper\"`})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`In addition, the following are some additional examples for creating a `,_jsx(_components.code,{children:`NumberRangeDataSource`}),` object.`]}),`\n`,_jsx(Heading,{level:`3`,id:`using-a-table-from-a-specific-connection`,children:`Using a table from a specific connection`}),`\n`,_jsx(_components.p,{children:`This example uses a table called “range_configs” from the “config_db” connection.`}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[2,7]`,numberOfLines:`8`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ds.NumberRangeDataSource(`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` table_or_query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"range_configs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` min_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"min_value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"max_value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_lower_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default_min\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_upper_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default_max\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"config_db\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The connection must either be defined in `,_jsx(_components.code,{children:`squirrels.yml`}),` or the `,_jsx(_components.code,{children:`connections.py`}),` file.`]}),`\n`,_jsx(Heading,{level:`3`,id:`using-seeds-as-the-data-source`,children:`Using seeds as the data source`}),`\n`,_jsx(_components.p,{children:`This example uses a seed file called “number_range_config”.`}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[2,7]`,numberOfLines:`8`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ds.NumberRangeDataSource(`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` table_or_query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"number_range_config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` min_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"minimum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"maximum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_lower_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lower_default\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_upper_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"upper_default\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` source`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ds.SourceEnum.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`SEEDS`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`enabling-cascading-effects-with-a-parent-parameter`,children:`Enabling cascading effects with a parent parameter`}),`\n`,_jsx(_components.p,{children:`In this example, the range constraints and defaults are determined by the selected value of another parameter called “product_category”.`}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[5,15]`,numberOfLines:`16`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@p.NumberRangeParameter.create_from_source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quantity_range\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Quantity Range\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The quantity range for the selected category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` parent_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_category\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` quantity_range_source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ds.NumberRangeDataSource(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` table_or_query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"category_quantity_ranges\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` min_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"min_quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"max_quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` increment_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quantity_increment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_lower_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default_min_qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_upper_value_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default_max_qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` parent_id_col`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"category_id\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Cascades based on category selection`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})})]})}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":"NumberRangeDataSource","tag":"class","description":"Lookup table for number range parameter options","href":"/references/python/data_sources/numberrangedatasource","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Constructor","slug":"constructor","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Usage example in parameters.py","slug":"usage-example-in-parameters-py","depth":3,"children":[]},{"title":"Using a table from a specific connection","slug":"using-a-table-from-a-specific-connection","depth":3,"children":[]},{"title":"Using seeds as the data source","slug":"using-seeds-as-the-data-source","depth":3,"children":[]},{"title":"Enabling cascading effects with a parent parameter","slug":"enabling-cascading-effects-with-a-parent-parameter","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"squirrels","siteName":"Squirrels Docs","title":"NumberRangeDataSource - Squirrels Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-22T03:43:22.660Z","originalFileLocation":"references/python/data_sources/numberrangedatasource.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=\"Lookup table for number range parameter options\">\u003cmeta data-mint-head name=\"application-name\" content=\"Squirrels Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_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/squirrels/bgo-igKLFZgRQQUf/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"NumberRangeDataSource - Squirrels Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Lookup table for number range parameter options\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Squirrels Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://squirrels.mintlify.app/_mintlify/api/og/v2?division=data_sources\u0026amp;title=NumberRangeDataSource\u0026amp;description=Lookup+table+for+number+range+parameter+options\u0026amp;theme=253625986c7ee4cbda5aacec\u0026amp;signature=18dad2fcbbd8b3004b09206c89a0c5348e6fa8f7b140fac9faba9f9e83ce1d8f\">\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=\"NumberRangeDataSource - Squirrels Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Lookup table for number range parameter options\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://squirrels.mintlify.app/_mintlify/api/og/v2?division=data_sources\u0026amp;title=NumberRangeDataSource\u0026amp;description=Lookup+table+for+number+range+parameter+options\u0026amp;theme=253625986c7ee4cbda5aacec\u0026amp;signature=18dad2fcbbd8b3004b09206c89a0c5348e6fa8f7b140fac9faba9f9e83ce1d8f\">\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/squirrels/bgo-igKLFZgRQQUf/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Squirrels Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#B85707\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/references/python/data_sources/numberrangedatasource.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pysquirrels.com/#organization\",\"name\":\"Squirrels Docs\",\"url\":\"https://docs.pysquirrels.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/squirrels/kzLxoqeVmuUz8Q-T/images/logo/light.svg?fit=max\u0026auto=format\u0026n=kzLxoqeVmuUz8Q-T\u0026q=85\u0026s=d41cdc5597d9b7eebba9bb463f096f13\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pysquirrels.com#website\",\"name\":\"Squirrels Docs\",\"url\":\"https://docs.pysquirrels.com\",\"publisher\":{\"@id\":\"https://docs.pysquirrels.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource#webpage\",\"url\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource\",\"name\":\"NumberRangeDataSource\",\"description\":\"Lookup table for number range parameter options\",\"dateModified\":\"2026-01-22T03:43:22.660Z\",\"isPartOf\":{\"@id\":\"https://docs.pysquirrels.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"data_sources\",\"item\":\"https://docs.pysquirrels.com/references/python/data_sources/sourceenum\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NumberRangeDataSource\",\"item\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource#article\",\"headline\":\"NumberRangeDataSource\",\"name\":\"NumberRangeDataSource\",\"description\":\"Lookup table for number range parameter options\",\"url\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pysquirrels.com/references/python/data_sources/numberrangedatasource#webpage\"},\"dateModified\":\"2026-01-22T03:43:22.660Z\",\"publisher\":{\"@id\":\"https://docs.pysquirrels.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pysquirrels.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Squirrels Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Squirrels Docs","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Documentation","pages":[{"title":"Documentation","href":"/intro"}]},{"tab":"References","anchors":[{"anchor":"Python reference","icon":"python","pages":[{"title":"Overview","href":"/references/python"},{"title":"SquirrelsProject","tag":"class","href":"/references/python/squirrelsproject"},{"group":"arguments","icon":"folder","tag":"module","pages":[{"title":"AuthProviderArgs","tag":"class","href":"/references/python/arguments/authproviderargs"},{"title":"BuildModelArgs","tag":"class","href":"/references/python/arguments/buildmodelargs"},{"title":"ConnectionsArgs","tag":"class","href":"/references/python/arguments/connectionsargs"},{"title":"ContextArgs","tag":"class","href":"/references/python/arguments/contextargs"},{"title":"DashboardArgs","tag":"class","href":"/references/python/arguments/dashboardargs"},{"title":"ModelArgs","tag":"class","href":"/references/python/arguments/modelargs"},{"title":"ParametersArgs","tag":"class","href":"/references/python/arguments/parametersargs"}]},{"group":"auth","icon":"folder","tag":"module","pages":[{"title":"provider","tag":"function","href":"/references/python/auth/provider"},{"title":"CustomUserFields","tag":"class","href":"/references/python/auth/customuserfields"},{"title":"ProviderConfigs","tag":"class","href":"/references/python/auth/providerconfigs"},{"title":"RegisteredUser","tag":"class","href":"/references/python/auth/registereduser"}]},{"group":"connections","icon":"folder","tag":"module","pages":[{"title":"ConnectionProperties","tag":"class","href":"/references/python/connections/connectionproperties"},{"title":"ConnectionTypeEnum","tag":"enum","href":"/references/python/connections/connectiontypeenum"}]},{"group":"parameters","icon":"folder","tag":"module","pages":[{"title":"SingleSelectParameter","tag":"class","href":"/references/python/parameters/singleselectparameter"},{"title":"MultiSelectParameter","tag":"class","href":"/references/python/parameters/multiselectparameter"},{"title":"DateParameter","tag":"class","href":"/references/python/parameters/dateparameter"},{"title":"DateRangeParameter","tag":"class","href":"/references/python/parameters/daterangeparameter"},{"title":"NumberParameter","tag":"class","href":"/references/python/parameters/numberparameter"},{"title":"NumberRangeParameter","tag":"class","href":"/references/python/parameters/numberrangeparameter"},{"title":"TextParameter","tag":"class","href":"/references/python/parameters/textparameter"}]},{"group":"parameter_options","icon":"folder","tag":"module","pages":[{"title":"SelectParameterOption","tag":"class","href":"/references/python/parameter_options/selectparameteroption"},{"title":"DateParameterOption","tag":"class","href":"/references/python/parameter_options/dateparameteroption"},{"title":"DateRangeParameterOption","tag":"class","href":"/references/python/parameter_options/daterangeparameteroption"},{"title":"NumberParameterOption","tag":"class","href":"/references/python/parameter_options/numberparameteroption"},{"title":"NumberRangeParameterOption","tag":"class","href":"/references/python/parameter_options/numberrangeparameteroption"},{"title":"TextParameterOption","tag":"class","href":"/references/python/parameter_options/textparameteroption"}]},{"group":"data_sources","icon":"folder","tag":"module","pages":[{"title":"SourceEnum","tag":"enum","href":"/references/python/data_sources/sourceenum"},{"title":"SelectDataSource","tag":"class","href":"/references/python/data_sources/selectdatasource"},{"title":"DateDataSource","tag":"class","href":"/references/python/data_sources/datedatasource"},{"title":"DateRangeDataSource","tag":"class","href":"/references/python/data_sources/daterangedatasource"},{"title":"NumberDataSource","tag":"class","description":"Lookup table for number parameter options","href":"/references/python/data_sources/numberdatasource"},{"title":"NumberRangeDataSource","tag":"class","href":"/references/python/data_sources/numberrangedatasource"},{"title":"TextDataSource","tag":"class","description":"Lookup table for text parameter options","href":"/references/python/data_sources/textdatasource"}]},{"group":"dashboards","icon":"folder","tag":"module","pages":[{"title":"PngDashboard","tag":"class","href":"/references/python/dashboards/pngdashboard"},{"title":"HtmlDashboard","tag":"class","href":"/references/python/dashboards/htmldashboard"}]},{"group":"types","icon":"folder","tag":"module","pages":[{"title":"Dashboard","tag":"abstract","href":"/references/python/types/dashboard"},{"title":"DataSource","tag":"abstract","href":"/references/python/types/datasource"},{"title":"ParameterOption","tag":"abstract","href":"/references/python/types/parameteroption"},{"title":"Parameter","tag":"abstract","href":"/references/python/types/parameter"},{"title":"DatasetMetadata","tag":"class","href":"/references/python/types/datasetmetadata"},{"title":"DatasetResult","tag":"class","href":"/references/python/types/datasetresult"},{"title":"FastAPIComponents","tag":"dataclass","href":"/references/python/types/fastapicomponents"},{"title":"TextValue","tag":"class","href":"/references/python/types/textvalue"}]}]},{"anchor":"CLI reference","icon":"terminal","pages":[{"title":"CLI reference","href":"/references/cli"}]}]},{"tab":"How-to Guides","pages":[{"title":"How-to Guides","href":"/guides/mcp-clients"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/releases/v0-6-0"}]}]},"basePath":"","title":"NumberRangeDataSource - Squirrels Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}