# IDs

The `ids` key specifies the list of all the identifiers present in the source table with their column names (or SQL expression) and `id_type`.

```yaml
ids:
  - select: id-column
    type: id_type
    entity: entity_name
    to_default_stitcher: true/false
```

| Field | Description |
| :----------- | :----------------- |
| `select` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | ID column name or SQL expression. |
| `type` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span>   | `id_type` from the list of `id_types` in the `entity` section of [`pb_project.yaml`]({{< ref "profiles/dev-docs/pb-project-yaml/" >}}). |
| `entity` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | Entity name. |
| `to_default_stitcher` | Default `true`- set to `false` to exclude from the default ID stitcher. |

### Example

```yaml
# Basic example
ids:
    - select: "id"
      type: salesforce_id
      entity: user

# Use SQL function on ID column
ids:
    - select: lower(email_address)
      type: email
      entity: user

# Multiple IDs for an entity
ids:
    - select: lower(email_address)
      type: email
      entity: user
    - select: "username"
      type: user_name
      entity: user

# IDs for multiple entities
ids:
    - select: lower(email_address)
      type: email
      entity: user
    - select: "account_id"
      type: account_id
      entity: account
```

