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

FieldTypeLabelDescription
namestringThe name of the assertion.
datasetstringThe schema (BigQuery dataset / Postgres schema) of the assertion.
projectstringThe database of the assertion. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
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.
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

FieldTypeLabelDescription
pathstringrepeatedThe identifier for the column, using multiple parts for nested records.
descriptionstringA text description of the column.
bigqueryPolicyTagsstringrepeatedBigQuery only. A 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.
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.
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

FieldTypeLabelDescription
namestringThe name of the declaration.
datasetstringThe schema (BigQuery dataset / Postgres schema) of the declaration.
projectstringThe database of the declaration. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
descriptionstringDescription of the declaration.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the declaration.

FieldTypeLabelDescription
namestringThe name of the incremental table.
datasetstringThe schema (BigQuery dataset / Postgres schema) of the incremental table.
projectstringThe database of the incremental table. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
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. BigQuery only. See https://cloud.google.com/dataform/docs/partitions-clusters for BigQuery partitioning. For Postgres, use the postgres.partition config block.
partitionExpirationDaysint32BigQuery only. The number of days for which BigQuery stores data in each partition. Set to 0 to use the default.
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.
clusterBystringrepeatedBigQuery only. The keys by which to cluster the table. See https://cloud.google.com/dataform/docs/partitions-clusters. Has no equivalent in Postgres — use a btree index instead.
labelsActionConfig.IncrementalTableConfig.LabelsEntryrepeatedBigQuery only. Key-value pairs for BigQuery labels.
additionalOptionsActionConfig.IncrementalTableConfig.AdditionalOptionsEntryrepeatedBigQuery only. Key-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.
onSchemaChangeActionConfg.OnSchemaChangeDefines the action behavior if the selected columns in query doesn’t match columns in the target table.
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

ActionConfig.IncrementalTableConfig.AdditionalOptionsEntry

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

ActionConfig.IncrementalTableConfig.LabelsEntry

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

FieldTypeLabelDescription
namestringThe name of the notebook.
locationstringBigQuery only. The Google Cloud location of the notebook.
projectstringThe database of the notebook. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
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
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

ValueDescription
IGNORENew columns are ignored. Fails if columns are deleted or renamed. Default value.
FAILFails if the query would result in a new column(s) being added, deleted, or renamed.
EXTENDNew columns will be added to the target table. Fails if columns are deleted or renamed.
SYNCHRONIZEDoes not block any new column(s) from being added, deleted or renamed. Partitioned or clustered columns cannot be deleted or renamed.

FieldTypeLabelDescription
namestringThe name of the operation.
datasetstringThe schema (BigQuery dataset / Postgres schema) of the operation.
projectstringThe database of the operation. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
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.
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

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.
datasetstringThe schema (BigQuery dataset / Postgres schema) of the table.
projectstringThe database of the table. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
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. BigQuery only. See https://cloud.google.com/dataform/docs/partitions-clusters for BigQuery partitioning. For Postgres, use the postgres.partition config block.
partitionExpirationDaysint32BigQuery only. The number of days for which BigQuery stores data in each partition. Set to 0 to use the default.
requirePartitionFilterboolDeclares whether the partitioned table requires a WHERE clause predicate filter that filters the partitioning column.
clusterBystringrepeatedBigQuery only. The keys by which to cluster the table. See https://cloud.google.com/dataform/docs/partitions-clusters. Has no equivalent in Postgres — use a btree index instead.
labelsActionConfig.TableConfig.LabelsEntryrepeatedBigQuery only. Key-value pairs for BigQuery labels.
additionalOptionsActionConfig.TableConfig.AdditionalOptionsEntryrepeatedBigQuery only. Key-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.
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

ActionConfig.TableConfig.AdditionalOptionsEntry

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

FieldTypeLabelDescription
keystring
valuestring

Target represents a unique action identifier.

FieldTypeLabelDescription
projectstringThe database of the action. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
datasetstringThe schema (BigQuery dataset / Postgres 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 view.
datasetstringThe schema (BigQuery dataset / Postgres schema) of the view.
projectstringThe database of the view. For BigQuery targets this is the GCP project ID; for Postgres/Supabase targets this is the database name.
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. In BigQuery, materialized views are auto-refreshed. In Postgres, use REFRESH MATERIALIZED VIEW.
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. BigQuery only. Partition the materialized view. See BigQuery docs for details.
clusterBystringrepeatedOptional. Applicable only to materialized view. The keys by which to cluster partitions by. BigQuery only. Cluster the materialized view. See BigQuery docs for details.
descriptionstringDescription of the view.
columnsActionConfig.ColumnDescriptorrepeatedDescriptions of columns within the table.
labelsActionConfig.ViewConfig.LabelsEntryrepeatedBigQuery only. Key-value pairs for BigQuery labels.
additionalOptionsActionConfig.ViewConfig.AdditionalOptionsEntryrepeatedBigQuery only. Key-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.
reservationstringBigQuery only. Optional. The BigQuery reservation to use for execution. Has no effect on Postgres or Supabase targets.

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

FieldTypeLabelDescription
outputBucketstringStorage bucket to output notebooks to after their execution.

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

FieldTypeLabelDescription
sqlanvilCoreVersionstringThe desired sqlanvil core version to compile against.
defaultProjectstringRequired. The default database. For BigQuery this is the GCP project ID; for Postgres/Supabase this is the database name in workflow_settings.yaml.
defaultDatasetstringRequired. The default schema (BigQuery dataset / Postgres schema name).
defaultLocationstringBigQuery only. Required for BigQuery targets. The default BigQuery location (e.g. US, EU). 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.
projectSuffixstringBigQuery only. Optional. 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.
defaultReservationstringBigQuery only. Optional. The default BigQuery reservation to use for execution.

FieldTypeLabelDescription
keystring
valuestring
.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)