The Query Result To Scalar orchestration component allows you to query a table and return a scalar value. This value can then be mapped to a project or pipeline variable for use in other pipeline components.This component is the scalar equivalent of the Query Result To Grid component.
Properties
Snowflake
Databricks
Amazon Redshift
Google BigQuery
string
required
Enter a human-readable name for the component.
drop-down
required
Basic: This mode will build a query for you using settings from the Data Source, Data Selection, and Data Source Filter parameters. In most cases, this mode will be sufficient.
Advanced: This mode will require you to write an SQL-like query to call data from Snowflake. The available fields and their descriptions are documented in the data model.
string
required
The Snowflake database. The special value [Environment Default] uses the database defined in the environment. Read Databases, Tables and Views - Overview to learn more.
drop-down
required
The Snowflake schema. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.
string
required
The name of the table to be queried.
object selector
required
Select columns to return from the table.
object selector
Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.
drop-down
required
Select whether rows are sorted in Ascending or Descending order.
integer
required
Set the limit of returned rows.
column editor
Input Column Name: Select an input column. The available input columns vary depending upon the data source.
Qualifier:
Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.
Comparator: Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character % to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.
Value: The value to be compared.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Filter Conditions dialog.
drop-down
required
Select whether to use the defined filters in combination with one another according to either And or Or.
code editor
required
This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.This property is only available when Mode is set to Advanced.
Do not end SQL statements with a semicolon in this component.
Examples:Single scalar, e.g. count of movies:
SELECT COUNT(*) FROM my_database.my_schema.movies
Single value with a filter:
SELECT MAX(release_year) FROM my_database.my_schema.movies WHERE genre = 'Comedy'
Multiple columns → multiple scalar variables:
SELECT COUNT(*) AS total_movies, AVG(rating) AS avg_rating, MAX(box_office) AS top_grossingFROM my_database.my_schema.moviesWHERE release_year = 2025
Scalar results from the SQL query can be mapped to project and pipeline variables.Use the Input Column Name drop-down to select a scalar returned by the query. Use the Scalar Variable Name drop-down to select a variable to map the scalar to. Click + to add more mappings.
Variables used in the mapping must be created before this component runs. Read Project and pipeline variables for details of how to create variables.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Scalar Variable Mapping dialog.
string
required
Enter a human-readable name for the component.
drop-down
required
Basic: This mode will build a query for you using settings from the Data Source, Data Selection, and Data Source Filter parameters. In most cases, this mode will be sufficient.
Advanced: This mode will require you to write an SQL-like query to call data from Databricks. The available fields and their descriptions are documented in the data model.
drop-down
required
Select a Databricks Unity Catalog. The special value [Environment Default] uses the catalog defined in the environment. Selecting a catalog will determine which databases are available in the next parameter.
drop-down
required
The Databricks schema. The special value [Environment Default] uses the schema defined in the environment. Read Create and manage schemas to learn more.
drop-down
required
The name of the table to be queried.
object selector
required
Select columns to return from the table.
object selector
Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.
drop-down
required
Select whether rows are sorted in Ascending or Descending order.
integer
required
Set the limit of returned rows.
column editor
Input Column Name: Select an input column. The available input columns vary depending upon the data source.
Qualifier:
Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.
Comparator: Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character % to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.
Value: The value to be compared.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Filter Conditions dialog.
drop-down
required
Select whether to use the defined filters in combination with one another according to either And or Or.
code editor
required
This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.This property is only available when Mode is set to Advanced.
Do not end SQL statements with a semicolon in this component.
Examples:Single scalar, e.g. count of movies:
SELECT COUNT(*) FROM my_catalog.my_schema.movies
Single value with a filter:
SELECT MAX(release_year) FROM my_catalog.my_schema.movies WHERE genre = 'Comedy'
Multiple columns → multiple scalar variables:
SELECT COUNT(*) AS total_movies, AVG(rating) AS avg_rating, MAX(box_office) AS top_grossingFROM my_catalog.my_schema.moviesWHERE release_year = 2025
Scalar results from the SQL query can be mapped to project and pipeline variables.Use the Input Column Name drop-down to select a scalar returned by the query. Use the Scalar Variable Name drop-down to select a variable to map the scalar to. Click + to add more mappings.
Variables used in the mapping must be created before this component runs. Read Project and pipeline variables for details of how to create variables.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Scalar Variable Mapping dialog.
string
required
Enter a human-readable name for the component.
drop-down
required
Basic: This mode will build a query for you using settings from the Data Source, Data Selection, and Data Source Filter parameters. In most cases, this mode will be sufficient.
Advanced: This mode will require you to write an SQL-like query to call data from Redshift. The available fields and their descriptions are documented in the data model.
drop-down
required
Select the table schema. The special value [Environment Default] uses the schema defined in the environment. For more information on using multiple schemas, read Schemas.
string
required
The name of the table to be queried.
object selector
required
Select columns to return from the table.
object selector
Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.
drop-down
required
Select whether rows are sorted in Ascending or Descending order.
integer
required
Set the limit of returned rows.
column editor
Input Column Name: Select an input column. The available input columns vary depending upon the data source.
Qualifier:
Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.
Comparator: Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character % to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.
Value: The value to be compared.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Filter Conditions dialog.
drop-down
required
Select whether to use the defined filters in combination with one another according to either And or Or.
code editor
required
This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.This property is only available when Mode is set to Advanced.
Do not end SQL statements with a semicolon in this component.
Examples:Single scalar, e.g. count of movies:
SELECT COUNT(*) FROM my_schema.movies
Single value with a filter:
SELECT MAX(release_year) FROM my_schema.movies WHERE genre = 'Comedy'
Multiple columns → multiple scalar variables:
SELECT COUNT(*) AS total_movies, AVG(rating) AS avg_rating, MAX(box_office) AS top_grossingFROM my_schema.moviesWHERE release_year = 2025
Scalar results from the SQL query can be mapped to project and pipeline variables.Use the Input Column Name drop-down to select a scalar returned by the query. Use the Scalar Variable Name drop-down to select a variable to map the scalar to. Click + to add more mappings.
Variables used in the mapping must be created before this component runs. Read Project and pipeline variables for details of how to create variables.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Scalar Variable Mapping dialog.
string
required
Enter a human-readable name for the component.
drop-down
required
Basic: This mode will build a query for you using settings from the Data Source, Data Selection, and Data Source Filter parameters. In most cases, this mode will be sufficient.
Advanced: This mode will require you to write an SQL-like query to call data from BigQuery. The available fields and their descriptions are documented in the data model.
drop-down
required
The Google Cloud project that owns the BigQuery dataset. The special value [Environment Default] uses the Google Cloud project defined in the environment. For more information, read Creating projects.
drop-down
required
The Google BigQuery dataset containing the table to query. The special value [Environment Default] uses the dataset defined in the environment.
string
required
The name of the table to be queried. Type a name, or select from the drop-down.
object selector
required
Select columns to return from the table.
object selector
Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.
drop-down
required
Select whether rows are sorted in Ascending or Descending order.
integer
required
Set the limit of returned rows.
column editor
Input Column Name: Select an input column. The available input columns vary depending upon the data source.
Qualifier:
Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.
Comparator: Choose a method of comparing the column to the value. Possible comparators include:
Less than
Less than or equal to
Equal to
Greater than
Greater than or equal to
Like
Ilike
Similar to
Null
Blank
Null or blank
“Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character % to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.
Value: The value to be compared.
To use grid variables, toggle Use Grid Variable on. For more information, read Grid variables.Toggle Text mode on at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read Text mode.
drop-down
required
Select whether to use the defined filters in combination with one another according to either And or Or.
code editor
required
This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.This property is only available when Mode is set to Advanced.
Do not end SQL statements with a semicolon in this component.
Examples:Single scalar, e.g. count of movies:
SELECT COUNT(*) FROM my_project.my_dataset.movies
Single value with a filter:
SELECT MAX(release_year) FROM my_project.my_dataset.movies WHERE genre = 'Comedy'
Multiple columns → multiple scalar variables:
SELECT COUNT(*) AS total_movies, AVG(rating) AS avg_rating, MAX(box_office) AS top_grossingFROM my_project.my_dataset.moviesWHERE release_year = 2025
Scalar results from the SQL query can be mapped to project and pipeline variables.Use the Input Column Name drop-down to select a scalar returned by the query. Use the Scalar Variable Name drop-down to select a variable to map the scalar to. Click + to add more mappings.
Variables used in the mapping must be created before this component runs. Read variables for details of how to create variables.
To use grid variables, toggle Use Grid Variable on. For more information, read Grid variables.Toggle Text mode on at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read Text mode.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Maia Documentation","colors":{"primary":"#001f1d","light":"#20514e","dark":"#001f1d"},"logo":{"light":"https://mintcdn.com/matillion/GyuNBHAx-GXnVlKX/images/maia-by-matillion-light.svg?fit=max\u0026auto=format\u0026n=GyuNBHAx-GXnVlKX\u0026q=85\u0026s=2c48b854f858c5a835450b3f34360db7","dark":"https://mintcdn.com/matillion/GyuNBHAx-GXnVlKX/images/maia-by-matillion-dark.svg?fit=max\u0026auto=format\u0026n=GyuNBHAx-GXnVlKX\u0026q=85\u0026s=88f8d1e1b1931cefd35c233a56cafe0a","href":"https://docs.maia.ai/"},"favicon":{"light":"https://mintcdn.com/matillion/0xM0A92Owv1nZXX1/images/maia-favicon-dark-green.png?fit=max\u0026auto=format\u0026n=0xM0A92Owv1nZXX1\u0026q=85\u0026s=356295fc83c5c6d1ed4aac2573ae45b1","dark":"https://mintcdn.com/matillion/0xM0A92Owv1nZXX1/images/maia-favicon-white.png?fit=max\u0026auto=format\u0026n=0xM0A92Owv1nZXX1\u0026q=85\u0026s=8709fc6d370155352cb6a4b5bbdd59d6"},"appearance":{"default":"light","strict":true},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://support.matillion.com/s/","label":"Support"}],"primary":{"type":"button","label":"Book your Maia demo","href":"https://www.maia.ai/book-a-demo"}},"footer":{"socials":{"x":"https://x.com/matillion","facebook":"https://www.facebook.com/matillion","youtube":"https://www.youtube.com/user/MatillionVideos","linkedin":"https://www.linkedin.com/company/matillion-limited","instagram":"https://www.instagram.com/matillion_"},"links":[{"header":"Maia","items":[{"label":"Maia.ai","href":"https://maia.ai"},{"label":"Academy","href":"https://academy.matillion.com"},{"label":"Exchange","href":"https://exchange.matillion.com/"},{"label":"Roadmap","href":"https://roadmap.matillion.com/"},{"label":"Support","href":"https://support.matillion.com/s"},{"label":"YouTube","href":"https://www.youtube.com/@Matillion"}]},{"header":"Matillion","items":[{"label":"Matillion.com","href":"https://matillion.com"},{"label":"Status","href":"https://status.matillion.com/"},{"label":"News","href":"https://www.matillion.com/news"},{"label":"Legal","href":"https://www.matillion.com/legal"},{"label":"Trust Center","href":"https://www.matillion.com/trust-center"}]}]},"seo":{"metatags":{"google-site-verification":"0VLXGRESICGHnU66TdhEgUMBRRubPnW8JTkzOpiiNn0"}},"fonts":{"heading":{"family":"Inter, system-ui"},"body":{"family":"Inter, system-ui"}},"integrations":{"ga4":{"measurementId":"G-6T2W93NTXW"},"posthog":{"apiKey":"phc_ky6YtuQApuXUkdApnVTY5PrjvnHx7EQGtYyRVSd9G535","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["claude","chatgpt","perplexity","copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"matillion","hasAudioNarration":false,"actualSubdomain":"matillion","customDomains":["docs.maia.ai"],"gitSource":{"type":"github","owner":"matillion","repo":"maia-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af73146bd8b0362cded8904","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Components","count":356},{"language":"default","tag":"Guides","count":210},{"language":"default","tag":"Connectors","count":188},{"language":"default","tag":"API Reference","count":128},{"language":"default","tag":"Endpoints","count":113},{"language":"default","tag":"Orchestration","count":94},{"language":"default","tag":"Admin","count":70},{"language":"default","tag":"Transformation","count":69},{"language":"default","tag":"Runners","count":51},{"language":"default","tag":"Streaming","count":34}],"searchSettings":{"showContentSnippets":false}},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#navbar .bg-background-light,#navbar .bg-background-dark{background-color:#001f1d!important}#navbar a,#navbar button,#navbar span,#navbar p{color:white!important}#navbar svg{color:white!important;stroke:white!important}#navbar #topbar-cta-button a,#navbar #topbar-cta-button a span,#navbar #topbar-cta-button svg{color:#001f1d!important}#navbar #topbar-cta-button a{font-weight:600!important}:root:not(.dark) #search-bar-entry,:root:not(.dark) #nav-anchor,:root:not(.dark) #navbar .navbar-link,:root:not(.dark) .nav-anchor{background-color:#0a3d39!important;border-radius:9999px!important}#topbar-cta-button a span.bg-primary-dark{background:#ffc700!important;border-radius:9999px!important}#navbar svg.bg-gray-500{background-color:white!important}#navbar button.lg\\:hidden div.font-semibold{color:white!important}#navbar button.lg\\:hidden div.text-gray-500 svg{color:white!important;stroke:white!important}#navbar img.nav-logo{content:url('/images/maia-by-matillion-light.svg');height:50px!important;width:auto!important}#footer img.nav-logo{content:url('/images/maia-by-matillion-dark.svg');height:80px!important;width:auto!important}#pagination{display:none}#navigation-items>div{padding-bottom:4rem!important}#navbar a[data-active=\"true\"] div.h-px{height:4px!important;background-color:#ffc700!important;border-radius:9999px!important}[id^=\"headlessui-dialog-panel\"] .navbar-link a{color:white!important}[id^=\"headlessui-dialog-panel\"] nav{padding-top:2.5rem}.accordion{width:100%!important;overflow-x:auto!important}.accordion>div{padding-left:1.375rem!important;padding-right:0!important}.accordion>div[class*=\"overflow\"],.accordion>div>div[class*=\"overflow\"]{overflow:visible!important}@media (min-width: 1920px){body:has(#navbar.is-not-custom) #body-content{max-width:2000px!important}body:has(#navbar.is-not-custom) #content-container{max-width:1650px!important}body:has(#navbar.is-not-custom) #navbar .max-w-8xl{max-width:2000px!important}}body:has(#navbar.is-not-custom) #content{zoom:var(--maia-content-zoom, 100%)}body:has(#navbar.is-not-custom) #content-area>#content+div:has(>p+a){zoom:var(--maia-content-zoom, 100%)}#content-area>#content+div:has(>p+a)>p{font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:normal;color:#101828;margin-bottom:0.5rem}.dark #content-area>#content+div:has(>p+a)>p{color:inherit}#content-area>#content+div:has(>p+a)>a{font-size:1rem;line-height:1.75rem}"},{"filePath":"new-features-blog/new-features-blog.css","content":".fos-background-container{position:fixed;top:0;left:0;height:100vh;width:100vw;background:#fff3d1;z-index:-1;background-size:cover}.fos-post-page-container{background-color:#fff;border-radius:20px;padding:20px!important}.fos-roadmap-page-container{background-color:#fff;border-radius:20px;width:95%}@media (min-width: 1024px){.fos-roadmap-page-container{width:70%;margin:0 auto}}.fos-changelog-page-container{background-color:#fff;border-radius:20px}.banner-title,.fos-header-banner-title{color:#00524E;font-size:4rem;font-weight:700;font-family:'Inter', sans-serif}.banner-subtitle,.fos-header-banner-subtitle{color:#001F1D;font-size:1.1487em;margin-top:0.5em;margin-bottom:2em}.fos-header-boards-trigger,.fos-header-roadmap-trigger,.fos-header-changelog-trigger{display:none}.fos-user-side-header{color:white;font-family:'Inter', sans-serif}.fos-header-container{background-color:#001f1d;box-shadow:0px 1px 13px #bfbfbf}.fos-header-boards-dropdown-content span{color:white}.fos-header-links-container{justify-content:center;gap:1em}.fos-header-link{color:white;font-size:14px!important;font-weight:bold;padding:10px 0}.fos-header-logo-container{display:flex}.fos-header-logo-image{width:100px}.fos-header-boards-link{color:white;font-size:16px;padding:10px 0;font-weight:bold}.fos-header-link-icon{color:white}"}],"page":{"pagePath":"docs/components/query-result-to-scalar","slug":"/docs/components/query-result-to-scalar","pageMetadata":{"title":"Query Result To Scalar","description":null,"href":"/docs/components/query-result-to-scalar"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const ComponentMetadata=({warehouses,unsupportedWarehouses=[],componentType,connectionInputs,connectionOutputs,driverVersion,driverVersionUrl})=>{const _components={a:`a`,..._provideComponents()};const allWarehouses=[...warehouses.map(w=>({name:w,supported:true})),...unsupportedWarehouses.map(w=>({name:w,supported:false}))];return _jsx(`div`,{style:{background:`var(--colors-background-light, #f9fafb)`,border:`1px solid var(--colors-border-default, #e5e7eb)`,borderRadius:`12px`,padding:`20px 28px`,marginBottom:`28px`,boxShadow:`0 1px 4px rgba(0,0,0,0.10)`},children:_jsx(`table`,{style:{width:`100%`,borderCollapse:`collapse`},children:_jsxs(`tbody`,{children:[_jsxs(`tr`,{children:[_jsx(`td`,{style:{fontWeight:`600`,paddingRight:`32px`,paddingBottom:`14px`,whiteSpace:`nowrap`,verticalAlign:`middle`,width:`180px`},children:`Project Availability`}),_jsx(`td`,{style:{paddingBottom:`14px`,verticalAlign:`middle`},children:_jsx(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`8px`},children:allWarehouses.map((w,i)=>_jsxs(`span`,{style:{background:w.supported?`#dcfce7`:`#fee2e2`,color:w.supported?`#15803d`:`#b91c1c`,border:`1px solid ${w.supported?`#bbf7d0`:`#fca5a5`}`,borderRadius:`9999px`,padding:`3px 12px`,fontSize:`0.85rem`,fontWeight:`500`,whiteSpace:`nowrap`},children:[w.name,` `,w.supported?`✅`:`❌`]},i))})})]}),_jsxs(`tr`,{children:[_jsx(`td`,{style:{fontWeight:`600`,paddingRight:`32px`,paddingBottom:`14px`,whiteSpace:`nowrap`,verticalAlign:`middle`},children:`Component Type`}),_jsx(`td`,{style:{paddingBottom:`14px`,verticalAlign:`middle`},children:componentType})]}),_jsxs(`tr`,{children:[_jsx(`td`,{style:{fontWeight:`600`,paddingRight:`32px`,paddingBottom:`14px`,whiteSpace:`nowrap`,verticalAlign:`middle`},children:`Connection Inputs`}),_jsx(`td`,{style:{paddingBottom:`14px`,verticalAlign:`middle`},children:connectionInputs})]}),_jsxs(`tr`,{children:[_jsx(`td`,{style:{fontWeight:`600`,paddingRight:`32px`,paddingBottom:driverVersion?`14px`:`0`,whiteSpace:`nowrap`,verticalAlign:`middle`},children:`Connection Outputs`}),_jsx(`td`,{style:{paddingBottom:driverVersion?`14px`:`0`,verticalAlign:`middle`},children:connectionOutputs})]}),driverVersion\u0026\u0026_jsxs(`tr`,{children:[_jsx(`td`,{style:{fontWeight:`600`,paddingRight:`32px`,whiteSpace:`nowrap`,verticalAlign:`middle`},children:`Driver Version`}),_jsx(`td`,{style:{verticalAlign:`middle`},children:driverVersionUrl?_jsx(_components.a,{href:driverVersionUrl,target:`_blank`,rel:`noopener noreferrer`,children:driverVersion}):driverVersion})]})]})})})};function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ResponseField,Tab,Tabs,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`ComponentMetadata`,children:_jsx(ComponentMetadata,{warehouses:[`Snowflake`,`Databricks`,`Amazon Redshift`,`Google BigQuery`],componentType:`Orchestration, Test`,connectionInputs:`One`,connectionOutputs:`Unlimited`})}),`\n`,_jsxs(_components.p,{children:[`The Query Result To Scalar orchestration component allows you to query a table and return a scalar value. This value can then be mapped to a project or pipeline `,_jsx(_components.a,{href:`/docs/guides/variables`,children:`variable`}),` for use in other pipeline components.`]}),`\n`,_jsxs(_components.p,{children:[`This component is the scalar equivalent of the `,_jsx(_components.a,{href:`/docs/components/query-result-to-grid`,children:`Query Result To Grid`}),` component.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`properties`,children:`Properties`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Snowflake`,id:`snowflake`,children:[_jsx(ResponseField,{name:`Name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Enter a human-readable name for the component.`})}),_jsx(ResponseField,{name:`Mode`,type:`drop-down`,required:true,id:`param-mode`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Basic:`}),` This mode will build a query for you using settings from the `,_jsx(_components.strong,{children:`Data Source`}),`, `,_jsx(_components.strong,{children:`Data Selection`}),`, and `,_jsx(_components.strong,{children:`Data Source Filter`}),` parameters. In most cases, this mode will be sufficient.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Advanced:`}),` This mode will require you to write an SQL-like query to call data from Snowflake. The available fields and their descriptions are documented in the data model.`]}),`\n`]})}),_jsx(ResponseField,{name:`Database`,type:`string`,required:true,id:`param-database`,children:_jsxs(_components.p,{children:[`The Snowflake database. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the database defined in the environment. Read `,_jsx(_components.a,{href:`https://docs.snowflake.com/en/guides-overview-db`,children:`Databases, Tables and Views - Overview`}),` to learn more.`]})}),_jsx(ResponseField,{name:`Schema`,type:`drop-down`,required:true,id:`param-schema`,children:_jsxs(_components.p,{children:[`The Snowflake schema. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the schema defined in the environment. Read `,_jsx(_components.a,{href:`https://docs.snowflake.com/en/sql-reference/ddl-database.html`,children:`Database, Schema, and Share DDL`}),` to learn more.`]})}),_jsx(ResponseField,{name:`Table`,type:`string`,required:true,id:`param-table`,children:_jsx(_components.p,{children:`The name of the table to be queried.`})}),_jsx(ResponseField,{name:`Table columns`,type:`object selector`,required:true,id:`param-table-columns`,children:_jsx(_components.p,{children:`Select columns to return from the table.`})}),_jsx(ResponseField,{name:`Order By`,type:`object selector`,id:`param-order-by`,children:_jsx(_components.p,{children:`Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.`})}),_jsx(ResponseField,{name:`Sort`,type:`drop-down`,required:true,id:`param-sort`,children:_jsxs(_components.p,{children:[`Select whether rows are sorted in `,_jsx(_components.strong,{children:`Ascending`}),` or `,_jsx(_components.strong,{children:`Descending`}),` order.`]})}),_jsx(ResponseField,{name:`Limit`,type:`integer`,required:true,id:`param-limit`,children:_jsx(_components.p,{children:`Set the limit of returned rows.`})}),_jsxs(ResponseField,{name:`Filter Conditions`,type:`column editor`,id:`param-filter-conditions`,children:[_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Column Name:`}),` Select an input column. The available input columns vary depending upon the data source.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Qualifier:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is:`}),` Compares the column to the value using the comparator.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Not:`}),` Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Comparator:`}),` Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character `,_jsx(_components.code,{children:`%`}),` to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Value:`}),` The value to be compared.`]}),`\n`]}),_jsxs(_components.p,{children:[`To use `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`grid variables`}),`, select the `,_jsx(_components.strong,{children:`Use Grid Variable`}),` checkbox at the bottom of the `,_jsx(_components.strong,{children:`Filter Conditions`}),` dialog.`]})]}),_jsx(ResponseField,{name:`Combine Condition`,type:`drop-down`,required:true,id:`param-combine-condition`,children:_jsx(_components.p,{children:`Select whether to use the defined filters in combination with one another according to either And or Or.`})}),_jsxs(ResponseField,{name:`Query`,type:`code editor`,required:true,id:`param-query`,children:[_jsx(_components.p,{children:`This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.`}),_jsxs(_components.p,{children:[`This property is only available when `,_jsx(_components.strong,{children:`Mode`}),` is set to `,_jsx(_components.strong,{children:`Advanced`}),`.`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`Do not end SQL statements with a semicolon in this component.`})}),_jsx(_components.p,{children:`Examples:`}),_jsx(_components.p,{children:`Single scalar, e.g. count of movies:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_database`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single value with a filter:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(release_year) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_database`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` genre `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Comedy'`})]}),`\n`]})})}),_jsx(_components.p,{children:`Multiple columns → multiple scalar variables:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` total_movies, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`AVG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(rating) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` avg_rating, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(box_office) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` top_grossing`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_database`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` release_year `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2025`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single row lookup:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` title, director, rating`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_database`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` movie_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`]})})})]}),_jsxs(ResponseField,{name:`Scalar Variable Mapping`,type:`column editor`,required:true,id:`param-scalar-variable-mapping`,children:[_jsx(_components.p,{children:`Scalar results from the SQL query can be mapped to project and pipeline variables.`}),_jsxs(_components.p,{children:[`Use the `,_jsx(_components.strong,{children:`Input Column Name`}),` drop-down to select a scalar returned by the query. Use the `,_jsx(_components.strong,{children:`Scalar Variable Name`}),` drop-down to select a variable to map the scalar to. Click `,_jsx(_components.strong,{children:`+`}),` to add more mappings.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Variables used in the mapping must be created before this component runs. Read `,_jsx(_components.a,{href:`/docs/guides/variables`,children:`Project and pipeline variables`}),` for details of how to create variables.`]})}),_jsxs(_components.p,{children:[`To use `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`grid variables`}),`, select the `,_jsx(_components.strong,{children:`Use Grid Variable`}),` checkbox at the bottom of the `,_jsx(_components.strong,{children:`Scalar Variable Mapping`}),` dialog.`]})]})]}),_jsxs(Tab,{title:`Databricks`,id:`databricks`,children:[_jsx(ResponseField,{name:`Name`,type:`string`,required:true,id:`param-name-1`,children:_jsx(_components.p,{children:`Enter a human-readable name for the component.`})}),_jsx(ResponseField,{name:`Mode`,type:`drop-down`,required:true,id:`param-mode-1`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Basic:`}),` This mode will build a query for you using settings from the `,_jsx(_components.strong,{children:`Data Source`}),`, `,_jsx(_components.strong,{children:`Data Selection`}),`, and `,_jsx(_components.strong,{children:`Data Source Filter`}),` parameters. In most cases, this mode will be sufficient.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Advanced:`}),` This mode will require you to write an SQL-like query to call data from Databricks. The available fields and their descriptions are documented in the data model.`]}),`\n`]})}),_jsx(ResponseField,{name:`Catalog`,type:`drop-down`,required:true,id:`param-catalog`,children:_jsxs(_components.p,{children:[`Select a `,_jsx(_components.a,{href:`https://docs.databricks.com/en/data-governance/unity-catalog/index.html`,children:`Databricks Unity Catalog`}),`. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the catalog defined in the environment. Selecting a catalog will determine which databases are available in the next parameter.`]})}),_jsx(ResponseField,{name:`Schema (Database)`,type:`drop-down`,required:true,id:`param-schema-database`,children:_jsxs(_components.p,{children:[`The Databricks schema. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the schema defined in the environment. Read `,_jsx(_components.a,{href:`https://docs.databricks.com/en/data-governance/unity-catalog/create-schemas.html`,children:`Create and manage schemas`}),` to learn more.`]})}),_jsx(ResponseField,{name:`Table`,type:`drop-down`,required:true,id:`param-table-1`,children:_jsx(_components.p,{children:`The name of the table to be queried.`})}),_jsx(ResponseField,{name:`Table columns`,type:`object selector`,required:true,id:`param-table-columns-1`,children:_jsx(_components.p,{children:`Select columns to return from the table.`})}),_jsx(ResponseField,{name:`Order By`,type:`object selector`,id:`param-order-by-1`,children:_jsx(_components.p,{children:`Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.`})}),_jsx(ResponseField,{name:`Sort`,type:`drop-down`,required:true,id:`param-sort-1`,children:_jsxs(_components.p,{children:[`Select whether rows are sorted in `,_jsx(_components.strong,{children:`Ascending`}),` or `,_jsx(_components.strong,{children:`Descending`}),` order.`]})}),_jsx(ResponseField,{name:`Limit`,type:`integer`,required:true,id:`param-limit-1`,children:_jsx(_components.p,{children:`Set the limit of returned rows.`})}),_jsxs(ResponseField,{name:`Filter Conditions`,type:`column editor`,id:`param-filter-conditions-1`,children:[_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Column Name:`}),` Select an input column. The available input columns vary depending upon the data source.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Qualifier:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is:`}),` Compares the column to the value using the comparator.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Not:`}),` Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Comparator:`}),` Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character `,_jsx(_components.code,{children:`%`}),` to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Value:`}),` The value to be compared.`]}),`\n`]}),_jsxs(_components.p,{children:[`To use `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`grid variables`}),`, select the `,_jsx(_components.strong,{children:`Use Grid Variable`}),` checkbox at the bottom of the `,_jsx(_components.strong,{children:`Filter Conditions`}),` dialog.`]})]}),_jsx(ResponseField,{name:`Combine Condition`,type:`drop-down`,required:true,id:`param-combine-condition-1`,children:_jsx(_components.p,{children:`Select whether to use the defined filters in combination with one another according to either And or Or.`})}),_jsxs(ResponseField,{name:`Query`,type:`code editor`,required:true,id:`param-query-1`,children:[_jsx(_components.p,{children:`This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.`}),_jsxs(_components.p,{children:[`This property is only available when `,_jsx(_components.strong,{children:`Mode`}),` is set to `,_jsx(_components.strong,{children:`Advanced`}),`.`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`Do not end SQL statements with a semicolon in this component.`})}),_jsx(_components.p,{children:`Examples:`}),_jsx(_components.p,{children:`Single scalar, e.g. count of movies:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_catalog`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single value with a filter:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(release_year) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_catalog`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` genre `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Comedy'`})]}),`\n`]})})}),_jsx(_components.p,{children:`Multiple columns → multiple scalar variables:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` total_movies, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`AVG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(rating) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` avg_rating, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(box_office) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` top_grossing`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_catalog`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` release_year `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2025`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single row lookup:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` title, director, rating`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_catalog`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` movie_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`]})})})]}),_jsxs(ResponseField,{name:`Scalar Variable Mapping`,type:`column editor`,required:true,id:`param-scalar-variable-mapping-1`,children:[_jsx(_components.p,{children:`Scalar results from the SQL query can be mapped to project and pipeline variables.`}),_jsxs(_components.p,{children:[`Use the `,_jsx(_components.strong,{children:`Input Column Name`}),` drop-down to select a scalar returned by the query. Use the `,_jsx(_components.strong,{children:`Scalar Variable Name`}),` drop-down to select a variable to map the scalar to. Click `,_jsx(_components.strong,{children:`+`}),` to add more mappings.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Variables used in the mapping must be created before this component runs. Read `,_jsx(_components.a,{href:`/docs/guides/variables`,children:`Project and pipeline variables`}),` for details of how to create variables.`]})}),_jsxs(_components.p,{children:[`To use `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`grid variables`}),`, select the `,_jsx(_components.strong,{children:`Use Grid Variable`}),` checkbox at the bottom of the `,_jsx(_components.strong,{children:`Scalar Variable Mapping`}),` dialog.`]})]})]}),_jsxs(Tab,{title:`Amazon Redshift`,id:`amazon-redshift`,children:[_jsx(ResponseField,{name:`Name`,type:`string`,required:true,id:`param-name-2`,children:_jsx(_components.p,{children:`Enter a human-readable name for the component.`})}),_jsx(ResponseField,{name:`Mode`,type:`drop-down`,required:true,id:`param-mode-2`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Basic:`}),` This mode will build a query for you using settings from the `,_jsx(_components.strong,{children:`Data Source`}),`, `,_jsx(_components.strong,{children:`Data Selection`}),`, and `,_jsx(_components.strong,{children:`Data Source Filter`}),` parameters. In most cases, this mode will be sufficient.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Advanced:`}),` This mode will require you to write an SQL-like query to call data from Redshift. The available fields and their descriptions are documented in the data model.`]}),`\n`]})}),_jsx(ResponseField,{name:`Schema`,type:`drop-down`,required:true,id:`param-schema-1`,children:_jsxs(_components.p,{children:[`Select the table schema. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the schema defined in the environment. For more information on using multiple schemas, read `,_jsx(_components.a,{href:`https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html`,children:`Schemas`}),`.`]})}),_jsx(ResponseField,{name:`Table`,type:`string`,required:true,id:`param-table-2`,children:_jsx(_components.p,{children:`The name of the table to be queried.`})}),_jsx(ResponseField,{name:`Table columns`,type:`object selector`,required:true,id:`param-table-columns-2`,children:_jsx(_components.p,{children:`Select columns to return from the table.`})}),_jsx(ResponseField,{name:`Order By`,type:`object selector`,id:`param-order-by-2`,children:_jsx(_components.p,{children:`Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.`})}),_jsx(ResponseField,{name:`Sort`,type:`drop-down`,required:true,id:`param-sort-2`,children:_jsxs(_components.p,{children:[`Select whether rows are sorted in `,_jsx(_components.strong,{children:`Ascending`}),` or `,_jsx(_components.strong,{children:`Descending`}),` order.`]})}),_jsx(ResponseField,{name:`Limit`,type:`integer`,required:true,id:`param-limit-2`,children:_jsx(_components.p,{children:`Set the limit of returned rows.`})}),_jsxs(ResponseField,{name:`Filter Conditions`,type:`column editor`,id:`param-filter-conditions-2`,children:[_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Column Name:`}),` Select an input column. The available input columns vary depending upon the data source.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Qualifier:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is:`}),` Compares the column to the value using the comparator.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Not:`}),` Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Comparator:`}),` Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character `,_jsx(_components.code,{children:`%`}),` to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Value:`}),` The value to be compared.`]}),`\n`]}),_jsxs(_components.p,{children:[`To use `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`grid variables`}),`, select the `,_jsx(_components.strong,{children:`Use Grid Variable`}),` checkbox at the bottom of the `,_jsx(_components.strong,{children:`Filter Conditions`}),` dialog.`]})]}),_jsx(ResponseField,{name:`Combine Condition`,type:`drop-down`,required:true,id:`param-combine-condition-2`,children:_jsx(_components.p,{children:`Select whether to use the defined filters in combination with one another according to either And or Or.`})}),_jsxs(ResponseField,{name:`Query`,type:`code editor`,required:true,id:`param-query-2`,children:[_jsx(_components.p,{children:`This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.`}),_jsxs(_components.p,{children:[`This property is only available when `,_jsx(_components.strong,{children:`Mode`}),` is set to `,_jsx(_components.strong,{children:`Advanced`}),`.`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`Do not end SQL statements with a semicolon in this component.`})}),_jsx(_components.p,{children:`Examples:`}),_jsx(_components.p,{children:`Single scalar, e.g. count of movies:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`movies`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single value with a filter:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(release_year) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`movies`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` genre `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Comedy'`})]}),`\n`]})})}),_jsx(_components.p,{children:`Multiple columns → multiple scalar variables:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` total_movies, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`AVG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(rating) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` avg_rating, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(box_office) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` top_grossing`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` release_year `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2025`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single row lookup:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` title, director, rating`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` movie_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`]})})})]}),_jsxs(ResponseField,{name:`Scalar Variable Mapping`,type:`column editor`,required:true,id:`param-scalar-variable-mapping-2`,children:[_jsx(_components.p,{children:`Scalar results from the SQL query can be mapped to project and pipeline variables.`}),_jsxs(_components.p,{children:[`Use the `,_jsx(_components.strong,{children:`Input Column Name`}),` drop-down to select a scalar returned by the query. Use the `,_jsx(_components.strong,{children:`Scalar Variable Name`}),` drop-down to select a variable to map the scalar to. Click `,_jsx(_components.strong,{children:`+`}),` to add more mappings.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Variables used in the mapping must be created before this component runs. Read `,_jsx(_components.a,{href:`/docs/guides/variables`,children:`Project and pipeline variables`}),` for details of how to create variables.`]})}),_jsxs(_components.p,{children:[`To use `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`grid variables`}),`, select the `,_jsx(_components.strong,{children:`Use Grid Variable`}),` checkbox at the bottom of the `,_jsx(_components.strong,{children:`Scalar Variable Mapping`}),` dialog.`]})]})]}),_jsxs(Tab,{title:`Google BigQuery`,id:`google-bigquery`,children:[_jsx(ResponseField,{name:`Name`,type:`string`,required:true,id:`param-name-3`,children:_jsx(_components.p,{children:`Enter a human-readable name for the component.`})}),_jsx(ResponseField,{name:`Mode`,type:`drop-down`,required:true,id:`param-mode-3`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Basic:`}),` This mode will build a query for you using settings from the `,_jsx(_components.strong,{children:`Data Source`}),`, `,_jsx(_components.strong,{children:`Data Selection`}),`, and `,_jsx(_components.strong,{children:`Data Source Filter`}),` parameters. In most cases, this mode will be sufficient.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Advanced:`}),` This mode will require you to write an SQL-like query to call data from BigQuery. The available fields and their descriptions are documented in the data model.`]}),`\n`]})}),_jsx(ResponseField,{name:`GCP Project ID`,type:`drop-down`,required:true,id:`param-gcp-project-id`,children:_jsxs(_components.p,{children:[`The Google Cloud project that owns the BigQuery dataset. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the Google Cloud project defined in the environment. For more information, read `,_jsx(_components.a,{href:`https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects`,children:`Creating projects`}),`.`]})}),_jsx(ResponseField,{name:`Dataset`,type:`drop-down`,required:true,id:`param-dataset`,children:_jsxs(_components.p,{children:[`The Google BigQuery dataset containing the table to query. The special value `,_jsx(_components.code,{children:`[Environment Default]`}),` uses the dataset defined in the environment.`]})}),_jsx(ResponseField,{name:`Table`,type:`string`,required:true,id:`param-table-3`,children:_jsx(_components.p,{children:`The name of the table to be queried. Type a name, or select from the drop-down.`})}),_jsx(ResponseField,{name:`Table columns`,type:`object selector`,required:true,id:`param-table-columns-3`,children:_jsx(_components.p,{children:`Select columns to return from the table.`})}),_jsx(ResponseField,{name:`Order By`,type:`object selector`,id:`param-order-by-3`,children:_jsx(_components.p,{children:`Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.`})}),_jsx(ResponseField,{name:`Sort`,type:`drop-down`,required:true,id:`param-sort-3`,children:_jsxs(_components.p,{children:[`Select whether rows are sorted in `,_jsx(_components.strong,{children:`Ascending`}),` or `,_jsx(_components.strong,{children:`Descending`}),` order.`]})}),_jsx(ResponseField,{name:`Limit`,type:`integer`,required:true,id:`param-limit-3`,children:_jsx(_components.p,{children:`Set the limit of returned rows.`})}),_jsxs(ResponseField,{name:`Filter conditions`,type:`column editor`,id:`param-filter-conditions-3`,children:[_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Input Column Name:`}),` Select an input column. The available input columns vary depending upon the data source.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Qualifier:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is:`}),` Compares the column to the value using the comparator.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Not:`}),` Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Comparator:`}),` Choose a method of comparing the column to the value. Possible comparators include:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Less than`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Less than or equal to`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Equal to`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Greater than`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Greater than or equal to`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Like`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Ilike`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Similar to`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Null`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Blank`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Null or blank`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`“Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character `,_jsx(_components.code,{children:`%`}),` to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Value:`}),` The value to be compared.`]}),`\n`]}),`\n`]}),_jsxs(_components.p,{children:[`To use grid variables, toggle `,_jsx(_components.strong,{children:`Use Grid Variable`}),` on. For more information, read `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`Grid variables`}),`.`]}),_jsxs(_components.p,{children:[`Toggle `,_jsx(_components.strong,{children:`Text mode`}),` on at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read `,_jsx(_components.a,{href:`/docs/guides/components-overview#text-mode`,children:`Text mode`}),`.`]})]}),_jsx(ResponseField,{name:`Combine Condition`,type:`drop-down`,required:true,id:`param-combine-condition-3`,children:_jsx(_components.p,{children:`Select whether to use the defined filters in combination with one another according to either And or Or.`})}),_jsxs(ResponseField,{name:`Query`,type:`code editor`,required:true,id:`param-query-3`,children:[_jsx(_components.p,{children:`This property opens an editor for you to write an SQL query manually instead of setting parameters one at a time. You can also prompt Maia Team to write the query for you—ensure your instructions are clear and contextual.`}),_jsxs(_components.p,{children:[`This property is only available when `,_jsx(_components.strong,{children:`Mode`}),` is set to `,_jsx(_components.strong,{children:`Advanced`}),`.`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`Do not end SQL statements with a semicolon in this component.`})}),_jsx(_components.p,{children:`Examples:`}),_jsx(_components.p,{children:`Single scalar, e.g. count of movies:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_project`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_dataset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single value with a filter:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(release_year) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_project`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_dataset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` genre `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Comedy'`})]}),`\n`]})})}),_jsx(_components.p,{children:`Multiple columns → multiple scalar variables:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` total_movies, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`AVG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(rating) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` avg_rating, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`MAX`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(box_office) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` top_grossing`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_project`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_dataset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` release_year `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2025`})]}),`\n`]})})}),_jsx(_components.p,{children:`Single row lookup:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` title, director, rating`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` my_project`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`my_dataset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.movies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` movie_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`]})})})]}),_jsxs(ResponseField,{name:`Scalar variable mapping`,type:`column editor`,required:true,id:`param-scalar-variable-mapping-3`,children:[_jsx(_components.p,{children:`Scalar results from the SQL query can be mapped to project and pipeline variables.`}),_jsxs(_components.p,{children:[`Use the `,_jsx(_components.strong,{children:`Input Column Name`}),` drop-down to select a scalar returned by the query. Use the `,_jsx(_components.strong,{children:`Scalar Variable Name`}),` drop-down to select a variable to map the scalar to. Click `,_jsx(_components.strong,{children:`+`}),` to add more mappings.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Variables used in the mapping must be created before this component runs. Read `,_jsx(_components.a,{href:`/docs/guides/variables`,children:`variables`}),` for details of how to create variables.`]})}),_jsxs(_components.p,{children:[`To use grid variables, toggle `,_jsx(_components.strong,{children:`Use Grid Variable`}),` on. For more information, read `,_jsx(_components.a,{href:`/docs/guides/grid-variables`,children:`Grid variables`}),`.`]}),_jsxs(_components.p,{children:[`Toggle `,_jsx(_components.strong,{children:`Text mode`}),` on at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read `,_jsx(_components.a,{href:`/docs/guides/components-overview#text-mode`,children:`Text mode`}),`.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{ComponentMetadata,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":"Query Result To Scalar","description":null,"href":"/docs/components/query-result-to-scalar"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[153,2672,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Properties","slug":"properties","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/matillion/1eecfe13cb8a36b9/scripts/feedback-widget.js","/_mintlify/custom/matillion/b8b092d8d394af0f/scripts/ga4-events.js","/_mintlify/custom/matillion/5baf5b38fe34f41f/scripts/iubenda.js","/_mintlify/custom/matillion/573540f1e9142d9c/scripts/kapa-widget.js","/_mintlify/custom/matillion/a52101786f42c23b/scripts/ph-pageleaves.js","/_mintlify/custom/matillion/b8f0431aaf9ef855/scripts/cookie-preferences-button.js","/_mintlify/custom/matillion/a3d31738f4c89949/scripts/status-badge-nav.js","/_mintlify/custom/matillion/b444958fcc79163d/scripts/text-size-slider.js","/_mintlify/custom/matillion/f7016c1e98f77080/scripts/posthog-events.js"],"subdomain":"matillion","siteName":"Maia Documentation","title":"Query Result To Scalar - Maia Documentation","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"manual"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T18:15:26.234Z","originalFileLocation":"docs/components/query-result-to-scalar.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"application-name\" content=\"Maia Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_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/matillion/eb7R3mt9l7P1vThW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Query Result To Scalar - Maia Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Maia Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.maia.ai/docs/components/query-result-to-scalar\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://matillion.mintlify.site/_mintlify/api/og/v2?division=Variables\u0026amp;title=Query+Result+To+Scalar\u0026amp;theme=ce57a3e3dfd574362d42229a\u0026amp;signature=ec4f36be4ac188cbf02183ef5fe86736f43865a077fd8a1e694633d24e33c35b\">\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=\"Query Result To Scalar - Maia Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://matillion.mintlify.site/_mintlify/api/og/v2?division=Variables\u0026amp;title=Query+Result+To+Scalar\u0026amp;theme=ce57a3e3dfd574362d42229a\u0026amp;signature=ec4f36be4ac188cbf02183ef5fe86736f43865a077fd8a1e694633d24e33c35b\">\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/matillion/eb7R3mt9l7P1vThW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Maia Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#001f1d\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"0VLXGRESICGHnU66TdhEgUMBRRubPnW8JTkzOpiiNn0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.maia.ai/docs/components/query-result-to-scalar\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/components/query-result-to-scalar.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.maia.ai/#organization\",\"name\":\"Maia Documentation\",\"url\":\"https://docs.maia.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/matillion/GyuNBHAx-GXnVlKX/images/maia-by-matillion-light.svg?fit=max\u0026auto=format\u0026n=GyuNBHAx-GXnVlKX\u0026q=85\u0026s=2c48b854f858c5a835450b3f34360db7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.maia.ai#website\",\"name\":\"Maia Documentation\",\"url\":\"https://docs.maia.ai\",\"publisher\":{\"@id\":\"https://docs.maia.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.maia.ai/docs/components/query-result-to-scalar#webpage\",\"url\":\"https://docs.maia.ai/docs/components/query-result-to-scalar\",\"name\":\"Query Result To Scalar\",\"dateModified\":\"2026-11-12T18:15:26.234Z\",\"isPartOf\":{\"@id\":\"https://docs.maia.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.maia.ai/docs/components/query-result-to-scalar#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.maia.ai/docs/components/query-result-to-scalar#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orchestration\",\"item\":\"https://docs.maia.ai/docs/components/orchestration-pipeline-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Variables\",\"item\":\"https://docs.maia.ai/docs/components/variables-components\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Query Result To Scalar\",\"item\":\"https://docs.maia.ai/docs/components/query-result-to-scalar\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.maia.ai/docs/components/query-result-to-scalar#article\",\"headline\":\"Query Result To Scalar\",\"name\":\"Query Result To Scalar\",\"url\":\"https://docs.maia.ai/docs/components/query-result-to-scalar\",\"mainEntityOfPage\":{\"@id\":\"https://docs.maia.ai/docs/components/query-result-to-scalar#webpage\"},\"dateModified\":\"2026-11-12T18:15:26.234Z\",\"publisher\":{\"@id\":\"https://docs.maia.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.maia.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Maia Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Maia Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/components/query-result-to-scalar.md","siteName":"Maia Documentation","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/docs/administration/administration-overview"}]},{"tab":"Components","pages":[{"title":"Components overview","href":"/docs/components/components-overview"},{"group":"Connectors","root":{"title":"Connectors overview","href":"/docs/components/connectors-overview"},"pages":[{"title":"Connectors overview","href":"/docs/components/connectors-overview"},{"title":"Custom connectors in Designer","href":"/docs/components/custom-connector"},{"title":"System tables","href":"/docs/guides/system-tables-example"},{"group":"Connector authentication guides","root":{"title":"Connector authentication","href":"/docs/guides/connector-authentication-overview"},"pages":[{"title":"Connector authentication","href":"/docs/guides/connector-authentication-overview"},{"title":"HubSpot authentication guide","href":"/docs/guides/hubspot-authentication-guide"},{"title":"Jira authentication guide","href":"/docs/guides/jira-authentication-guide"},{"title":"LinkedIn Ads authentication guide","href":"/docs/guides/linkedin-ads-authentication-guide"},{"title":"Kafka authentication guide","href":"/docs/guides/kafka-authentication-guide"},{"title":"Marketo authentication guide","href":"/docs/guides/marketo-authentication-guide"},{"title":"Microsoft Fabric Lakehouse authentication guide","href":"/docs/guides/microsoft-fabric-lakehouse-authentication-guide"},{"title":"NetSuite Query authentication guide","href":"/docs/guides/netsuite-query-authentication-guide"},{"title":"NetSuite SuiteAnalytics authentication guide","href":"/docs/guides/netsuite-suiteanalytics-authentication-guide"},{"title":"Oracle Autonomous Database authentication guide","href":"/docs/guides/oracle-autonomous-database-authentication-guide"},{"title":"Salesforce authentication guide","href":"/docs/guides/salesforce-authentication-guide"},{"title":"ServiceNow authentication guide","href":"/docs/guides/servicenow-authentication-guide"},{"title":"Workday authentication guide","href":"/docs/guides/workday-authentication-guide"}]},{"title":"ActiveCampaign","href":"/docs/components/activecampaign"},{"title":"Amazon DynamoDB Load","href":"/docs/components/amazon-dynamodb-load"},{"title":"Amazon Redshift Load","href":"/docs/components/amazon-redshift-load"},{"title":"Amplitude","href":"/docs/components/amplitude"},{"title":"Anaplan","href":"/docs/components/anaplan"},{"title":"Asana","href":"/docs/components/asana"},{"title":"Attio","href":"/docs/components/attio"},{"title":"AVRO Load","href":"/docs/components/avro-load"},{"title":"Azure Blob Storage Load","href":"/docs/components/azure-blob-storage-load"},{"title":"Azure Blob Storage Unload","href":"/docs/components/azure-blob-storage-unload"},{"title":"Azure Cosmos DB for NoSQL","href":"/docs/components/azure-cosmos-db-for-nosql"},{"title":"Azure SQL","href":"/docs/components/azure-sql"},{"title":"Bing Ads Load","href":"/docs/components/bing-ads-load"},{"title":"Bing Ads Query (deprecated)","href":"/docs/components/bing-ads-query"},{"title":"Box","href":"/docs/components/box"},{"title":"Braze","href":"/docs/components/braze"},{"title":"Brevo","href":"/docs/components/brevo"},{"title":"Bugcrowd","href":"/docs/components/bugcrowd"},{"title":"Buildkite","href":"/docs/components/buildkite"},{"title":"Chargebee","href":"/docs/components/chargebee"},{"title":"CircleCI","href":"/docs/components/circleci"},{"title":"ClickUp","href":"/docs/components/clickup"},{"title":"Coalesce","href":"/docs/components/coalesce"},{"title":"Concord","href":"/docs/components/concord"},{"title":"Confluence","href":"/docs/components/confluence"},{"title":"CSV Load","href":"/docs/components/csv-load"},{"title":"Data Transfer","href":"/docs/components/data-transfer"},{"title":"Database Query","href":"/docs/components/database-query"},{"title":"Databricks","href":"/docs/components/databricks"},{"title":"Datadog","href":"/docs/components/datadog"},{"title":"dbt Cloud","href":"/docs/components/dbt-cloud"},{"title":"Delighted","href":"/docs/components/delighted"},{"title":"Dixa","href":"/docs/components/dixa"},{"title":"Dropbox","href":"/docs/components/dropbox"},{"title":"Dynamics 365 Business Central","href":"/docs/components/dynamics-365-business-central"},{"title":"Elasticsearch Load","href":"/docs/components/elasticsearch-load"},{"title":"Email Load","href":"/docs/components/email-load"},{"title":"Eventbrite","href":"/docs/components/eventbrite"},{"title":"Excel Load","href":"/docs/components/excel-load"},{"title":"Excel Query","href":"/docs/components/excel-query"},{"title":"Facebook Ads","href":"/docs/components/facebook-ads"},{"title":"Facebook Ads Query (deprecated)","href":"/docs/components/facebook-ads-query"},{"title":"Facebook Ads Query example configurations","href":"/docs/guides/facebook-ads-query-example"},{"title":"Facebook Load","href":"/docs/components/facebook-load"},{"title":"Facebook Query (deprecated)","href":"/docs/components/facebook-query"},{"title":"Fanatics","href":"/docs/components/fanatics"},{"title":"FireHydrant","href":"/docs/components/firehydrant"},{"title":"Float","href":"/docs/components/flex-float"},{"title":"Freshdesk","href":"/docs/components/freshdesk"},{"title":"GitHub","href":"/docs/components/github"},{"title":"Gmail","href":"/docs/components/gmail"},{"title":"Gong","href":"/docs/components/gong"},{"title":"Google Ads Load","href":"/docs/components/google-ads-load"},{"title":"Google Analytics","href":"/docs/components/google-analytics"},{"title":"Google Analytics Query (deprecated)","href":"/docs/components/google-analytics-query"},{"title":"Google BigQuery (connector)","href":"/docs/components/google-bigquery"},{"title":"Google BigQuery Load","href":"/docs/components/google-bigquery-load"},{"title":"Google Cloud Storage Unload","href":"/docs/components/google-cloud-storage-unload"},{"title":"Google Sheets","href":"/docs/components/google-sheets"},{"title":"HubSpot Load","href":"/docs/components/hubspot-load"},{"title":"HubSpot Query (deprecated)","href":"/docs/components/hubspot-query"},{"title":"IBM Db2 for i Load","href":"/docs/components/ibm-db2-load"},{"title":"Infobip","href":"/docs/components/infobip"},{"title":"Intercom","href":"/docs/components/intercom"},{"title":"JDBC Load","href":"/docs/components/jdbc-load"},{"title":"Jira Load","href":"/docs/components/jira-load"},{"title":"Jotform","href":"/docs/components/jotform"},{"title":"JSON Load","href":"/docs/components/json-load"},{"title":"Kafka","href":"/docs/components/kafka"},{"title":"Klaviyo","href":"/docs/components/klaviyo"},{"title":"LaunchDarkly","href":"/docs/components/launchdarkly"},{"title":"LDAP Load","href":"/docs/components/ldap-load"},{"title":"LDAP Query (deprecated)","href":"/docs/components/ldap-query"},{"title":"LinkedIn Ads","href":"/docs/components/linkedin-ads"},{"title":"Lob","href":"/docs/components/lob"},{"title":"Maia Flex connector","href":"/docs/components/maia-flex-connector"},{"title":"Mailchimp","href":"/docs/components/mailchimp"},{"title":"Mailgun","href":"/docs/components/mailgun"},{"title":"Mandrill","href":"/docs/components/mandrill"},{"title":"MariaDB Load","href":"/docs/components/mariadb-load"},{"title":"MariaDB Unload","href":"/docs/components/mariadb-unload"},{"title":"Marketo Load","href":"/docs/components/marketo-load"},{"title":"Microsoft Dataverse","href":"/docs/components/microsoft-dataverse"},{"title":"Microsoft Dynamics 365 Load","href":"/docs/components/microsoft-dynamics-365-load"},{"title":"Microsoft Dynamics CRM Load","href":"/docs/components/microsoft-dynamics-crm-load"},{"title":"Microsoft Exchange","href":"/docs/components/microsoft-exchange"},{"title":"Microsoft SQL Server Load","href":"/docs/components/microsoft-sql-server-load"},{"title":"Mixpanel","href":"/docs/components/mixpanel"},{"title":"MongoDB Load","href":"/docs/components/mongodb-load"},{"title":"NetSuite Query","href":"/docs/components/netsuite-query"},{"title":"NetSuite SuiteAnalytics (deprecated)","href":"/docs/components/netsuite-suiteanalytics"},{"title":"NetSuite SuiteAnalytics Load","href":"/docs/components/netsuite-suiteanalytics-load"},{"title":"New Relic","href":"/docs/components/new-relic"},{"title":"Notion","href":"/docs/components/notion"},{"title":"OData","href":"/docs/components/odata"},{"title":"OData Query","href":"/docs/components/odata-query"},{"title":"Ongoing WMS","href":"/docs/components/ongoing-wms"},{"title":"Open Exchange Rates","href":"/docs/components/open-exchange-rates"},{"title":"Oracle Eloqua Load","href":"/docs/components/oracle-eloqua-load"},{"title":"Oracle Fusion Cloud Financials Load","href":"/docs/components/oracle-fcf-load"},{"title":"Oracle Fusion Cloud HCM Load","href":"/docs/components/oracle-hcm-load"},{"title":"Oracle Fusion Cloud Procurement Load","href":"/docs/components/oracle-fcp-load"},{"title":"Oracle Fusion Cloud Project Management Load","href":"/docs/components/oracle-fcpm-load"},{"title":"Oracle Load","href":"/docs/components/oracle-load"},{"title":"Oracle Output","href":"/docs/components/oracle-output"},{"title":"Oracle Unload","href":"/docs/components/oracle-unload"},{"title":"Orbit","href":"/docs/components/orbit"},{"title":"ORC Load","href":"/docs/components/orc-load"},{"title":"Ortto","href":"/docs/components/ortto"},{"title":"PagerDuty","href":"/docs/components/pagerduty"},{"title":"Parquet Load","href":"/docs/components/parquet-load"},{"title":"PayPal","href":"/docs/components/paypal"},{"title":"Pendo","href":"/docs/components/pendo"},{"title":"Persona","href":"/docs/components/persona"},{"title":"Pingdom","href":"/docs/components/pingdom"},{"title":"Pipedrive","href":"/docs/components/pipedrive"},{"title":"PostgreSQL Load","href":"/docs/components/postgresql-load"},{"title":"PostgreSQL Unload","href":"/docs/components/postgresql-unload"},{"title":"Productboard","href":"/docs/components/productboard"},{"title":"RDS Query","href":"/docs/components/rds-query"},{"title":"Recurly","href":"/docs/components/recurly"},{"title":"RingCentral","href":"/docs/components/ringcentral"},{"title":"Rootly","href":"/docs/components/rootly"},{"title":"S3 Load","href":"/docs/components/s3-load"},{"title":"S3 Unload","href":"/docs/components/s3-unload"},{"title":"Sage Intacct Load","href":"/docs/components/sage-intacct-load"},{"title":"Salesforce Load","href":"/docs/components/salesforce-load"},{"title":"Salesforce Marketing Cloud Query","href":"/docs/components/salesforce-marketing-cloud-query"},{"title":"Salesforce Pardot","href":"/docs/components/salesforce-pardot"},{"title":"Salesforce Query (deprecated)","href":"/docs/components/salesforce-query"},{"title":"Salesloft","href":"/docs/components/salesloft"},{"title":"SAP NetWeaver (deprecated)","href":"/docs/components/sap-netweaver"},{"title":"SAP NetWeaver Load","href":"/docs/components/sap-netweaver-load"},{"title":"SAP ODP","href":"/docs/components/sap-odp"},{"title":"SAP SuccessFactors","href":"/docs/components/sap-successfactors"},{"title":"SeatGeek","href":"/docs/components/seatgeek"},{"title":"SendGrid","href":"/docs/components/sendgrid"},{"title":"ServiceNow Load","href":"/docs/components/servicenow-load"},{"title":"ServiceNow Query","href":"/docs/components/servicenow-query"},{"title":"SharePoint Load","href":"/docs/components/sharepoint-load"},{"title":"SharePoint Query (deprecated)","href":"/docs/components/sharepoint-query"},{"title":"Shopify","href":"/docs/components/shopify"},{"title":"Shopify Load","href":"/docs/components/shopify-load"},{"title":"Slack","href":"/docs/components/slack"},{"title":"Smartsheet","href":"/docs/components/smartsheet"},{"title":"Snapchat","href":"/docs/components/snapchat"},{"title":"Snowflake Load","href":"/docs/components/snowflake-load"},{"title":"Snyk","href":"/docs/components/snyk"},{"title":"Square","href":"/docs/components/square"},{"title":"Stripe Load","href":"/docs/components/stripe-load"},{"title":"Stripe Query (deprecated)","href":"/docs/components/stripe-query"},{"title":"SugarCRM Load","href":"/docs/components/sugarcrm-load"},{"title":"SurveyMonkey","href":"/docs/components/surveymonkey"},{"title":"Sybase ASE Load","href":"/docs/components/sybase-ase-load"},{"title":"Ticketmaster","href":"/docs/components/ticketmaster"},{"title":"TikTok","href":"/docs/components/tiktok"},{"title":"Toggl","href":"/docs/components/toggl"},{"title":"Twilio","href":"/docs/components/twilio"},{"title":"Unstructured.io","href":"/docs/components/unstructured"},{"title":"Workday","href":"/docs/components/workday"},{"title":"Workday Custom Reports","href":"/docs/components/workday-custom-reports"},{"title":"Workday Load","href":"/docs/components/workday-load"},{"title":"X Ads Load","href":"/docs/components/x-ads-load"},{"title":"Yelp","href":"/docs/components/yelp"},{"title":"Zendesk Talk","href":"/docs/components/zendesk-talk"},{"title":"Zendesk Ticketing","href":"/docs/components/zendesk-ticketing"},{"title":"Zoom","href":"/docs/components/zoom"},{"title":"Zoho CRM Load","href":"/docs/components/zoho-crm-load"},{"title":"Zuora","href":"/docs/components/zuora"},{"title":"Zuora Bulk","href":"/docs/components/zuora-bulk"}]},{"group":"Orchestration","root":{"title":"Orchestration overview","href":"/docs/components/orchestration-pipeline-overview"},"pages":[{"title":"Orchestration overview","href":"/docs/components/orchestration-pipeline-overview"},{"group":"Pipeline control","root":{"title":"Pipeline control components","href":"/docs/components/pipeline-control-components"},"pages":[{"title":"Pipeline control components","href":"/docs/components/pipeline-control-components"},{"title":"And component","href":"/docs/components/and"},{"title":"Begin transaction","href":"/docs/components/begin"},{"title":"Commit transaction","href":"/docs/components/commit"},{"title":"End Failure","href":"/docs/components/end-failure"},{"title":"End Success","href":"/docs/components/end-success"},{"title":"If component","href":"/docs/components/if"},{"title":"Or component","href":"/docs/components/or"},{"title":"Retry","href":"/docs/components/retry"},{"title":"Rollback transaction","href":"/docs/components/rollback"},{"title":"Run Orchestration","href":"/docs/components/run-orchestration"},{"title":"Run Shared Pipeline","href":"/docs/components/run-shared-pipeline"},{"title":"Run Transformation","href":"/docs/components/run-transformation"},{"title":"Start component","href":"/docs/components/start"},{"title":"Start Compute","href":"/docs/components/start-compute"}]},{"group":"DDL","root":{"title":"DDL components","href":"/docs/components/ddl-components"},"pages":[{"title":"DDL components","href":"/docs/components/ddl-components"},{"title":"Add Partition","href":"/docs/components/add-partition"},{"title":"Alter Table","href":"/docs/components/alter-table"},{"title":"Alter Warehouse","href":"/docs/components/alter-warehouse"},{"title":"Analyze Tables","href":"/docs/components/analyze-tables"},{"title":"Create External Table","href":"/docs/components/create-external-table"},{"title":"Create File Format","href":"/docs/components/create-file-format"},{"title":"Create Stream","href":"/docs/components/create-stream"},{"title":"Create Table","href":"/docs/components/create-table"},{"title":"Delete Tables","href":"/docs/components/delete-tables"},{"title":"Google Drive Table","href":"/docs/components/google-drive-table"},{"title":"Optimize","href":"/docs/components/optimize"},{"title":"Refresh External Table","href":"/docs/components/refresh-external-table"},{"title":"Refresh Materialized View","href":"/docs/components/refresh-materialized-view"},{"title":"Refresh Table","href":"/docs/components/refresh-table"},{"title":"Schema Copy","href":"/docs/components/schema-copy"},{"title":"Truncate Table","href":"/docs/components/truncate-table"},{"title":"Vacuum","href":"/docs/components/vacuum"},{"title":"Volume to Delta Table","href":"/docs/components/volume-to-delta-table"}]},{"group":"Scripting","root":{"title":"Scripting components","href":"/docs/components/scripting-components"},"pages":[{"title":"Scripting components","href":"/docs/components/scripting-components"},{"title":"dbt Core","href":"/docs/components/dbt-core"},{"title":"Python Pushdown","href":"/docs/components/python-pushdown"},{"title":"Python Script","href":"/docs/components/python-script"},{"title":"Run Notebook","href":"/docs/components/run-notebook"},{"title":"Script Pushdown","href":"/docs/components/script-pushdown"},{"title":"SQL Script","href":"/docs/components/sql-script"}]},{"group":"AI","root":{"title":"AI components","href":"/docs/components/ai-components"},"pages":[{"title":"AI components","href":"/docs/components/ai-components"},{"title":"Amazon Bedrock Prompt","href":"/docs/components/amazon-bedrock-prompt"},{"title":"Amazon Textract Input","href":"/docs/components/amazon-textract-input"},{"title":"Amazon Transcribe Input","href":"/docs/components/amazon-transcribe-input"},{"title":"Azure Document Intelligence","href":"/docs/components/azure-document-intelligence"},{"title":"Azure OpenAI Prompt","href":"/docs/components/azure-openai-prompt"},{"title":"OpenAI Prompt","href":"/docs/components/openai-prompt"},{"title":"Azure Speech Transcribe","href":"/docs/components/azure-speech-transcribe"},{"title":"Chunk Text","href":"/docs/components/chunk-text"},{"title":"Cortex Finetune","href":"/docs/components/cortex-finetune"},{"title":"Pinecone Vector Query","href":"/docs/components/pinecone-vector-query"},{"title":"Snowpark Container Prompt","tag":"Preview","href":"/docs/components/snowpark-container-prompt"},{"title":"How to create an app in Snowpark Container Services","tag":"Preview","href":"/docs/guides/snowpark-container-app-how-to"},{"title":"TypeSafe Decide","href":"/docs/components/typesafe-decide"},{"title":"Google Vertex AI Prompt","href":"/docs/components/vertex-ai-prompt"}]},{"group":"Variables","root":{"title":"Variables components","href":"/docs/components/variables-components"},"pages":[{"title":"Variables components","href":"/docs/components/variables-components"},{"title":"Append to Grid","href":"/docs/components/append-to-grid"},{"title":"Assert Scalar Variables","href":"/docs/components/assert-scalar-variables"},{"title":"JDBC Table Metadata to Grid","href":"/docs/components/jdbc-table-metadata-to-grid"},{"title":"Print Variables","href":"/docs/components/print-variables"},{"title":"Query Result To Grid","description":null,"href":"/docs/components/query-result-to-grid"},{"title":"Query Result To Scalar","href":"/docs/components/query-result-to-scalar"},{"title":"Remove from Grid","description":null,"href":"/docs/components/remove-from-grid"},{"title":"Show to Grid","href":"/docs/components/show-to-grid"},{"title":"Table Metadata to Grid","href":"/docs/components/table-metadata-to-grid"},{"title":"Update Scalar","href":"/docs/components/update-scalar"}]},{"group":"Messaging","root":{"title":"Messaging components","href":"/docs/components/messaging-components"},"pages":[{"title":"Messaging components","href":"/docs/components/messaging-components"},{"title":"Azure Queue Storage Message","href":"/docs/components/azure-queue-storage-message"},{"title":"CloudWatch Publish","href":"/docs/components/cloudwatch-publish"},{"title":"Cloud Pub/Sub","href":"/docs/components/pubsub"},{"title":"Send Email","href":"/docs/components/send-email"},{"title":"SNS Message","href":"/docs/components/sns-message"},{"title":"SQS Message","href":"/docs/components/sqs-message"},{"title":"Webhook Post","href":"/docs/components/webhook-post"}]},{"group":"Assert","root":{"title":"Assert components","href":"/docs/components/assert-components"},"pages":[{"title":"Assert components","href":"/docs/components/assert-components"},{"title":"Assert External Table","href":"/docs/components/assert-external-table"},{"title":"Assert Scalar Variables","href":"/docs/components/assert-scalar-variables"},{"title":"Assert Table","href":"/docs/components/assert-table"}]},{"group":"Metadata","root":{"title":"Metadata components","href":"/docs/components/metadata-components"},"pages":[{"title":"Metadata components","href":"/docs/components/metadata-components"},{"title":"JDBC Table Metadata to Grid","href":"/docs/components/jdbc-table-metadata-to-grid"},{"title":"Table Metadata to Grid","href":"/docs/components/table-metadata-to-grid"}]},{"group":"Iterators","root":{"title":"Iterator components","href":"/docs/guides/iterator-components"},"pages":[{"title":"Iterator components","href":"/docs/guides/iterator-components"},{"title":"File Iterator","href":"/docs/components/file-iterator"},{"title":"Fixed Iterator","href":"/docs/components/fixed-iterator"},{"title":"Grid Iterator","href":"/docs/components/grid-iterator"},{"title":"Loop Iterator","href":"/docs/components/loop-iterator"},{"title":"Table Iterator","href":"/docs/components/table-iterator"}]},{"group":"Output and upsert","root":{"title":"Output and upsert components","href":"/docs/components/output-and-upsert-components"},"pages":[{"title":"Output and upsert components","href":"/docs/components/output-and-upsert-components"},{"title":"Amazon OpenSearch Upsert","href":"/docs/components/amazon-opensearch-upsert"},{"title":"Pinecone Vector Upsert","href":"/docs/components/pinecone-vector-upsert"},{"title":"Postgres Vector Upsert","href":"/docs/components/postgres-vector-upsert"},{"title":"RDS Bulk Output","href":"/docs/components/rds-bulk-output"},{"title":"Microsoft SQL Server Output","href":"/docs/components/sql-server-output"},{"title":"Salesforce Output","href":"/docs/components/salesforce-output"},{"title":"Snowflake Vector Upsert","href":"/docs/components/snowflake-vector-upsert"}]}]},{"group":"Transformation","root":{"title":"Transformation overview","href":"/docs/components/transformation-pipeline-overview"},"pages":[{"title":"Transformation overview","href":"/docs/components/transformation-pipeline-overview"},{"title":"Aggregate","href":"/docs/components/aggregate"},{"title":"Assert View","href":"/docs/components/assert-view"},{"title":"Calculator","href":"/docs/components/calculator"},{"title":"Construct Struct","href":"/docs/components/construct-struct"},{"title":"Construct Variant","href":"/docs/components/construct-variant"},{"title":"Convert String To Struct","href":"/docs/components/convert-string-to-struct"},{"title":"Convert Type","href":"/docs/components/convert-type"},{"group":"Cortex","pages":[{"title":"Cortex Completions","href":"/docs/components/cortex-completions"},{"title":"Cortex Embed","href":"/docs/components/cortex-embed"},{"title":"Cortex Extract Answer","href":"/docs/components/cortex-extract-answer"},{"title":"Cortex Multi Prompt","href":"/docs/components/cortex-multi-prompt"},{"title":"Cortex Parse Document","tag":"Preview","href":"/docs/components/cortex-parse-document"},{"title":"Cortex Sentiment","href":"/docs/components/cortex-sentiment"},{"title":"Cortex Summarize","href":"/docs/components/cortex-summarize"},{"title":"Cortex Translate","href":"/docs/components/cortex-translate"}]},{"title":"Create View","href":"/docs/components/create-view"},{"title":"Data Cleanse","href":"/docs/components/data-cleanse"},{"group":"Databricks AI","pages":[{"title":"AI Analyze Sentiment","href":"/docs/components/databricks-ai-analyze-sentiment"},{"title":"AI Classify","href":"/docs/components/databricks-ai-classify"},{"title":"AI Extract","href":"/docs/components/databricks-ai-extract"},{"title":"AI Fix Grammar","href":"/docs/components/databricks-ai-fix-grammar"},{"title":"AI Mask","href":"/docs/components/databricks-ai-mask"},{"title":"AI Query","href":"/docs/components/databricks-ai-query"},{"title":"AI Similarity","href":"/docs/components/databricks-ai-similarity"},{"title":"AI Summarize","href":"/docs/components/databricks-ai-summarize"},{"title":"AI Translate","href":"/docs/components/databricks-ai-translate"},{"title":"Databricks Vector Search","href":"/docs/components/databricks-vector-search"}]},{"title":"Detect Changes","href":"/docs/components/detect-changes"},{"title":"Distinct","href":"/docs/components/distinct"},{"title":"Document AI Predict","tag":"Preview","href":"/docs/components/document-ai-predict"},{"title":"Except","href":"/docs/components/except"},{"title":"Extract Nested Data","href":"/docs/components/extract-nested-data"},{"title":"Extract Structured Data","href":"/docs/components/extract-structured-data"},{"title":"Filter","href":"/docs/components/filter"},{"title":"First/Last","href":"/docs/components/first-last"},{"title":"Fixed Flow","href":"/docs/components/fixed-flow"},{"title":"Flatten Variant","href":"/docs/components/flatten-variant"},{"title":"Generate Sequence","href":"/docs/components/generate-sequence"},{"group":"Google BigQuery AI","pages":[{"title":"Check Condition","href":"/docs/components/bigquery-check-condition"},{"title":"Classify","href":"/docs/components/bigquery-classify"},{"title":"Embed","href":"/docs/components/bigquery-embed"},{"title":"Generate","href":"/docs/components/bigquery-generate"},{"title":"Score","href":"/docs/components/bigquery-score"},{"title":"Vector Search","href":"/docs/components/bigquery-vector-search"}]},{"title":"Intersect","href":"/docs/components/intersect"},{"title":"Join","href":"/docs/components/join"},{"title":"Lead/Lag","href":"/docs/components/lead-lag"},{"title":"Map Values","href":"/docs/components/map-values"},{"title":"ML Classification","tag":"Preview","href":"/docs/components/ml-classification-sf"},{"title":"Multi Table Input","href":"/docs/components/multi-table-input"},{"title":"Pivot","href":"/docs/components/pivot"},{"title":"Rank","href":"/docs/components/rank"},{"title":"Rename","href":"/docs/components/rename"},{"title":"Rewrite Table","href":"/docs/components/rewrite-table"},{"title":"Split field","href":"/docs/components/split-field"},{"title":"SQL","href":"/docs/components/sql"},{"title":"Stream Input","href":"/docs/components/stream-input"},{"title":"Table Delete Rows","href":"/docs/components/table-delete-rows"},{"title":"Table Input","href":"/docs/components/table-input"},{"title":"Table Output","href":"/docs/components/table-output"},{"title":"Table Update","href":"/docs/components/table-update"},{"title":"Transpose Columns","href":"/docs/components/transpose-columns"},{"title":"Transpose Rows","href":"/docs/components/transpose-rows"},{"title":"Unite","href":"/docs/components/unite"},{"title":"Unpivot","href":"/docs/components/unpivot"},{"title":"Vector Search","href":"/docs/components/vector-search"},{"title":"Wildcard Table Input","href":"/docs/components/wildcard-table-input"},{"title":"Window Calculation","href":"/docs/components/window-calculation"}]},{"group":"Test pipelines","root":{"title":"Test pipelines","href":"/docs/components/test-pipelines"},"pages":[{"title":"Test pipelines","href":"/docs/components/test-pipelines"},{"title":"Assert Table Values","href":"/docs/components/assert-table-values"},{"title":"Compare Table Values","href":"/docs/components/compare-table-values"},{"title":"Create Table From Values","href":"/docs/components/create-table-from-values"},{"title":"Run Pipeline To Test","href":"/docs/components/run-pipeline-to-test"},{"title":"Zero Copy Clone","href":"/docs/components/zero-copy-clone"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/docs/guides/maia-overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/api-reference/maia-api-overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog/2026-changelog"}]}]},"basePath":"","title":"Query Result To Scalar - Maia Documentation","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}