Skip to content

Assert View

The Assert View component lets users verify that certain conditions are true of a view, or otherwise stop the query.

Whenever a view is accessible on a transformation job, users can attach an Assert View component and assert against the metadata, values, and row count using comparison operators such as "Equal to", "Less than or equal to", "Greater than or equal to", and "Range".

This component forms part of Matillion ETL's assert components suite. This suite of components is an Enterprise Mode feature.

Learn about Matillion ETL's other assert components in the Assert components overview.


Properties

Name = string

A human-readable name for the component.


Metadata = column editor

  • Name: The name of the column.
  • Type: Select the data type.
    • Varchar: This type is suitable for numbers and letters. A varchar or Variable Character Field is a set of character data of indeterminate length.
    • Number: This type is suitable for numeric types, without or with decimals.
    • Float: This type of values are approximate numeric values with fractional components.
    • Boolean: This type is suitable for data that is either "true" or "false".
    • Date: This type is suitable for dates without times.
    • Time: This type is suitable for time, independent of a specific date and timezone.
    • Timestamp: This type is a timestamp left unformatted (exists as Unix/Epoch Time).
    • Variant: Variant is a tagged universal type that can hold up to 16 MB of any data type supported by Snowflake.
  • Size: For Text types, this is the maximum length. This is a limit on the number of bytes, not characters. For Numeric types, this is the total number of digits allowed, whether before or after the decimal point.
  • Scale: Relevant only for numeric data, it is the maximum number of digits that may appear to the right of the decimal point.

Values = data type dependent

Input the values for each column. Separate values in the same column with a comma.


Ignore Metadata Order = boolean

When set to True, Matillion ETL will ignore the metadata order. Default is False.


Row Count Comparison Type = drop-down

Select how row count values are compared. Possible comparison operators are: "Equal to", "Greater than or equal to", "Less than or equal to", and "Range".

  • Equal to: The value in the Input Column must be equal to that specified in the Value Column. This is the default comparison operator.
  • Greater than or equal to: The value in the Input Column must be greater than or equal to the value in the Value Column.
  • Less than or equal to: The value in the Input Column must be less than or equal to the value in the Value Column.
  • Range: This allows users to specify the range for the value of the row counts.

Selecting "Range" makes the Upper Value and Lower Value properties available.

Not all data sources support all comparison operators; thus, it is likely that only a subset of the above comparison operators will be available to choose from.


Lower Value = integer

Set the lower value. This property is only available when Row Count Comparison Type is set to Range.


Upper Value = integer

Set the upper value. This property is only available when Row Count Comparison Type is set to Range.


Row Count Value = integer

Specify the number of rows.

Name = string

A human-readable name for the component.


Metadata = column editor

  • Name: The name of the column.
  • Type: Select from INTEGER, NUMBER, FLOAT, TEXT, TIMESTAMP, DATE, BOOLEAN, BINARY as the data type for this column. For more information, read Data Types.
  • Size: Set the data type size.
  • Scale: Set the data type scale.

Values = data type dependent

Input the values for each column. Separate values in the same column with a comma.


Ignore Metadata Order = boolean

When set to True, Matillion ETL will ignore the metadata order. Default is False.


Row Count Comparison Type = drop-down

Select how row count values are compared. Possible comparison operators are: "Equal to", "Greater than or equal to", "Less than or equal to", and "Range".

  • Equal to: The value in the Input Column must be equal to that specified in the Value Column. This is the default comparison operator.
  • Greater than or equal to: The value in the Input Column must be greater than or equal to the value in the Value Column.
  • Less than or equal to: The value in the Input Column must be less than or equal to the value in the Value Column.
  • Range: This allows users to specify the range for the value of the row counts.

Selecting "Range" makes the Upper Value and Lower Value properties available.

Not all data sources support all comparison operators; thus, it is likely that only a subset of the above comparison operators will be available to choose from.


Lower Value = integer

Set the lower value. This property is only available when Row Count Comparison Type is set to Range.


Upper Value = integer

Set the upper value. This property is only available when Row Count Comparison Type is set to Range.


Row Count Value = integer

Specify the number of rows.

Name = string

A human-readable name for the component.


