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

# map_fields

> Step function: map_fields

## Input

<Tabs>
  <Tab title="v2">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`dataSource`</td>
          <td>Reference to the source data to transform.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`externalSources`</td>
          <td>Additional named data sources referenced by mapping expressions.</td>
          <td>object</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`fields`</td>
          <td>Field mapping definitions applied to the source data.</td>
          <td>array</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>

## Output

<Tabs>
  <Tab title="v2">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`data`</td>
          <td>The mapped fields produced from the source data.</td>
          <td>any</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>
