Fivetrex.Models.Column (Fivetrex v0.2.1)

View Source

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)

Summary

Types

t()

A Fivetran Column struct.

Functions

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

Types

t()

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

Functions

from_map(map)

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

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