Metadata = column editor

  • Name: The name of the column.
  • Type: Select the data type.
    • Text: A string can hold any kind of data, subject to a maximum size.
    • Integer: An integer data type is suitable for whole numbers (no decimals).
    • Numeric: The numeric data type accepts numbers, with or without decimals.
    • Real: This type is suitable for data of a single precision floating-point number.
    • Double Precision: This type is suitable for data of a double precision floating-point number.
    • Boolean: Data with a Boolean data type can be either "true" or "false".
    • Date: This type is suitable for dates without times.
    • DateTime: This type is suitable for dates, times, or timestamps (both date and time).
    • SUPER: Use the SUPER data type to store semi-structured data or documents as values.
  • Size: For text types, this is the maximum length. This is a limit on the number of bytes, not characters. For Redshift, since all data is stored using UTF-8, any non-ASCII character will count as 2 or more bytes. For Numeric types, this is the total number of digits allowed, whether before or after the decimal point.
  • Scale: The number of decimal digits in the fractional part of the value, to the right of the decimal point. Integers have a scale of zero. In a column specification, the scale value must be less than or equal to the precision value. Default is 0. Maximum is 37.

Values = data type dependent

Input the values for each column. Separate values in the same column with a comma.


Ignore Metadata Order = boolean

When set to True, Matillion ETL will ignore the metadata order. Default is False.


Row Count Comparison Type = drop-down

Select how row count values are compared. Possible comparison operators are: "Equal to", "Greater than or equal to", "Less than or equal to", and "Range".

  • Equal to: The value in the Input Column must be equal to that specified in the Value Column. This is the default comparison operator.
  • Greater than or equal to: The value in the Input Column must be greater than or equal to the value in the Value Column.
  • Less than or equal to: The value in the Input Column must be less than or equal to the value in the Value Column.
  • Range: This allows users to specify the range for the value of the row counts.

Selecting "Range" makes the Upper Value and Lower Value properties available.

Not all data sources support all comparison operators; thus, it is likely that only a subset of the above comparison operators will be available to choose from.


Lower Value = integer

Set the lower value. This property is only available when Row Count Comparison Type is set to Range.


Upper Value = integer

Set the upper value. This property is only available when Row Count Comparison Type is set to Range.


Row Count Value = integer

Specify the number of rows.

Name = string

A human-readable name for the component.


Metadata = column editor

  • Name: The name of the field.
  • Data Type: Select the data type.
    • String: A string can hold any kind of data, subject to a maximum size.
    • Integer: An integer data type is suitable for whole numbers (no decimals).
    • Float: Floating point values are approximate numeric values with fractional components.
    • Numeric: The numeric data type accepts numbers, with or without decimals.
    • Boolean: Data with a Boolean data type can be either "true" or "false".
    • Date: This data type is suitable for dates without times.
    • Time: This data type is suitable for time, independent of a specific date or timezone.
    • DateTime: This type is suitable for dates, times, or timestamps (both date and time).
    • Timestamp: This type is a timestamp left unformatted (exists as Unix/Epoch Time).
    • Struct: This data type is suitable for a struct.
  • Mode: BigQuery supports the following modes for your fields. Using a mode is optional. If the mode is unspecified, the column defaults to NULLABLE.
    • NULLABLE: Column allows NULL values (default).
    • REQUIRED: NULL values are not allowed.
    • REPEATED: Column contains an array of values of the specified type.

Values = data type dependent

Input the values for each column. Separate values in the same column with a comma.


Ignore Metadata Order = boolean

When set to True, Matillion ETL will ignore the metadata order. Default is False.


Row Count Comparison Type = drop-down

Select how row count values are compared. Possible comparison operators are: "Equal to", "Greater than or equal to", "Less than or equal to", and "Range".

  • Equal to: The value in the Input Column must be equal to that specified in the Value Column. This is the default comparison operator.
  • Greater than or equal to: The value in the Input Column must be greater than or equal to the value in the Value Column.
  • Less than or equal to: The value in the Input Column must be less than or equal to the value in the Value Column.
  • Range: This allows users to specify the range for the value of the row counts.

Selecting "Range" makes the Upper Value and Lower Value properties available.

