Skip to content

Configs Reference

Top

Action config defines the contents of actions.yaml configuration files.

FieldTypeLabelDescription
tableActionConfig.TableConfig
viewActionConfig.ViewConfig
incrementalTableActionConfig.IncrementalTableConfig
assertionActionConfig.AssertionConfig
operationActionConfig.OperationConfig
declarationActionConfig.DeclarationConfig
notebookActionConfig.NotebookConfig
dataPreparationActionConfig.DataPreparationConfig
rlsPolicyActionConfig.RlsPolicyConfig
realtimePublicationActionConfig.RealtimePublicationConfig
foreignWrapperActionConfig.ForeignWrapperConfig
vectorIndexActionConfig.VectorIndexConfig
exportActionConfig.ExportConfig
importActionConfig.ImportConfig
scriptActionConfig.ScriptConfig

FieldTypeLabelDescription
namestringThe name of the assertion. Defaults to the file’s name, without the extension; set it to override. Other actions refer to the assertion by this name, for example in dependencies.
datasetstringThe dataset (schema) of the assertion.
projectstringThe Google Cloud project (database) of the assertion.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
descriptionstringDescription of the assertion.
hermeticboolIf true, this indicates that the action only depends on data from explicitly-declared dependencies. Otherwise if false, it indicates that the action depends on data from a source which has not been declared as a dependency.
dependOnDependencyAssertionsboolIf true, assertions dependent upon any of the dependencies are added as dependencies as well.
reservationstringOptional. The BigQuery reservation to use for execution. If unset, the value from workflow_settings.yaml is used. If neither is set, default BigQuery behavior applies. sqlanvil CLI only (GCP sqlanvil support pending).
metadataActionConfig.MetadataMetadata for this assertion.

FieldTypeLabelDescription
pathstringrepeatedThe identifier for the column, using multiple parts for nested records.
descriptionstringA text description of the column.
bigqueryPolicyTagsstringrepeatedA list of BigQuery policy tags that will be applied to the column.
tagsstringrepeatedA list of tags for this column which will be applied.

FieldTypeLabelDescription
namestringThe name of the data preparation, which is also the name of the table it writes. Defaults to the file’s name without its .dp.yaml, .dp.sqlx, .yaml or .sqlx extension; set it to override.
datasetstringThe dataset (schema) of the destination table.
projectstringThe Google Cloud project (database) of the destination table.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
descriptionstringDescription of the data preparation.
errorTableActionConfig.DataPreparationConfig.ErrorTableConfig
loadModeActionConfig.LoadModeConfig

ActionConfig.DataPreparationConfig.ErrorTableConfig

Section titled “ActionConfig.DataPreparationConfig.ErrorTableConfig”
FieldTypeLabelDescription
namestringThe name of the error table.
datasetstringThe dataset (schema) of the error table.
projectstringThe Google Cloud project (database) of the error table.
retentionDaysint32

FieldTypeLabelDescription
namestringThe name of the declaration, which must match the existing table it points at. In a SQLX file it defaults to the file’s name, without the extension; in an action configs file or the JavaScript API it is required.
datasetstringThe dataset (schema) of the declaration.
projectstringThe Google Cloud project (database) of the declaration.
descriptionstringDescription of the declaration.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the declaration.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
connectionstringOptional. Name of a connection (from WorkflowSettings.connections) that this declaration reads from. Only valid on declarations.
columnTypesActionConfig.DeclarationConfig.ColumnTypesEntryrepeatedOptional. Column name -> SQL type, used to generate the foreign table when connection bridges via FDW. Distinct from columns (descriptions).

ActionConfig.DeclarationConfig.ColumnTypesEntry

Section titled “ActionConfig.DeclarationConfig.ColumnTypesEntry”
FieldTypeLabelDescription
keystring
valuestring

Configuration for a type: "export" action: writes a SELECT result to a Parquet/CSV/JSON file at a cloud or local location.

FieldTypeLabelDescription
namestringThe name of the export. Defaults to the file’s name, without the extension; set it to override. Unless export.filename is set, this is also the base name of the file the export writes.
datasetstringThe dataset (schema) used to qualify the export’s target name.
projectstringThe Google Cloud project (database) of the export.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed.
descriptionstringDescription of the export.
hermeticboolIf true, this action only depends on data from explicitly-declared dependencies.
exportActionConfig.ExportOptionsThe export destination + format options (the export: {} block).

The user-facing export: {} block on a type: "export" action.

FieldTypeLabelDescription
locationstringDestination folder/prefix URI: gs://
formatstring”parquet"
overwriteboolOverwrite an existing object/file. Defaults to true (defaulted in core when absent).
filenamestringOutput base filename; defaults to the action name.
optionsActionConfig.ExportOptions.OptionsEntryrepeatedFormat-specific passthrough options (e.g. compression, csv header/delimiter).

FieldTypeLabelDescription
keystring
valuestring

