Fivetrex.Models.SchemaConfig (Fivetrex v0.2.1)
View SourceRepresents the schema configuration for a Fivetran connector.
Schema configuration controls which schemas, tables, and columns are synced from your data source to your destination. This struct contains the hierarchical configuration of all database objects.
Structure
The configuration follows a nested hierarchy:
SchemaConfig
└── schemas (map of Schema by name)
└── tables (map of Table by name)
└── columns (map of Column by name)Fields
:enable_new_by_default- Whether newly discovered schemas/tables are enabled by default:schema_change_handling- How to handle schema changes:"ALLOW_ALL"- All new schemas/tables/columns are included"ALLOW_COLUMNS"- New schemas/tables excluded, new columns included"BLOCK_ALL"- All new items excluded from syncs
:schemas- Map of schema name toFivetrex.Models.Schemastructs
Examples
Working with schema configuration:
{:ok, config} = Fivetrex.Connectors.get_schema_config(client, "connector_id")
# Iterate through enabled schemas
for {name, schema} <- config.schemas, schema.enabled do
IO.puts("Schema: #{name}")
for {table_name, table} <- schema.tables, table.enabled do
IO.puts(" Table: #{table_name}")
end
endSee Also
Fivetrex.Connectors.get_schema_config/2- Fetch schema configurationFivetrex.Connectors.update_schema_config/3- Modify schema configurationFivetrex.Models.Schema- Individual schema struct
Summary
Functions
Converts a map (from JSON response) to a SchemaConfig struct.
Types
@type t() :: %Fivetrex.Models.SchemaConfig{ enable_new_by_default: boolean() | nil, schema_change_handling: String.t() | nil, schemas: %{required(String.t()) => Fivetrex.Models.Schema.t()} | nil }
A Fivetran Schema Configuration struct.
All fields may be nil if not provided in the API response.