> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Result To Grid

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <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)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} 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'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Snowflake", "Databricks", "Amazon Redshift", "Google BigQuery"]} componentType="Orchestration, Test" connectionInputs="One" connectionOutputs="Unlimited" />

The Query Result To Grid orchestration component allows you to query a table and return rows of data that are loaded into a predefined [grid variable](/docs/guides/grid-variables) for use elsewhere in the pipeline. The component features both basic and advanced modes, which allow you to set up a simple query via the component interface or to write your own SQL query.

<Warning>
  This component has an upper limit of 5000 records. However, the returned payload size also has an upper limit of approximately 1 MB. If the payload exceeds this limit, the component will return an error.
</Warning>

This component is the grid equivalent of the [Query Result To Scalar](/docs/components/query-result-to-scalar) component.

***

## Properties

<Tabs>
  <Tab title="Snowflake">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[mode] | warehouses: [snowflake] --> */}

    <ResponseField name="Mode" type="drop-down" required>
      * **Basic:** This mode will build a query for you using the settings you configure in the **Database**, **Schema**, **Table**, **Table columns**, **Order by**, **Sort**, **Limit**, **Filter conditions**, and **Combine conditions** properties. In most cases, this mode will be sufficient.
      * **Advanced:** This mode will require you to write an SQL-like query in the **Query** property, to call data from Snowflake. The available fields and their descriptions are documented in the data model.
    </ResponseField>

    {/* <!-- param-start:[query] | warehouses: [snowflake] --> */}

    <ResponseField name="Query" type="code editor" required>
      Input an SQL-like query, written according to the profile definition.

      This property is only available when **Mode** is set to **Advanced**.

      <Warning>
        Do not end SQL statements with a semicolon in this component.
      </Warning>
    </ResponseField>

    {/* <!-- param-start:[database] | warehouses: [snowflake] --> */}

    <ResponseField name="Database" type="drop-down" required>
      The Snowflake database. The special value `[Environment Default]` uses the database defined in the environment. Read [Databases, Tables and Views - Overview](https://docs.snowflake.com/en/guides-overview-db) to learn more.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [snowflake] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      The Snowflake schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Database, Schema, and Share DDL](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[table] | warehouses: [snowflake] --> */}

    <ResponseField name="Table" type="string" required>
      The name of the table to be queried.
    </ResponseField>

    {/* <!-- param-start:[tableColumns] | warehouses: [snowflake] --> */}

    <ResponseField name="Table columns" type="dual listbox" required>
      Select which columns to take from the table as part of the query.
    </ResponseField>

    {/* <!-- param-start:[orderBy] | warehouses: [snowflake] --> */}

    <ResponseField name="Order by" type="dual listbox">
      Choose the columns by which to sort rows. If multiple columns are selected, rows are sorted by the first-listed column first, then by the next listed column, and so on.

      <Warning>
        An update to Snowflake has resulted in a change in the behavior of this parameter. The `LIMIT 5000` clause (which the **Advanced Mode** parameter automatically wraps the query in) no longer guarantees that the order specified by the **ORDER BY** in the sub-query is preserved.
      </Warning>
    </ResponseField>

    {/* <!-- param-start:[sort] | warehouses: [snowflake] --> */}

    <ResponseField name="Sort" type="drop-down" required>
      Select whether rows are sorted in **Ascending** or **Descending** order.
    </ResponseField>

    {/* <!-- param-start:[limit] | warehouses: [snowflake] --> */}

    <ResponseField name="Limit" type="integer" required>
      Set the limit of returned rows.
    </ResponseField>

    {/* <!-- param-start:[gridVariable] | warehouses: [snowflake] --> */}

    <ResponseField name="Grid variable" type="drop-down" required>
      Choose the [grid variable](/docs/guides/grid-variables) to be loaded with data resulting from the query.
    </ResponseField>

    {/* <!-- param-start:[gridVariableMapping] | warehouses: [snowflake] --> */}

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map columns from the queried table to the columns of the grid variable.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[filterConditions] | warehouses: [snowflake] --> */}

    <ResponseField name="Filter conditions" type="column editor">
      * **Input column:** 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.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[combineConditions] | warehouses: [snowflake] --> */}

    <ResponseField name="Combine conditions" type="drop-down" required>
      Select whether to use the defined filters in combination with one another according to either **And** or **Or**.
    </ResponseField>
  </Tab>

  <Tab title="Databricks">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[mode] | warehouses: [databricks] --> */}

    <ResponseField name="Mode" type="drop-down" required>
      * **Basic:** This mode will build a query for you using the settings you configure in the **Catalog**, **Database**, **Table**, **Table columns**, **Order by**, **Sort**, **Limit**, **Filter conditions**, and **Combine conditions** properties. In most cases, this mode will be sufficient.
      * **Advanced:** This mode will require you to write an SQL-like query in the **Query** property, to call data from Databricks. The available fields and their descriptions are documented in the data model.
    </ResponseField>

    {/* <!-- param-start:[query] | warehouses: [databricks] --> */}

    <ResponseField name="Query" type="code editor" required>
      Input an SQL-like query, written according to the profile definition.

      This property is only available when **Mode** is set to **Advanced**.

      <Warning>
        Do not end SQL statements with a semicolon in this component.
      </Warning>
    </ResponseField>

    {/* <!-- param-start:[catalog] | warehouses: [databricks] --> */}

    <ResponseField name="Catalog" type="drop-down" required>
      Select a [Databricks Unity Catalog](https://docs.databricks.com/en/data-governance/unity-catalog/index.html). 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.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [databricks] --> */}

    <ResponseField name="Schema (database)" type="drop-down" required>
      The Databricks schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Create and manage schemas](https://docs.databricks.com/en/data-governance/unity-catalog/create-schemas.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[table] | warehouses: [databricks] --> */}

    <ResponseField name="Table" type="string" required>
      A name for the table. Only available when the table type is Native.
    </ResponseField>

    {/* <!-- param-start:[tableColumns] | warehouses: [databricks] --> */}

    <ResponseField name="Table columns" type="dual listbox" required>
      Select which columns to take from the table as part of the query.
    </ResponseField>

    {/* <!-- param-start:[orderBy] | warehouses: [databricks] --> */}

    <ResponseField name="Order by" type="dual listbox">
      Choose the columns by which to sort rows. If multiple columns are selected, rows are sorted by the first-listed column first, then by the next listed column, and so on.
    </ResponseField>

    {/* <!-- param-start:[sort] | warehouses: [databricks] --> */}

    <ResponseField name="Sort" type="drop-down" required>
      Select whether rows are sorted in **Ascending** or **Descending** order.
    </ResponseField>

    {/* <!-- param-start:[limit] | warehouses: [databricks] --> */}

    <ResponseField name="Limit" type="integer" required>
      Set the limit of returned rows.
    </ResponseField>

    {/* <!-- param-start:[gridVariable] | warehouses: [databricks] --> */}

    <ResponseField name="Grid variable" type="drop-down" required>
      Choose the grid variable to be loaded with data resulting from the query.
    </ResponseField>

    {/* <!-- param-start:[gridVariableMapping] | warehouses: [databricks] --> */}

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map columns from the queried table to the columns of the grid variable.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[filterConditions] | warehouses: [databricks] --> */}

    <ResponseField name="Filter conditions" type="column editor">
      * **Input column:** 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.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[combineConditions] | warehouses: [databricks] --> */}

    <ResponseField name="Combine conditions" type="drop-down" required>
      Select whether to use the defined filters in combination with one another according to either And or Or.
    </ResponseField>
  </Tab>

  <Tab title="Amazon Redshift">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[mode] | warehouses: [redshift] --> */}

    <ResponseField name="Mode" type="drop-down" required>
      * **Basic:** This mode will build a query for you using the settings you configure in the **Schema**, **Table**, **Table columns**, **Order by**, **Sort**, **Limit**, **Filter conditions**, and **Combine conditions** properties. In most cases, this mode will be sufficient.
      * **Advanced:** This mode will require you to write an SQL-like query in the **Query** property, to call data from Redshift. The available fields and their descriptions are documented in the data model.
    </ResponseField>

    {/* <!-- param-start:[query] | warehouses: [redshift] --> */}

    <ResponseField name="Query" type="code editor" required>
      Input an SQL-like query, written according to the profile definition.

      This property is only available when **Mode** is set to **Advanced**.

      <Warning>
        Do not end SQL statements with a semicolon in this component.
      </Warning>
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [redshift] --> */}

    <ResponseField name="Schema" type="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](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html).
    </ResponseField>

    {/* <!-- param-start:[table] | warehouses: [redshift] --> */}

    <ResponseField name="Table" type="string" required>
      A name for the table. Only available when the table type is Native.
    </ResponseField>

    {/* <!-- param-start:[tableColumns] | warehouses: [redshift] --> */}

    <ResponseField name="Table columns" type="dual listbox" required>
      Select which columns to take from the table as part of the query.
    </ResponseField>

    {/* <!-- param-start:[orderBy] | warehouses: [redshift] --> */}

    <ResponseField name="Order by" type="dual listbox">
      Choose the columns by which to sort rows. If multiple columns are selected, rows are sorted by the first-listed column first, then by the next listed column, and so on.
    </ResponseField>

    {/* <!-- param-start:[sort] | warehouses: [redshift] --> */}

    <ResponseField name="Sort" type="drop-down" required>
      Select whether rows are sorted in **Ascending** or **Descending** order.
    </ResponseField>

    {/* <!-- param-start:[limit] | warehouses: [redshift] --> */}

    <ResponseField name="Limit" type="integer" required>
      Set the limit of returned rows.
    </ResponseField>

    {/* <!-- param-start:[gridVariable] | warehouses: [redshift] --> */}

    <ResponseField name="Grid variable" type="drop-down" required>
      Choose the grid variable to be loaded with data resulting from the query.
    </ResponseField>

    {/* <!-- param-start:[gridVariableMapping] | warehouses: [redshift] --> */}

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map columns from the queried table to the columns of the grid variable.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[filterConditions] | warehouses: [redshift] --> */}

    <ResponseField name="Filter conditions" type="column editor">
      * **Input column:** 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.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[combineConditions] | warehouses: [redshift] --> */}

    <ResponseField name="Combine conditions" type="drop-down" required>
      Select whether to use the defined filters in combination with one another according to either And or Or.
    </ResponseField>
  </Tab>

  <Tab title="Google BigQuery">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[mode] | warehouses: [bigquery] --> */}

    <ResponseField name="Mode" type="drop-down" required>
      * **Basic:** This mode will build a query for you using the settings you configure in the **GCP project ID**, **Dataset**, **Table**, **Table columns**, **Order by**, **Sort**, **Limit**, **Filter conditions**, and **Combine conditions** properties. In most cases, this mode will be sufficient.
      * **Advanced:** This mode will require you to write an SQL-like query in the **Query** property, to call data from BigQuery. The available fields and their descriptions are documented in the data model.
    </ResponseField>

    {/* <!-- param-start:[query] | warehouses: [bigquery] --> */}

    <ResponseField name="Query" type="code editor" required>
      Input an SQL-like query, written according to the profile definition.

      This property is only available when **Mode** is set to **Advanced**.

      <Warning>
        Do not end SQL statements with a semicolon in this component.
      </Warning>
    </ResponseField>

    {/* <!-- param-start:[gcpProjectId] | warehouses: [bigquery] --> */}

    <ResponseField name="GCP project ID" type="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](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects).
    </ResponseField>

    {/* <!-- param-start:[dataset] | warehouses: [bigquery] --> */}

    <ResponseField name="Dataset" type="drop-down" required>
      The Google BigQuery dataset containing the table to query. The special value `[Environment Default]` uses the dataset defined in the environment.
    </ResponseField>

    {/* <!-- param-start:[table] | warehouses: [bigquery] --> */}

    <ResponseField name="Table" type="drop-down" required>
      Select the table to be queried.
    </ResponseField>

    {/* <!-- param-start:[tableColumns] | warehouses: [bigquery] --> */}

    <ResponseField name="Table columns" type="dual listbox" required>
      Select which columns to take from the table as part of the query.
    </ResponseField>

    {/* <!-- param-start:[orderBy] | warehouses: [bigquery] --> */}

    <ResponseField name="Order by" type="dual listbox">
      Choose the columns by which to sort rows. If multiple columns are selected, rows are sorted by the first-listed column first, then by the next listed column, and so on.
    </ResponseField>

    {/* <!-- param-start:[sort] | warehouses: [bigquery] --> */}

    <ResponseField name="Sort" type="drop-down" required>
      Select whether rows are sorted in **Ascending** or **Descending** order.
    </ResponseField>

    {/* <!-- param-start:[limit] | warehouses: [bigquery] --> */}

    <ResponseField name="Limit" type="integer" required>
      Set the limit of returned rows.
    </ResponseField>

    {/* <!-- param-start:[gridVariable] | warehouses: [bigquery] --> */}

    <ResponseField name="Grid variable" type="drop-down" required>
      Choose the [grid variable](/docs/guides/grid-variables) to be loaded with data resulting from the query.
    </ResponseField>

    {/* <!-- param-start:[gridVariableMapping] | warehouses: [bigquery] --> */}

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map columns from the queried table to the columns of the grid variable.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[filterConditions] | warehouses: [bigquery] --> */}

    <ResponseField name="Filter conditions" type="column editor">
      * **Input column:** 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.

      Click the **Text mode** toggle 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](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[combineConditions] | warehouses: [bigquery] --> */}

    <ResponseField name="Combine conditions" type="drop-down" required>
      Select whether to use the defined filters in combination with one another according to either **And** or **Or**.
    </ResponseField>
  </Tab>
</Tabs>