Not usable in actions.yaml: a wrapper needs provider, credential and foreignTables, which this config lacks. Define wrappers with wrapper({ ... }) in a definitions/*.js file.

FieldTypeLabelDescription
namestringThe name of the wrapper action. Set it explicitly; unlike most actions, it is not taken from the file name. The Postgres foreign server’s name is set separately by server.
wrapperstring
serverstring
optionsActionConfig.ForeignWrapperConfig.OptionsEntryrepeated
filenamestring
dependencyTargetsActionConfig.Targetrepeated

ActionConfig.ForeignWrapperConfig.OptionsEntry

Section titled “ActionConfig.ForeignWrapperConfig.OptionsEntry”
FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
fileFormatActionConfig.IcebergTableConfig.FileFormatThe file format for the BigQuery table.
connectionstringThe connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection can have the form {project}.{location}.{connection_id} or `projects/{project}/locations/{location}/connections/{connection_id}”, or be set to DEFAULT.
bucketNamestringThe name of the Cloud Storage bucket where table data is stored. This value is be used to construct the storage URI in the following way: gs://{bucket_name}/{table_folder_root}/{table_folder_subpath}``. If storage_uri` is provided, this value is ignored.
tableFolderRootstringThe name of the first-level folder inside the Cloud Storage bucket where table data is stored. This value will be used to construct the storage URI in the following way: gs://{bucket_name}/{table_folder_root}/{table_folder_subpath}``. If storage_uri` is provided, this value is ignored.
tableFolderSubpathstringThe path under the first-level folder of the Cloud Storage bucket where table data is stored. This value will be used to construct the storage URI in the following way: gs://{bucket_name}/{table_folder_root}/{table_folder_subpath}``. If storage_uri` is provided, this value is ignored.

Configuration for a type: "import" action: loads a Parquet/CSV/JSON file into a table in the warehouse (the inverse of type: "export"). The resulting table is ref()-able.

FieldTypeLabelDescription
namestringThe name of the import (the destination table name). Defaults to the file’s name, without the extension; set it to override. Other actions ref() the loaded table by this name.
datasetstringThe dataset (schema) used to qualify the import’s target name.
projectstringThe Google Cloud project (database) of the import.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source .sqlx file the action is defined in (generated).
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed.
descriptionstringDescription of the import.
hermeticboolIf true, this action only depends on data from explicitly-declared dependencies.
importActionConfig.ImportOptionsThe import source + format options (the import: {} block).

The user-facing import: {} block on a type: "import" action.

FieldTypeLabelDescription
locationstringSource file/glob/URI to read: gs://
formatstring”parquet"
overwriteboolReplace the destination table (drop + create). Defaults to true. When false, rows are appended (INSERT … SELECT) into an existing table.
optionsActionConfig.ImportOptions.OptionsEntryrepeatedFormat-specific passthrough options (reserved for future reader options).

FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
namestringThe name of the incremental table. Defaults to the file’s name, without the extension; set it to override. Other actions ref() the table by this name.
datasetstringThe dataset (schema) of the incremental table.
projectstringThe Google Cloud project (database) of the incremental table.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
preOperationsstringrepeatedQueries to run before query. This can be useful for granting permissions.
postOperationsstringrepeatedQueries to run after query.
protectedboolIf true, prevents the dataset from being rebuilt from scratch.
uniqueKeystringrepeatedIf set, unique key represents a set of names of columns that will act as a the unique key. To enforce this, when updating the incremental table, sqlanvil merges rows with uniqueKey instead of appending them.
descriptionstringDescription of the incremental table.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the table.
partitionBystringThe key by which to partition the table. Typically the name of a timestamp or the date column. See https://cloud.google.com/dataform/docs/partitions-clusters.
partitionExpirationDaysint32The number of days for which BigQuery stores data in each partition. The setting applies to all partitions in a table, but is calculated independently for each partition based on the partition time.
requirePartitionFilterboolDeclares whether the partitioned table requires a WHERE clause predicate filter that filters the partitioning column.
updatePartitionFilterstringSQL-based filter for when incremental updates are applied.
clusterBystringrepeatedThe keys by which to cluster partitions by. See https://cloud.google.com/dataform/docs/partitions-clusters.
labelsActionConfig.IncrementalTableConfig.LabelsEntryrepeatedKey-value pairs for BigQuery labels.
additionalOptionsActionConfig.IncrementalTableConfig.AdditionalOptionsEntryrepeatedKey-value pairs of additional options to pass to the BigQuery API. Some options, for example, partitionExpirationDays, have dedicated type/validity checked fields. For such options, use the dedicated fields.
dependOnDependencyAssertionsboolWhen set to true, assertions dependent upon any dependency will be add as dedpendency to this action
assertionsActionConfig.TableAssertionsConfigAssertions to be run on the dataset. If configured, relevant assertions will automatically be created and run as a dependency of this dataset.
hermeticboolIf true, this indicates that the action only depends on data from explicitly-declared dependencies. Otherwise if false, it indicates that the action depends on data from a source which has not been declared as a dependency.
onSchemaChangeActionConfig.OnSchemaChangeDefines the action behavior if the selected columns in the query don’t the match columns in the target table.
icebergActionConfig.IcebergTableConfigConfiguration options for an Iceberg table.
metadataActionConfig.MetadataMetadata for this incremental table.
reservationstringOptional. The BigQuery reservation to use for execution. If unset, the value from workflow_settings.yaml is used. If neither is set, default BigQuery behavior applies. sqlanvil CLI only (GCP sqlanvil support pending).
postgresPostgresOptionsPostgres and Supabase specific options.
supabaseSupabaseOptions
mysqlMysqlOptionsMySQL/MariaDB specific options (engine/charset/collation + indexes).
incrementalStrategyActionConfig.IncrementalStrategyOptional. The incremental strategy to use when updating the table. Upstream #2195 numbers these 28/29, already taken here by postgres/supabase.
incrementalPredicatesstringrepeatedArray of SQL-based predicates for when incremental updates are applied.
preserveGovernanceControlsbooloptionalOptional. If true, preserves existing BigQuery column governance controls (e.g. data policy) when recreating a table. Upstream #2314 numbers this 30, already taken here by mysql.

ActionConfig.IncrementalTableConfig.AdditionalOptionsEntry

Section titled “ActionConfig.IncrementalTableConfig.AdditionalOptionsEntry”
FieldTypeLabelDescription
keystring
valuestring

ActionConfig.IncrementalTableConfig.LabelsEntry

Section titled “ActionConfig.IncrementalTableConfig.LabelsEntry”
FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
modeActionConfig.LoadMode
incrementalColumnstringRequired when mode is MAXIMUM or UNIQUE
uniqueKeystringrepeatedrequired when mode is MERGE

FieldTypeLabelDescription
overviewstringA detailed description of the data object.
extraPropertiesgoogle.protobuf.StructExtra properties of the data object.

FieldTypeLabelDescription
namestringThe name of the notebook. Defaults to the notebook file’s name, without the extension; set it to override, for example to run one notebook file as several actions.
locationstringThe Google Cloud location of the notebook.
projectstringThe Google Cloud project (database) of the notebook.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
descriptionstringDescription of the notebook.
dependOnDependencyAssertionsboolWhen set to true, assertions dependent upon any dependency will be add as dedpendency to this action

FieldTypeLabelDescription
namestringThe name of the operation. Defaults to the file’s name, without the extension; set it to override. Other actions refer to it by this name in dependencies, or with ref() if hasOutput is true.
datasetstringThe dataset (schema) of the operation.
projectstringThe Google Cloud project (database) of the operation.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
hasOutputboolDeclares that this action creates a dataset which should be referenceable as a dependency target, for example by using the ref function.
descriptionstringDescription of the operation.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the operation. Can only be set if hasOutput is true.
dependOnDependencyAssertionsboolWhen set to true, assertions dependent upon any dependency will be add as dedpendency to this action
hermeticboolIf true, this indicates that the action only depends on data from explicitly-declared dependencies. Otherwise if false, it indicates that the action depends on data from a source which has not been declared as a dependency.
reservationstringOptional. The BigQuery reservation to use for execution. If unset, the value from workflow_settings.yaml is used. If neither is set, default BigQuery behavior applies. sqlanvil CLI only (GCP sqlanvil support pending).

FieldTypeLabelDescription
namestringThe Postgres publication to add the table to. Optional; defaults to supabase_realtime, not to the file name. The action itself is named {table}_realtime_{name}.
tablestring
eventsstringrepeated
filenamestring
dependencyTargetsActionConfig.Targetrepeated

FieldTypeLabelDescription
namestringThe name of the Postgres policy that CREATE POLICY creates. Set it explicitly; unlike most actions, it is not taken from the file name. The action itself is named {table}_policy_{name}.
tablestring
commandstring
rolesstringrepeated
usingstring
withCheckstring
filenamestring
dependencyTargetsActionConfig.Targetrepeated

Configuration for a script action: an execution-time user script (Python in v1) that stages files / runs glue steps as a first-class DAG node. Language-neutral by design — language selects the per-language resolver in the CLI; the friendly python: actions.yaml key is sugar that normalizes to script: { language: "python", ... }. Scripts never receive warehouse credentials; they produce files, and type: "import" is the loading boundary.

FieldTypeLabelDescription
namestringThe name of the script action (how downstream actions depend on it). Defaults to the script file’s name, without the extension; set it to override, for example to run one script file as several actions.
datasetstringThe dataset (schema) used to qualify the script’s target name.
projectstringThe project (database) used to qualify the script’s target name.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the script file to execute, relative to the project root.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed.
descriptionstringDescription of the script action.
languagestringScript language (“python” in v1). Set automatically by the python: sugar.
argsstringrepeatedArguments passed verbatim to the script.
depsFilestringDeclared dependency manifest, relative to the project root (requirements.txt for python). sqlanvil validates the environment against it but never installs anything.
runtimeVersionstringRuntime version specifier (a PEP 440 specifier for python, e.g. ”>=3.11”).
envRootstringEnvironment root directory, relative to the project root (a venv for python) — its interpreter runs the script. When unset, the interpreter is resolved from PATH.
timeoutMillisint32Per-action timeout in milliseconds. 0 means the default (30 minutes).

Options for shorthand specifying assertions, useable for some table-based action types.

FieldTypeLabelDescription
uniqueKeystringrepeatedColumn(s) which constitute the dataset’s unique key index. If set, the resulting assertion will fail if there is more than one row in the dataset with the same values for all of these column(s).
uniqueKeysActionConfig.TableAssertionsConfig.UniqueKeyrepeated
nonNullstringrepeatedColumn(s) which may never be NULL. If set, the resulting assertion will fail if any row contains NULL values for these column(s).
rowConditionsstringrepeatedGeneral condition(s) which should hold true for all rows in the dataset. If set, the resulting assertion will fail if any row violates any of these condition(s).

ActionConfig.TableAssertionsConfig.UniqueKey

Section titled “ActionConfig.TableAssertionsConfig.UniqueKey”

Combinations of column(s), each of which should constitute a unique key index for the dataset. If set, the resulting assertion(s) will fail if there is more than one row in the dataset with the same values for all of the column(s) in the unique key(s).

FieldTypeLabelDescription
uniqueKeystringrepeated

FieldTypeLabelDescription
namestringThe name of the table. Defaults to the file’s name, without the extension; set it to override. Other actions ref() the table by this name.
datasetstringThe dataset (schema) of the table.
projectstringThe Google Cloud project (database) of the table.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
preOperationsstringrepeatedQueries to run before query. This can be useful for granting permissions.
postOperationsstringrepeatedQueries to run after query.
descriptionstringDescription of the table.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the table.
partitionBystringThe key by which to partition the table. Typically the name of a timestamp or the date column. See https://cloud.google.com/dataform/docs/partitions-clusters.
partitionExpirationDaysint32The number of days for which BigQuery stores data in each partition. The setting applies to all partitions in a table, but is calculated independently for each partition based on the partition time.
requirePartitionFilterboolDeclares whether the partitioned table requires a WHERE clause predicate filter that filters the partitioning column.
clusterBystringrepeatedThe keys by which to cluster partitions by. See https://cloud.google.com/dataform/docs/partitions-clusters.
labelsActionConfig.TableConfig.LabelsEntryrepeatedKey-value pairs for BigQuery labels.
additionalOptionsActionConfig.TableConfig.AdditionalOptionsEntryrepeatedKey-value pairs of additional options to pass to the BigQuery API. Some options, for example, partitionExpirationDays, have dedicated type/validity checked fields. For such options, use the dedicated fields.
dependOnDependencyAssertionsboolWhen set to true, assertions dependent upon any dependency will be add as dedpendency to this action
assertionsActionConfig.TableAssertionsConfigAssertions to be run on the dataset. If configured, relevant assertions will automatically be created and run as a dependency of this dataset.
hermeticboolIf true, this indicates that the action only depends on data from explicitly-declared dependencies. Otherwise if false, it indicates that the action depends on data from a source which has not been declared as a dependency.
icebergActionConfig.IcebergTableConfigConfiguration options for an Iceberg table.
metadataActionConfig.MetadataMetadata for this table.
reservationstringOptional. The BigQuery reservation to use for execution. If unset, the value from workflow_settings.yaml is used. If neither is set, default BigQuery behavior applies. sqlanvil CLI only (GCP sqlanvil support pending).
postgresPostgresOptionsPostgres and Supabase specific options.
supabaseSupabaseOptions
mysqlMysqlOptionsMySQL/MariaDB specific options (engine/charset/collation + indexes).
preserveGovernanceControlsbooloptionalOptional. If true, preserves existing BigQuery column governance controls (e.g. data policy) when recreating a table. Upstream #2220 numbers this 25, already taken here by postgres.

ActionConfig.TableConfig.AdditionalOptionsEntry

Section titled “ActionConfig.TableConfig.AdditionalOptionsEntry”
FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
keystring
valuestring

Target represents a unique action identifier.

FieldTypeLabelDescription
projectstringThe Google Cloud project (database) of the action.
datasetstringThe dataset (schema) of the action. For notebooks, this is the location.
namestringThe name of the action.
includeDependentAssertionsboolflag for when we want to add assertions of this dependency in dependency_targets as well.

FieldTypeLabelDescription
namestringThe name of the Postgres index. Set it explicitly; unlike most actions, it is not taken from the file name. The action itself is named {table}_idx_{name}.
tablestring
columnstring
dimensionsuint32
indexTypestring
paramsActionConfig.VectorIndexConfig.ParamsEntryrepeated
filenamestring
dependencyTargetsActionConfig.Targetrepeated

ActionConfig.VectorIndexConfig.ParamsEntry

Section titled “ActionConfig.VectorIndexConfig.ParamsEntry”
FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
namestringThe name of the view. Defaults to the file’s name, without the extension; set it to override. Other actions ref() the view by this name.
datasetstringThe dataset (schema) of the view.
projectstringThe Google Cloud project (database) of the view.
dependencyTargetsActionConfig.TargetrepeatedTargets of actions that this action is dependent on.
filenamestringPath to the source file that the contents of the action is loaded from.
tagsstringrepeatedA list of user-defined tags with which the action should be labeled.
disabledboolIf set to true, this action will not be executed. However, the action can still be depended upon. Useful for temporarily turning off broken actions.
preOperationsstringrepeatedQueries to run before query. This can be useful for granting permissions.
postOperationsstringrepeatedQueries to run after query.
materializedboolApplies the materialized view optimization, see https://cloud.google.com/bigquery/docs/materialized-views-intro.
partitionBystringOptional. Applicable only to materialized view. The key by which to partition the materialized view. Typically the name of a timestamp or the date column. See https://cloud.google.com/bigquery/docs/materialized-views-create#partitioned_materialized_views.
clusterBystringrepeatedOptional. Applicable only to materialized view. The keys by which to cluster partitions by. See https://cloud.google.com/bigquery/docs/materialized-views-create#cluster_materialized_views.
descriptionstringDescription of the view.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the table.
labelsActionConfig.ViewConfig.LabelsEntryrepeatedKey-value pairs for BigQuery labels.
additionalOptionsActionConfig.ViewConfig.AdditionalOptionsEntryrepeatedKey-value pairs of additional options to pass to the BigQuery API. Some options, for example, partitionExpirationDays, have dedicated type/validity checked fields. For such options, use the dedicated fields.
dependOnDependencyAssertionsboolWhen set to true, assertions dependent upon any dependency will be add as dedpendency to this action
hermeticboolIf true, this indicates that the action only depends on data from explicitly-declared dependencies. Otherwise if false, it indicates that the action depends on data from a source which has not been declared as a dependency.
assertionsActionConfig.TableAssertionsConfigAssertions to be run on the dataset. If configured, relevant assertions will automatically be created and run as a dependency of this dataset.
metadataActionConfig.MetadataMetadata for this view.
reservationstringOptional. The BigQuery reservation to use for execution. If unset, the value from workflow_settings.yaml is used. If neither is set, default BigQuery behavior applies. sqlanvil CLI only (GCP sqlanvil support pending).
postgresPostgresOptionsPostgres-native options. For a materialized view (materialized: true), no_data (CREATE … WITH NO DATA) and refresh_policy (“on_dependency_change” → in-place REFRESH instead of drop+recreate) apply; indexes also apply to materialized views.
mysqlMysqlOptionsMySQL/MariaDB-native options. Only meaningful for a materialized view (materialized: true), which MySQL emulates as a refreshed table snapshot — engine/charset/collation/row_format and indexes apply to that table.

ActionConfig.ViewConfig.AdditionalOptionsEntry

Section titled “ActionConfig.ViewConfig.AdditionalOptionsEntry”
FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
keystring
valuestring

Action configs defines the contents of actions.yaml configuration files.

FieldTypeLabelDescription
actionsActionConfigrepeated

BigQueryConnection — connection params for warehouse.kind = “bigquery”. Mirrors the legacy flat fields on WorkflowSettings (default_project, default_location, default_dataset) but namespaced under warehouse.

FieldTypeLabelDescription
projectstringThe Google Cloud project (database).
locationstringBigQuery location, e.g. “US”, “EU”, “europe-west4”.
defaultDatasetstringDefault dataset (schema).

A named connection: the warehouse (read/write target) or a read-only source.

FieldTypeLabelDescription
platformstringOptional. One of “bigquery”, “postgres”, “supabase”, “mysql”. MySQL/MariaDB sources are runner-extract only (no Postgres FDW for MySQL): the CLI reads the source at run time and materializes it into the write warehouse. sqlanvil introspect scaffolds declarations (columnTypes) from a MySQL source.
projectstringOptional. BigQuery source default project.
datasetstringOptional. BigQuery source default dataset.
saKeyIdstringOptional. Non-secret Vault secret id used in generated BigQuery FDW server DDL.
billingProjectstringOptional. BigQuery project that runs/bills the FDW query jobs. Defaults to project. Set this to your own project when project is a dataset you can read but not bill (e.g. bigquery-public-data): the FDW server’s project_id becomes the billing project and the foreign table reads the source via a full-FQN subquery.
hoststringOptional. Postgres/MySQL source host (non-secret; password lives in .df-credentials.json).
portuint32Optional. Postgres/MySQL source port.
databasestringOptional. Postgres/MySQL source database name.
defaultSchemastringOptional. Postgres/Supabase default schema.
modestringOptional. Source read mode for a cross-warehouse source connection: “fdw” (default for bigquery/postgres/supabase) — a live foreign-data-wrapper table (needs the Vault secret + wrappers). “runner-extract” (default and only mode for mysql; also supported for bigquery) — the CLI reads the source directly at run time and materializes the rows into a plain table (keyless; no Vault secret, no wrappers/postgis on the branch). See the extract action.

FieldTypeLabelDescription
bucketNamestringOptional. Bucket name used to construct a storage URI when creating an Iceberg table.
tableFolderRootstringOptional. Table folder root used to construct a storage URI when creating an Iceberg table.
tableFolderSubpathstringOptional. Table folder subpath used to construct a storage URI when creating an Iceberg table.
connectionstringOptional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage.

A named environment (dev/staging/prod). Holds only NON-SECRET overrides plus a pointer to a gitignored credentials file — never secrets themselves.

FieldTypeLabelDescription
schemaSuffixstring
varsEnvironment.VarsEntryrepeated
defaultDatabasestring
defaultLocationstring
credentialsstringPath (relative to the project dir) to this environment’s gitignored .df-credentials file.

FieldTypeLabelDescription
keystring
valuestring

FieldTypeLabelDescription
hoststring
portuint32
databasestring
userstring
passwordstring
sslModestringSSL mode: “disable"

MySQL/MariaDB table options, secondary indexes (plain/unique/fulltext/spatial, with optional per-column prefix lengths), row_format, and native partitioning.

FieldTypeLabelDescription
enginestringStorage engine, emitted as ENGINE=<engine> (e.g. “InnoDB”, “MyISAM”). Omit to use the server default.
charsetstringDefault character set, emitted as DEFAULT CHARSET=<charset> (e.g. “utf8mb4”).
collationstringDefault collation, emitted as COLLATE=<collation> (e.g. “utf8mb4_unicode_ci”).
rowFormatstringRow format, emitted as ROW_FORMAT=<row_format> (e.g. “DYNAMIC”, “COMPRESSED”, “COMPACT”, “REDUNDANT”). Omit to use the engine default.
indexesMysqlOptions.Indexrepeated
partitionMysqlOptions.Partition

FieldTypeLabelDescription
namestringOptional; when omitted, derived as <table>_<cols>_idx (or _key if unique), capped at 63 chars.
columnsstringrepeatedColumn names. A column may carry a prefix length in MySQL’s own syntax — “description(50)” — emitted as description(50) (required to index BLOB/TEXT, optional elsewhere).
uniquebool
typestringIndex type: "" (default B-tree/engine default), “fulltext”, or “spatial”. Mutually exclusive with unique. NB a SPATIAL index requires a NOT NULL SRID-attributed geometry column — CTAS-created columns are nullable, so spatial usually needs an ALTER TABLE ... MODIFY pre-step in post_operations.

Native MySQL/MariaDB partitioning. NB: MySQL requires every column used in the partitioning expression to be part of every UNIQUE/PRIMARY key — so a partitioned incremental table’s uniqueKey must include the partition column(s).

FieldTypeLabelDescription
kindMysqlOptions.Partition.Kind
expressionstringThe expression/columns inside PARTITION BY &lt;kind&gt; (...), emitted verbatim. For RANGE/LIST: a column or expression (e.g. “id”, “YEAR(created_at)”). For HASH/KEY: a column list. (RANGE COLUMNS / LIST COLUMNS not modeled in v1.)
partitionsMysqlOptions.Partition.Boundrepeated
countuint32HASH/KEY partition count, emitted as PARTITIONS &lt;n&gt;. Ignored for RANGE/LIST.

RANGE/LIST child partitions. values is the raw clause body after the name, e.g. “VALUES LESS THAN (2024)” (range, use MAXVALUE for a catch-all) or “VALUES IN (‘us’, ‘ca’)” (list).

FieldTypeLabelDescription
namestring
valuesstring

FieldTypeLabelDescription
outputBucketstringStorage bucket to output notebooks to after their execution.
runtimeTemplateNamestringColab runtime template (https://cloud.google.com/colab/docs/runtimes), from which a runtime is created for notebook executions.
repositorySnapshotDestinationRepositorySnapshotDestinationConfigStorage URI to upload the snapshot to. For empty URI it defaults to the provided output_bucket.

PostgresConnection — libpq-style connection params for warehouse.kind = “postgres”. Standard Postgres host/port/database/user.

FieldTypeLabelDescription
hoststring
portuint32
databasestring
userstring
passwordstring
sslModestringSSL mode: “disable"
defaultSchemastring

PostgresOptions — Postgres-native table-level options. Mirrors what BigQueryOptions-style fields do in TableConfig but in idiomatic Postgres.

Used as a peer of the existing bigquery: {...} shape on action configs: publish(“daily_orders”, { postgres: { tablespace: “fast_ssd”, … } })

FieldTypeLabelDescription
tablespacestringPhysical storage placement (CREATE TABLE … TABLESPACE <name>).
fillfactoruint32Storage parameter — fraction of each page to fill on insert (1-100).
unloggedboolCREATE UNLOGGED TABLE — faster writes, lost on crash. For staging/temp tables where durability isn’t required.
partitionPostgresOptions.Partition
indexesPostgresOptions.Indexrepeated
noDataboolMaterialized view: create WITH NO DATA (empty until first refresh). Default (false) is WITH DATA. Named for the non-default so proto3’s false default means the sensible WITH DATA.
refreshPolicystringMaterialized view refresh on re-run: “on_dependency_change” refreshes an existing matview in place (REFRESH MATERIALIZED VIEW) instead of dropping + recreating. Default (unset) drops + recreates each run (safe — also picks up definition changes, which REFRESH does not).

Indexes to create alongside the table.

FieldTypeLabelDescription
namestring
columnsstringrepeated
methodPostgresOptions.Index.Method
wherestringPartial index predicate (WHERE <expr>).
uniquebool
includestringrepeatedINCLUDE non-key columns for covering indexes.
opclassstringOperator class applied to each indexed column, e.g. “gin_trgm_ops” (pg_trgm), “jsonb_path_ops”, or “vector_l2_ops” (pgvector). Required for gin/gist indexes on types without a default opclass.

Native Postgres declarative partitioning.

FieldTypeLabelDescription
kindPostgresOptions.Partition.Kind
columnsstringrepeated
partitionsPostgresOptions.Partition.Boundrepeated
includeDefaultboolAlso create a catch-all DEFAULT partition so rows outside every bound still insert (recommended for declarative full-refresh loads).

Child partitions. values is the raw FOR VALUES clause body matching the kind, e.g. “FROM (‘2024-01-01’) TO (‘2025-01-01’)” (range), “IN (‘us’, ‘ca’)” (list), or “WITH (MODULUS 4, REMAINDER 0)” (hash).

FieldTypeLabelDescription
namestring
valuesstring
subPartitionPostgresOptions.PartitionSub-partitioning: make this child a partitioned table in its own right (PARTITION BY …), with its own nested partitions. Omit for a leaf child that holds rows directly.

FieldTypeLabelDescription
repositorySnapshotUristringStorage URI to upload the repository snapshot to.

SupabaseConnection — connection params for warehouse.kind = “supabase”. Supabase projects expose a Postgres connection via project_ref + service_role_key, or a direct connection string for bypassing PostgREST.

FieldTypeLabelDescription
projectRefstringFrom the Supabase dashboard (project URL host before .supabase.co).
serviceRoleKeystringProject service-role JWT. NEVER commit literally — use ${ENV_VAR} interpolation in workflow_settings.yaml.
defaultSchemastring
connectionStringstringOptional override — direct Postgres URL bypassing the PostgREST proxy. e.g. “postgresql://postgres:${PASSWORD}@db.<project_ref>.supabase.co:5432/postgres”. If set, takes precedence over project_ref + service_role_key for the direct DB connection. service_role_key is still used for RLS bypass.

SupabaseOptions — Supabase-specific platform features layered on top of standard Postgres. Used as a peer of postgres: {...} on table and incremental table configs, and only valid with warehouse: supabase. The settings are applied each time the table is created (every run for a table; the first run or a full refresh for an incremental table), after its indexes and before its post_operations.

FieldTypeLabelDescription
postgresPostgresOptionsStandard Postgres options apply. Set these via postgres: directly or nest under supabase.postgres: — either is accepted; postgres: wins if both are set.
publishToRealtimeboolALTER TABLE <this> REPLICA IDENTITY FULL, then ALTER PUBLICATION supabase_realtime ADD TABLE <this>.
enableRlsboolALTER TABLE <this> ENABLE ROW LEVEL SECURITY. Note: only enables RLS — declare policies with rlsPolicy().
ownerRolestringALTER TABLE <this> OWNER TO <role>. Typically “postgres” or “service_role”.
vectorsSupabaseOptions.VectorConfigrepeated

pgvector index on a vector column, named <table>_<column>_idx. Creates the vector extension if needed (the column’s type must already exist when the table is created).

FieldTypeLabelDescription
columnstringThe vector column to index. Required.
dimensionsuint32Informational; the column’s declared type sets the dimensions.
indexTypeSupabaseOptions.VectorConfig.IndexType”hnsw” (the default when omitted) or “ivfflat”, in any case.
paramsSupabaseOptions.VectorConfig.ParamsEntryrepeatedopclass sets the operator class (default vector_cosine_ops); every other key becomes an index storage parameter. ivfflat: { lists }, hnsw: { m, ef_construction }.

FieldTypeLabelDescription
keystring
valuestring

WarehouseConfig — discriminated union over connection variants. The kind: YAML tag selects which oneof arm is unmarshalled.

Example YAML: warehouse: kind: postgres host: db.example.com port: 5432 database: analytics user: sqlanvil_writer password: ${PG_PASSWORD} ssl_mode: require default_schema: public

FieldTypeLabelDescription
bigqueryBigQueryConnection
postgresPostgresConnection
supabaseSupabaseConnection
mysqlMysqlConnection

Workflow Settings defines the contents of the workflow_settings.yaml configuration file.

FieldTypeLabelDescription
sqlanvilCoreVersionstringThe desired sqlanvil core version to compile against.
defaultProjectstringRequired. The default Google Cloud project (database).
defaultDatasetstringRequired. The default dataset (schema).
defaultLocationstringRequired. The default BigQuery location to use. For more information on BigQuery locations, see https://cloud.google.com/bigquery/docs/locations.
defaultAssertionDatasetstringRequired. The default dataset (schema) for assertions.
varsWorkflowSettings.VarsEntryrepeatedOptional. User-defined variables that are made available to project code during compilation. An object containing a list of “key”: value pairs.
projectSuffixstringOptional. The suffix to append to all Google Cloud project references.
datasetSuffixstringOptional. The suffix to append to all dataset references.
namePrefixstringOptional. The prefix to append to all action names.
defaultNotebookRuntimeOptionsNotebookRuntimeOptionsConfigOptional. Default runtime options for Notebook actions.
builtinAssertionNamePrefixstringOptional. The prefix to append to built-in assertion names.
defaultIcebergConfigDefaultIcebergConfigOptional. Default config options for Iceberg tables.
disableAssertionsboolOptional. Disables all assertions including built-in assertions (uniqueKey, nonNull, rowConditions) and manual assertions (type: assertion). When true, assertions will still be compiled but marked as disabled.
defaultReservationstringOptional. The default BigQuery reservation to use for execution. If unset, default BigQuery behavior applies. sqlanvil CLI only (GCP sqlanvil support pending).
extensionExtensionOptional. An external package that provides an extension.
includeTestsInCompiledGraphboolOptional. If set to true, unit tests will be included in the compiled graph.
warehousestringOptional. The database warehouse to use, e.g. “bigquery”, “postgres”, “supabase”.
connectionsWorkflowSettings.ConnectionsEntryrepeatedOptional. Named connections (warehouse + read-only sources).
environmentsWorkflowSettings.EnvironmentsEntryrepeatedOptional. Named environments (dev/staging/prod) selected with --environment.
preserveGovernanceControlsboolOptional. If set to true, governance controls (e.g. Data Policies) will be preserved on BigQuery tables. BigQuery only — no other warehouse has the concept. Upstream #2220 numbers this 18, which sqlanvil already uses for connections.

FieldTypeLabelDescription
keystring
valueConnectionConfig

FieldTypeLabelDescription
keystring
valueEnvironment

FieldTypeLabelDescription
keystring
valuestring

ActionConfig.IcebergTableConfig.FileFormat

Section titled “ActionConfig.IcebergTableConfig.FileFormat”

Supported file formats for BigQuery tables.

NameNumberDescription
FILE_FORMAT_UNSPECIFIED0Default value.
PARQUET1Apache Parquet format.

NameNumberDescription
INCREMENTAL_STRATEGY_UNSPECIFIED0Strategy is unspecified. Defaults to MERGE if uniqueKey is configured, or APPEND otherwise.
INCREMENTAL_STRATEGY_MERGE1MERGE strategy. Matches rows based on uniqueKey to update existing rows or insert new ones.
INCREMENTAL_STRATEGY_INSERT_OVERWRITE2INSERT_OVERWRITE strategy. Overwrites entire partitions in the target table that are present in the new staging data.

NameNumberDescription
REPLACE_TABLE0Replace existing table (default).
APPEND1Insert into destination table.
MAXIMUM2Insert only records where the specified column value exceeds the existing maximum value in the destination table.
UNIQUE3Insert only records where the specified column value is not already present in the destination column values.
MERGE4Merge records into the destination table, deduplicating using 1+ unique keys

NameNumberDescription
IGNORE0Ignore any schema changes (default).
FAIL1Fails if the query would result in a new column(s) being added, deleted, or renamed.
EXTEND2Does not block any new column(s) from being added.
SYNCHRONIZE3Does not block any new column(s) from being added, deleted or renamed.

NameNumberDescription
RANGE0
LIST1
HASH2
KEY3

NameNumberDescription
BTREE0
HASH1
GIN2
GIST3
BRIN4

NameNumberDescription
RANGE0
LIST1
HASH2

NameNumberDescription
IVFFLAT0
HNSW1
.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)