Fivetrex.Models.Schema (Fivetrex v0.2.1)
View SourceRepresents a database schema within a connector's schema configuration.
A schema is a namespace containing tables. In some databases (e.g., PostgreSQL), this maps directly to database schemas. In others (e.g., MySQL), it may represent a database name.
Fields
:name_in_destination- The name used in the destination warehouse (may differ from source due to Fivetran naming rules):enabled- Whether this schema is being synced:tables- Map of table name toFivetrex.Models.Tablestructs
Examples
# Check if a schema is enabled
if schema.enabled do
IO.puts("Syncing schema: #{schema.name_in_destination}")
end
# Get all enabled tables
enabled_tables =
schema.tables
|> Enum.filter(fn {_name, table} -> table.enabled end)
|> Map.new()
Summary
Functions
Converts a map (from JSON response) to a Schema struct.
Types
@type t() :: %Fivetrex.Models.Schema{ enabled: boolean() | nil, name_in_destination: String.t() | nil, tables: %{required(String.t()) => Fivetrex.Models.Table.t()} | nil }
A Fivetran Schema struct.
All fields may be nil if not provided in the API response.