# `Fivetrex.Models.Column`
[🔗](https://github.com/lostbean/fivetrex/blob/v0.2.3/lib/fivetrex/models/schema_config.ex#L261)

Represents a column within a table configuration.

Columns are the individual fields being synced from source to destination.
Each column can be independently enabled/disabled or hashed for privacy.

## Fields

  * `:name_in_destination` - The name used in the destination warehouse
  * `:enabled` - Whether this column is being synced
  * `:hashed` - Whether the column value is hashed for privacy
    (useful for PII like emails)
  * `:is_primary_key` - Whether this column is part of the primary key
  * `:type` - The Fivetran source data type (e.g., "STRING", "INTEGER",
    "TIMESTAMP", "FLOAT", "BOOLEAN", "DATE", etc.)
  * `:enabled_patch_settings` - Advanced patch settings

## Privacy Hashing

When `:hashed` is true, Fivetran applies a one-way hash to column values.
This is useful for:

  * Removing personally identifiable information (PII)
  * Maintaining referential integrity while anonymizing data
  * Compliance with privacy regulations (GDPR, CCPA)

## Examples

    # Find primary key columns
    primary_keys =
      columns
      |> Enum.filter(fn {_name, col} -> col.is_primary_key end)
      |> Enum.map(fn {name, _col} -> name end)

    # Find hashed (anonymized) columns
    hashed_columns =
      columns
      |> Enum.filter(fn {_name, col} -> col.hashed end)
      |> Enum.map(fn {name, _col} -> name end)

# `t`

```elixir
@type t() :: %Fivetrex.Models.Column{
  enabled: boolean() | nil,
  enabled_patch_settings: map() | nil,
  hashed: boolean() | nil,
  is_primary_key: boolean() | nil,
  name_in_destination: String.t() | nil,
  type: String.t() | nil
}
```

A Fivetran Column struct.

All fields may be `nil` if not provided in the API response.

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Converts a map (from JSON response) to a Column struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
