> ## 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.

# Table Metadata to Grid

export const maia = "Maia";

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 Table Metadata to Grid orchestration component lets you take the metadata from a table and use this data to populate a [grid variable](/docs/guides/grid-variables) with data.

## Properties

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

<Tabs>
  <Tab title="Snowflake">
    {/* <!-- 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-end:[database] --> */}

    {/* <!-- 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-end:[schema] --> */}

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

    <ResponseField name="Grid variable" type="drop-down" required>
      Select the grid variable to be loaded with data. To learn more about grid variables, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-end:[gridVariable] --> */}

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

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map each column in the grid to a particular "type" of metadata by selecting from the available drop-down menus. Columns include:

      * **Name:** Column name.
      * **Type:** Column data type (as used in {maia}).
      * **Database Type:** Column type (as reported by the database).
      * **Size:** Allowable size (in characters) of the data in the column.
      * **Precision:** The precision of the data in the column. Will be 0 (zero) for non-applicable types.
      * **Default Value:** The default value in this column.
      * **Not Null:** Whether or not the column allows null values (Yes/No).
      * **Unique:** Whether or not the column is a unique key (Yes/No).

      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-end:[gridVariableMapping] --> */}

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

    <ResponseField name="Target table" type="drop-down" required>
      Select the table from which metadata will be taken.
    </ResponseField>

    {/* <!-- param-end:[targetTable] --> */}
  </Tab>

  <Tab title="Databricks">
    {/* <!-- param-start:[catalog] | warehouses: [databricks] --> */}

    <ResponseField name="Catalog" type="drop-down" required>
      Select a [Databricks Unity Catalog](https://docs.databricks.com/data-governance/unity-catalog/index.html). The special value, \[Environment Default], will use the catalog specified in the {maia} environment setup. Selecting a catalog will determine which databases are available in the next parameter.
    </ResponseField>

    {/* <!-- param-end:[catalog] --> */}

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

    <ResponseField name="Schema (Database)" type="drop-down" required>
      Select the Databricks database. The special value, \[Environment Default], will use the database specified in the {maia} environment setup.
    </ResponseField>

    {/* <!-- param-end:[database] --> */}

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

    <ResponseField name="Grid variable" type="drop-down" required>
      Select the grid variable to be loaded with data.

      To learn more about grid variables, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-end:[gridVariable] --> */}

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

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map each column in the grid to a particular "type" of metadata by selecting from the available drop-down menus. Columns include:

      * **Name:** Column name.
      * **Type:** Column data type (as used in {maia}).
      * **Database Type:** Column type (as reported by the database).
      * **Size:** Allowable size (in characters) of the data in the column.
      * **Precision:** The precision of the data in the column. Will be 0 (zero) for non-applicable types.
      * **Default Value:** The default value in this column.
      * **Not Null:** Whether or not the column allows null values (Yes/No).
      * **Unique:** Whether or not the column is a unique key (Yes/No).

      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-end:[gridVariableMapping] --> */}

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

    <ResponseField name="Target table" type="string" required>
      Enter the table from which metadata will be taken.
    </ResponseField>

    {/* <!-- param-end:[targetTable] --> */}
  </Tab>

  <Tab title="Amazon Redshift">
    {/* <!-- param-start:[schema] | warehouses: [redshift] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      The Amazon Redshift schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Schemas](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html) to learn more.

      For more information on using multiple schemas, read [Schemas](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html).
    </ResponseField>

    {/* <!-- param-end:[schema] --> */}

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

    <ResponseField name="Grid variable" type="drop-down" required>
      Select the grid variable to be loaded with data.

      To learn more about grid variables, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-end:[gridVariable] --> */}

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

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map each column in the grid to a particular "type" of metadata by selecting from the available drop-down menus. Columns include:

      * **Name:** Column name.
      * **Type:** Column data type (as used in {maia}).
      * **Database Type:** Column type (as reported by the database).
      * **Size:** Allowable size (in characters) of the data in the column.
      * **Precision:** The precision of the data in the column. Will be 0 (zero) for non-applicable types.
      * **Encoding:** The encoding used for the column (e.g., UTF-8).
      * **Primary Key:** Whether or not the column is a primary key (Yes/No).
      * **Allow Null:** Whether or not the column allows null values (Yes/No).

      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-end:[gridVariableMapping] --> */}

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

    <ResponseField name="Target table" type="string" required>
      Enter the table from which metadata will be taken.
    </ResponseField>

    {/* <!-- param-end:[targetTable] --> */}
  </Tab>

  <Tab title="Google BigQuery">
    {/* <!-- param-start:[project] | 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-end:[project] --> */}

    {/* <!-- 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-end:[dataset] --> */}

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

    <ResponseField name="Grid variable" type="drop-down" required>
      Select the grid variable to be loaded with data.

      To learn more about grid variables, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-end:[gridVariable] --> */}

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

    <ResponseField name="Grid variable mapping" type="column editor" required>
      Map each column in the grid to a particular "type" of metadata by selecting from the available drop-down menus. Columns include:

      * **Name:** Column name.
      * **Type:** The Google BigQuery type name of the column.
      * **Mode:** Whether the column is nullable, required, or repeated.

      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-end:[gridVariableMapping] --> */}

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

    <ResponseField name="Target table" type="drop-down" required>
      Select the table from which metadata will be taken.
    </ResponseField>

    {/* <!-- param-end:[targetTable] --> */}
  </Tab>
</Tabs>
