Fivetrex.Models.Table (Fivetrex v0.2.1)
View SourceRepresents a table within a schema configuration.
Tables contain the actual data being synced. Each table can have its own sync mode and column configuration.
Fields
:name_in_destination- The name used in the destination warehouse:enabled- Whether this table is being synced:sync_mode- How data changes are handled:"SOFT_DELETE"- Deleted rows are marked with_fivetran_deleted"HISTORY"- Historical tracking with_fivetran_start/_fivetran_end"LIVE"- Real-time sync (deletes are hard deletes)
:supports_columns_config- Whether per-column configuration is supported:enabled_patch_settings- Advanced patch settings:columns- Map of column name toFivetrex.Models.Columnstructs
Sync Modes
The sync mode determines how Fivetran handles data modifications:
| Mode | Inserts | Updates | Deletes |
|---|---|---|---|
| SOFT_DELETE | Appended | In-place | Marked with flag |
| HISTORY | New row | New row | End timestamp set |
| LIVE | Appended | In-place | Hard deleted |
Examples
# Check sync mode
case table.sync_mode do
"SOFT_DELETE" -> "Deleted rows are marked, not removed"
"HISTORY" -> "Full history is preserved"
"LIVE" -> "Deletes are permanent"
end
Summary
Functions
Converts a map (from JSON response) to a Table struct.
Types
@type t() :: %Fivetrex.Models.Table{ columns: %{required(String.t()) => Fivetrex.Models.Column.t()} | nil, enabled: boolean() | nil, enabled_patch_settings: map() | nil, name_in_destination: String.t() | nil, supports_columns_config: boolean() | nil, sync_mode: String.t() | nil }
A Fivetran Table struct.
All fields may be nil if not provided in the API response.