Not all data sources support all comparison operators; thus, it is likely that only a subset of the above comparison operators will be available to choose from.


Lower Value = integer

Set the lower value. This property is only available when Row Count Comparison Type is set to Range.


Upper Value = integer

Set the upper value. This property is only available when Row Count Comparison Type is set to Range.


Row Count Value = integer

Specify the number of rows.

Name = string

A human-readable name for the component.


Metadata = column editor

  • Name: The name of the column.
  • Type: Select the data type.
    • DATE: This data type is suitable for dates without times.
    • DATETIME: This data type is suitable for timestamps.
    • TIME: This data type is suitable for times.
    • INTEGER: This data type is suitable for whole number types (no decimals).
    • NUMERIC: This data type is suitable for numeric types, with or without decimals.
    • TEXT: This data type is suitable for text types.
    • FLOAT: This data type is suitable for approximate number data types for use with floating point numeric data.
    • BOOLEAN: This data type is suitable for data where values are either "true" or "false".
  • Size: Set the data type size. For T-SQL, this is denoted as Precision.
  • Precision: Set the data type scale. For T-SQL, this is denoted as Scale.

Values = data type dependent

Input the values for each column. Separate values in the same column with a comma.


Ignore Metadata Order = boolean

When set to True, Matillion ETL will ignore the metadata order. Default is False.


Row Count Comparison Type = drop-down

Select how row count values are compared. Possible comparison operators are: "Equal to", "Greater than or equal to", "Less than or equal to", and "Range".

  • Equal to: The value in the Input Column must be equal to that specified in the Value Column. This is the default comparison operator.
  • Greater than or equal to: The value in the Input Column must be greater than or equal to the value in the Value Column.
  • Less than or equal to: The value in the Input Column must be less than or equal to the value in the Value Column.
  • Range: This allows users to specify the range for the value of the row counts.

Selecting "Range" makes the Upper Value and Lower Value properties available.

Not all data sources support all comparison operators; thus, it is likely that only a subset of the above comparison operators will be available to choose from.


Lower Value = integer

Set the lower value. This property is only available when Row Count Comparison Type is set to Range.


Upper Value = integer

Set the upper value. This property is only available when Row Count Comparison Type is set to Range.


Row Count Value = integer

Specify the number of rows.


Date, DateTime, Time, and Timestamp Validation

Matillion ETL accepts a variety of date, time, datetime, and timestamp values. Some of the most common values accepted are listed below.

Note

  • The list of examples below is not exhaustive, but covers many of the most commonly accepted formats.
  • In applicable examples below, the number 13 is used as the value for day, to avoid confusion with month values.
  • Please note that the backslash character can be replaced by a dash, underscore, full stop, or colon.
  • Dates cannot contain time values.
  • Times cannot contain date values.
  • The datetime/timestamp values listed below can be just the date, but not just the time.
  • The datetime/timestamp values accepted combine certain date patterns with all of the time patterns, split by either a whitespace character or a T character.
  • There are a number of exceptions that are accepted, such as BC dates, negative dates, and also month values greater than 12. None of these are listed below, and we advise caution when using these values.

The following date values are accepted:

  • 13/01/2021
  • 01/13/2021
  • 2021/1/13
  • 13/JAN/2021
  • 2021
  • JAN 13 2021
  • 13 January, 2021
  • January 13, 2021

The following time values are accepted:

  • 23:12
  • 23:12:59
  • 23:12:59.123456 (milli/micro/nano are all supported)

The following time values (with offset) are accepted:

  • 23:12 +01:00
  • 23:12:59 +01:00
  • 23:12:59.123456 +01:00 (milli/micro/nano are all supported)

The following datetime and timestamp values are accepted:

  • 13-01-2021 23:12:59.123456 +01:00
  • 2021-01-13 23:12:59.123456 +01:00

On Snowflake, dates and times are parsed using Snowflake's auto parameter, which handles a number of common date formats. Read Supported Formats for AUTO Detection for examples. Parsing defaults to AUTO, which may not behave as expected when using the common mm/dd/yyyy and dd/mm/yyyy date formats.


Snowflake Delta Lake on Databricks Amazon Redshift Google BigQuery Azure Synapse Analytics