From dfb42f162096874a9e979562283c96e23ecae05f Mon Sep 17 00:00:00 2001 From: Piotr Czarnas Date: Tue, 7 May 2024 15:32:15 +0200 Subject: [PATCH] Update documentation with most recent SQL samples. --- .../models/column_type_snapshot_spec.py | 9 +++++ .../client/models/duckdb_storage_type.py | 1 + .../text-length-above-max-length-percent.md | 40 +++++++++---------- .../text/text-length-above-max-length.md | 40 +++++++++---------- .../text-length-below-min-length-percent.md | 40 +++++++++---------- .../text/text-length-below-min-length.md | 40 +++++++++---------- .../text/text-length-in-range-percent.md | 40 +++++++++---------- docs/checks/column/text/text-max-length.md | 40 +++++++++---------- docs/checks/column/text/text-mean-length.md | 40 +++++++++---------- docs/checks/column/text/text-min-length.md | 40 +++++++++---------- docs/command-line-interface/connection.md | 22 +++++----- .../sensors/column/text-column-sensors.md | 16 ++++---- docs/reference/yaml/ConnectionYaml.md | 2 +- docs/reference/yaml/TableYaml.md | 1 + .../KeyValueProperties/index.tsx | 9 +++-- .../swagger-api/dqops-api-openapi-3.json | 15 ++++++- .../swagger-api/dqops-api-swagger-2.json | 2 +- .../swagger-api/dqops-api-swagger-2.yaml | 1 + 18 files changed, 211 insertions(+), 187 deletions(-) diff --git a/distribution/python/dqops/client/models/column_type_snapshot_spec.py b/distribution/python/dqops/client/models/column_type_snapshot_spec.py index cf3d287eb6..e4a0161b1b 100644 --- a/distribution/python/dqops/client/models/column_type_snapshot_spec.py +++ b/distribution/python/dqops/client/models/column_type_snapshot_spec.py @@ -17,6 +17,8 @@ class ColumnTypeSnapshotSpec: length (Union[Unset, int]): Maximum length of text and binary columns. precision (Union[Unset, int]): Precision of a numeric (decimal) data type. scale (Union[Unset, int]): Scale of a numeric (decimal) data type. + nested (Union[Unset, bool]): This field is a nested field inside another STRUCT. It is used to identify nested + fields in JSON files. """ column_type: Union[Unset, str] = UNSET @@ -24,6 +26,7 @@ class ColumnTypeSnapshotSpec: length: Union[Unset, int] = UNSET precision: Union[Unset, int] = UNSET scale: Union[Unset, int] = UNSET + nested: Union[Unset, bool] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -32,6 +35,7 @@ def to_dict(self) -> Dict[str, Any]: length = self.length precision = self.precision scale = self.scale + nested = self.nested field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -46,6 +50,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["precision"] = precision if scale is not UNSET: field_dict["scale"] = scale + if nested is not UNSET: + field_dict["nested"] = nested return field_dict @@ -62,12 +68,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: scale = d.pop("scale", UNSET) + nested = d.pop("nested", UNSET) + column_type_snapshot_spec = cls( column_type=column_type, nullable=nullable, length=length, precision=precision, scale=scale, + nested=nested, ) column_type_snapshot_spec.additional_properties = d diff --git a/distribution/python/dqops/client/models/duckdb_storage_type.py b/distribution/python/dqops/client/models/duckdb_storage_type.py index 4d87e1dfd2..94ff010da1 100644 --- a/distribution/python/dqops/client/models/duckdb_storage_type.py +++ b/distribution/python/dqops/client/models/duckdb_storage_type.py @@ -2,6 +2,7 @@ class DuckdbStorageType(str, Enum): + AZURE = "azure" LOCAL = "local" S3 = "s3" diff --git a/docs/checks/column/text/text-length-above-max-length-percent.md b/docs/checks/column/text/text-length-above-max-length-percent.md index aa068ffe8d..8fc6bef184 100644 --- a/docs/checks/column/text/text-length-above-max-length-percent.md +++ b/docs/checks/column/text/text-length-above-max-length-percent.md @@ -320,7 +320,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -341,7 +341,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -1065,7 +1065,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -1085,7 +1085,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -1908,7 +1908,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -1929,7 +1929,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -2654,7 +2654,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -2674,7 +2674,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -3497,7 +3497,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -3518,7 +3518,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -4243,7 +4243,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -4263,7 +4263,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -5096,7 +5096,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -5117,7 +5117,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -5856,7 +5856,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -5876,7 +5876,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -6707,7 +6707,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -6728,7 +6728,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -7467,7 +7467,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -7487,7 +7487,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END diff --git a/docs/checks/column/text/text-length-above-max-length.md b/docs/checks/column/text/text-length-above-max-length.md index 660edfd66c..83b24915c7 100644 --- a/docs/checks/column/text/text-length-above-max-length.md +++ b/docs/checks/column/text/text-length-above-max-length.md @@ -299,7 +299,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -317,7 +317,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -972,7 +972,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -989,7 +989,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -1743,7 +1743,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -1761,7 +1761,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -2417,7 +2417,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -2434,7 +2434,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -3188,7 +3188,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -3206,7 +3206,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -3862,7 +3862,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -3879,7 +3879,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -4643,7 +4643,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -4661,7 +4661,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -5331,7 +5331,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -5348,7 +5348,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -6110,7 +6110,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -6128,7 +6128,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END @@ -6798,7 +6798,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -6815,7 +6815,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) > 100 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) > 100 THEN 1 ELSE 0 END diff --git a/docs/checks/column/text/text-length-below-min-length-percent.md b/docs/checks/column/text/text-length-below-min-length-percent.md index dfc40ead28..bee3afe4eb 100644 --- a/docs/checks/column/text/text-length-below-min-length-percent.md +++ b/docs/checks/column/text/text-length-below-min-length-percent.md @@ -319,7 +319,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -340,7 +340,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -1021,7 +1021,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -1041,7 +1041,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -1821,7 +1821,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -1842,7 +1842,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -2524,7 +2524,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -2544,7 +2544,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -3324,7 +3324,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -3345,7 +3345,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -4027,7 +4027,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -4047,7 +4047,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -4837,7 +4837,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -4858,7 +4858,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -5554,7 +5554,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -5574,7 +5574,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -6362,7 +6362,7 @@ spec: WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -6383,7 +6383,7 @@ spec: WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -7079,7 +7079,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -7099,7 +7099,7 @@ Expand the *Configure with data grouping* section to see additional examples for WHEN COUNT(analyzed_table.`target_column`) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END diff --git a/docs/checks/column/text/text-length-below-min-length.md b/docs/checks/column/text/text-length-below-min-length.md index feccdc32e2..30e1650a56 100644 --- a/docs/checks/column/text/text-length-below-min-length.md +++ b/docs/checks/column/text/text-length-below-min-length.md @@ -298,7 +298,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -316,7 +316,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -929,7 +929,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -946,7 +946,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -1658,7 +1658,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -1676,7 +1676,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -2290,7 +2290,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -2307,7 +2307,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -3019,7 +3019,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -3037,7 +3037,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -3651,7 +3651,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -3668,7 +3668,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -4390,7 +4390,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -4408,7 +4408,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -5036,7 +5036,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -5053,7 +5053,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -5773,7 +5773,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -5791,7 +5791,7 @@ spec: SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END @@ -6419,7 +6419,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -6436,7 +6436,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT SUM( CASE - WHEN LENGTH(analyzed_table.`target_column`) < 5 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) < 5 THEN 1 ELSE 0 END diff --git a/docs/checks/column/text/text-length-in-range-percent.md b/docs/checks/column/text/text-length-in-range-percent.md index 7f3fbe49e2..eb4bc21589 100644 --- a/docs/checks/column/text/text-length-in-range-percent.md +++ b/docs/checks/column/text/text-length-in-range-percent.md @@ -311,7 +311,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -332,7 +332,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -958,7 +958,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -978,7 +978,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -1703,7 +1703,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -1724,7 +1724,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -2351,7 +2351,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -2371,7 +2371,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -3096,7 +3096,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -3117,7 +3117,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -3744,7 +3744,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -3764,7 +3764,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -4499,7 +4499,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -4520,7 +4520,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -5161,7 +5161,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -5181,7 +5181,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -5914,7 +5914,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -5935,7 +5935,7 @@ spec: ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) @@ -6576,7 +6576,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -6596,7 +6596,7 @@ Expand the *Configure with data grouping* section to see additional examples for ELSE 100.0 * SUM( CASE - WHEN LENGTH( analyzed_table.`target_column` ) BETWEEN 5 AND 100 THEN 1 + WHEN LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) BETWEEN 5 AND 100 THEN 1 ELSE 0 END ) / COUNT(analyzed_table.`target_column`) diff --git a/docs/checks/column/text/text-max-length.md b/docs/checks/column/text/text-max-length.md index 7d47f304d6..a525bb2113 100644 --- a/docs/checks/column/text/text-max-length.md +++ b/docs/checks/column/text/text-max-length.md @@ -269,7 +269,7 @@ spec: SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -283,7 +283,7 @@ spec: ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -754,7 +754,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -767,7 +767,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -1337,7 +1337,7 @@ spec: SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -1351,7 +1351,7 @@ spec: ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-%d 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-%d 00:00:00'))) AS time_period_utc @@ -1823,7 +1823,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -1836,7 +1836,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -2406,7 +2406,7 @@ spec: SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2420,7 +2420,7 @@ spec: ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -2892,7 +2892,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2905,7 +2905,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -3485,7 +3485,7 @@ spec: SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -3499,7 +3499,7 @@ spec: ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-%d 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-%d 00:00:00'))) AS time_period_utc @@ -3985,7 +3985,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -3998,7 +3998,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -4576,7 +4576,7 @@ spec: SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -4590,7 +4590,7 @@ spec: ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -5076,7 +5076,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -5089,7 +5089,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MAX( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, diff --git a/docs/checks/column/text/text-mean-length.md b/docs/checks/column/text/text-mean-length.md index 24a6a5d49d..406df0232d 100644 --- a/docs/checks/column/text/text-mean-length.md +++ b/docs/checks/column/text/text-mean-length.md @@ -269,7 +269,7 @@ spec: SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -283,7 +283,7 @@ spec: ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -838,7 +838,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -851,7 +851,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -1505,7 +1505,7 @@ spec: SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -1519,7 +1519,7 @@ spec: ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-%d 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-%d 00:00:00'))) AS time_period_utc @@ -2075,7 +2075,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2088,7 +2088,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -2742,7 +2742,7 @@ spec: SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2756,7 +2756,7 @@ spec: ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -3312,7 +3312,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -3325,7 +3325,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -3989,7 +3989,7 @@ spec: SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -4003,7 +4003,7 @@ spec: ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-%d 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-%d 00:00:00'))) AS time_period_utc @@ -4573,7 +4573,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -4586,7 +4586,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -5248,7 +5248,7 @@ spec: SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -5262,7 +5262,7 @@ spec: ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -5832,7 +5832,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -5845,7 +5845,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT AVG( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, diff --git a/docs/checks/column/text/text-min-length.md b/docs/checks/column/text/text-min-length.md index 615956af4a..7cdf9339c4 100644 --- a/docs/checks/column/text/text-min-length.md +++ b/docs/checks/column/text/text-min-length.md @@ -269,7 +269,7 @@ spec: SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -283,7 +283,7 @@ spec: ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -754,7 +754,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -767,7 +767,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -1337,7 +1337,7 @@ spec: SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -1351,7 +1351,7 @@ spec: ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-%d 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-%d 00:00:00'))) AS time_period_utc @@ -1823,7 +1823,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -1836,7 +1836,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -2406,7 +2406,7 @@ spec: SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2420,7 +2420,7 @@ spec: ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(LOCALTIMESTAMP, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -2892,7 +2892,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2905,7 +2905,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -3485,7 +3485,7 @@ spec: SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -3499,7 +3499,7 @@ spec: ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-%d 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-%d 00:00:00'))) AS time_period_utc @@ -3985,7 +3985,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -3998,7 +3998,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, @@ -4576,7 +4576,7 @@ spec: SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -4590,7 +4590,7 @@ spec: ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-01 00:00:00') AS time_period, FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_FORMAT(analyzed_table.`date_column`, '%Y-%m-01 00:00:00'))) AS time_period_utc @@ -5076,7 +5076,7 @@ Expand the *Configure with data grouping* section to see additional examples for SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -5089,7 +5089,7 @@ Expand the *Configure with data grouping* section to see additional examples for ```sql SELECT MIN( - LENGTH(analyzed_table.`target_column`) + LENGTH(CAST(analyzed_table.`target_column` AS CHAR)) ) AS actual_value, analyzed_table.`country` AS grouping_level_1, analyzed_table.`state` AS grouping_level_2, diff --git a/docs/command-line-interface/connection.md b/docs/command-line-interface/connection.md index 22d5a9357e..854bc846c1 100644 --- a/docs/command-line-interface/connection.md +++ b/docs/command-line-interface/connection.md @@ -95,6 +95,7 @@ $ dqo [dqo options...] connection add [-h] [-fw] [-hl] [--sqlserver-disable-encr [--databricks-user=] [--duckdb-aws-authentication-mode=] [--duckdb-database=] + [--duckdb-directories=] [--duckdb-files-format-type=] [--duckdb-password=] [--duckdb-read-mode=] [--duckdb-region=] @@ -133,7 +134,6 @@ $ dqo [dqo options...] connection add [-h] [-fw] [-hl] [--sqlserver-disable-encr [--trino-host=] [--trino-password=] [--trino-port=] [--trino-user=] [-D=]... [-Duck=]... - [--duckdb-directories=[,...]]... [-E=]... [-F=]... [-K=]... [-M=]... [-O=]... [-P=]... @@ -164,6 +164,7 @@ dqo> connection add [-h] [-fw] [-hl] [--sqlserver-disable-encryption] [--databricks-user=] [--duckdb-aws-authentication-mode=] [--duckdb-database=] + [--duckdb-directories=] [--duckdb-files-format-type=] [--duckdb-password=] [--duckdb-read-mode=] [--duckdb-region=] @@ -202,7 +203,6 @@ dqo> connection add [-h] [-fw] [-hl] [--sqlserver-disable-encryption] [--trino-host=] [--trino-password=] [--trino-port=] [--trino-user=] [-D=]... [-Duck=]... - [--duckdb-directories=[,...]]... [-E=]... [-F=]... [-K=]... [-M=]... [-O=]... [-P=]... @@ -239,12 +239,12 @@ All parameters supported by the command are listed below. |
`--databricks-user`
|Databricks user name.| || |
`--duckdb-aws-authentication-mode`
|The authentication mode for AWS. Supports also a null configuration with a custom environment variable.| |*iam*
*default_credentials*
| |
`--duckdb-database`
|DuckDB database name for in-memory read mode. The value can be in the null format to use dynamic substitution.| || -|
`--duckdb-directories`
|| || +|
`--duckdb-directories`
|Virtual schema name to directory mappings. The path must be an absolute path.| || |
`--duckdb-files-format-type`
|Type of source files format for DuckDB.| |*csv*
*json*
*parquet*
| |
`--duckdb-password`
|DuckDB password for a remote storage type. The value can be in the null format to use dynamic substitution.| || |
`--duckdb-read-mode`
|DuckDB read mode.| |*in_memory*
*files*
| |
`--duckdb-region`
|The region for the storage credentials. The value can be in the null format to use dynamic substitution.| || -|
`--duckdb-storage-type`
|The storage type.| |*local*
*s3*
| +|
`--duckdb-storage-type`
|The storage type.| |*local*
*s3*
*azure*
| |
`--duckdb-user`
|DuckDB user name for a remote storage type. The value can be in the null format to use dynamic substitution.| || |
`-fw`
`--file-write`
|Write command response to a file| || |
`--headless`
`-hl`
|Starts DQOps in a headless mode. When DQOps runs in a headless mode and the application cannot start because the DQOps Cloud API key is missing or the DQOps user home folder is not configured, DQOps will stop silently instead of asking the user to approve the setup of the DQOps user home folder structure and/or log into DQOps Cloud.| || @@ -409,6 +409,7 @@ $ dqo [dqo options...] connection update [-h] [-fw] [-hl] [--sqlserver-disable-e [--databricks-port=] [--databricks-user=] [--duckdb-aws-authentication-mode=] [--duckdb-database=] + [--duckdb-directories=] [--duckdb-files-format-type=] [--duckdb-password=] [--duckdb-read-mode=] [--duckdb-region=] @@ -447,9 +448,7 @@ $ dqo [dqo options...] connection update [-h] [-fw] [-hl] [--sqlserver-disable-e [--trino-engine=] [--trino-host=] [--trino-password=] [--trino-port=] [--trino-user=] [-D=]... - [-Duck=]... - [--duckdb-directories=[, - ...]]... [-E=]... + [-Duck=]... [-E=]... [-F=]... [-K=]... [-M=]... [-O=]... [-P=]... [-R=]... @@ -479,6 +478,7 @@ dqo> connection update [-h] [-fw] [-hl] [--sqlserver-disable-encryption] [--databricks-port=] [--databricks-user=] [--duckdb-aws-authentication-mode=] [--duckdb-database=] + [--duckdb-directories=] [--duckdb-files-format-type=] [--duckdb-password=] [--duckdb-read-mode=] [--duckdb-region=] @@ -517,9 +517,7 @@ dqo> connection update [-h] [-fw] [-hl] [--sqlserver-disable-encryption] [--trino-engine=] [--trino-host=] [--trino-password=] [--trino-port=] [--trino-user=] [-D=]... - [-Duck=]... - [--duckdb-directories=[, - ...]]... [-E=]... + [-Duck=]... [-E=]... [-F=]... [-K=]... [-M=]... [-O=]... [-P=]... [-R=]... @@ -555,12 +553,12 @@ All parameters supported by the command are listed below. |
`--databricks-user`
|Databricks user name.| || |
`--duckdb-aws-authentication-mode`
|The authentication mode for AWS. Supports also a null configuration with a custom environment variable.| |*iam*
*default_credentials*
| |
`--duckdb-database`
|DuckDB database name for in-memory read mode. The value can be in the null format to use dynamic substitution.| || -|
`--duckdb-directories`
|| || +|
`--duckdb-directories`
|Virtual schema name to directory mappings. The path must be an absolute path.| || |
`--duckdb-files-format-type`
|Type of source files format for DuckDB.| |*csv*
*json*
*parquet*
| |
`--duckdb-password`
|DuckDB password for a remote storage type. The value can be in the null format to use dynamic substitution.| || |
`--duckdb-read-mode`
|DuckDB read mode.| |*in_memory*
*files*
| |
`--duckdb-region`
|The region for the storage credentials. The value can be in the null format to use dynamic substitution.| || -|
`--duckdb-storage-type`
|The storage type.| |*local*
*s3*
| +|
`--duckdb-storage-type`
|The storage type.| |*local*
*s3*
*azure*
| |
`--duckdb-user`
|DuckDB user name for a remote storage type. The value can be in the null format to use dynamic substitution.| || |
`-fw`
`--file-write`
|Write command response to a file| || |
`--headless`
`-hl`
|Starts DQOps in a headless mode. When DQOps runs in a headless mode and the application cannot start because the DQOps Cloud API key is missing or the DQOps user home folder is not configured, DQOps will stop silently instead of asking the user to approve the setup of the DQOps user home folder structure and/or log into DQOps Cloud.| || diff --git a/docs/reference/sensors/column/text-column-sensors.md b/docs/reference/sensors/column/text-column-sensors.md index d4746e30af..1a98524f27 100644 --- a/docs/reference/sensors/column/text-column-sensors.md +++ b/docs/reference/sensors/column/text-column-sensors.md @@ -142,7 +142,7 @@ The templates used to generate the SQL query for each data source supported by D SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -566,7 +566,7 @@ The templates used to generate the SQL query for each data source supported by D WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) > {{(parameters.max_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) > {{(parameters.max_length)}} THEN 1 ELSE 0 END @@ -1002,7 +1002,7 @@ The templates used to generate the SQL query for each data source supported by D SELECT SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -1383,7 +1383,7 @@ The templates used to generate the SQL query for each data source supported by D WHEN COUNT({{ lib.render_target_column('analyzed_table') }}) = 0 THEN 0.0 ELSE 100.0 * SUM( CASE - WHEN LENGTH({{ lib.render_target_column('analyzed_table')}}) < {{(parameters.min_length)}} + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) < {{(parameters.min_length)}} THEN 1 ELSE 0 END @@ -1780,7 +1780,7 @@ The templates used to generate the SQL query for each data source supported by D ELSE 100.0 * SUM( CASE - WHEN LENGTH( {{ lib.render_target_column('analyzed_table')}} ) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 + WHEN LENGTH(CAST({{ lib.render_target_column('analyzed_table')}} AS CHAR)) BETWEEN {{parameters.min_length}} AND {{parameters.max_length}} THEN 1 ELSE 0 END ) / COUNT({{ lib.render_target_column('analyzed_table') }}) @@ -2110,7 +2110,7 @@ The templates used to generate the SQL query for each data source supported by D SELECT MAX( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2381,7 +2381,7 @@ The templates used to generate the SQL query for each data source supported by D SELECT AVG( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} @@ -2736,7 +2736,7 @@ The templates used to generate the SQL query for each data source supported by D SELECT MIN( - LENGTH({{ lib.render_target_column('analyzed_table') }}) + LENGTH(CAST({{ lib.render_target_column('analyzed_table') }} AS CHAR)) ) AS actual_value {{- lib.render_data_grouping_projections('analyzed_table') }} {{- lib.render_time_dimension_projection('analyzed_table') }} diff --git a/docs/reference/yaml/ConnectionYaml.md b/docs/reference/yaml/ConnectionYaml.md index 815c051e52..67e2eab370 100644 --- a/docs/reference/yaml/ConnectionYaml.md +++ b/docs/reference/yaml/ConnectionYaml.md @@ -207,7 +207,7 @@ The structure of this object is described below |[`json`](./ConnectionYaml.md#jsonfileformatspec)|Json file format specification.|*[JsonFileFormatSpec](./ConnectionYaml.md#jsonfileformatspec)*| | | | |[`parquet`](./ConnectionYaml.md#parquetfileformatspec)|Parquet file format specification.|*[ParquetFileFormatSpec](./ConnectionYaml.md#parquetfileformatspec)*| | | | |`directories`|Virtual schema name to directory mappings. The path must be an absolute path.|*Dict[string, string]*| | | | -|`storage_type`|The storage type.|*enum*|*local*
*s3*
| | | +|`storage_type`|The storage type.|*enum*|*local*
*s3*
*azure*
| | | |`aws_authentication_mode`|The authentication mode for AWS. Supports also a ${DUCKDB_AWS_AUTHENTICATION_MODE} configuration with a custom environment variable.|*enum*|*iam*
*default_credentials*
| | | |`user`|DuckDB user name for a remote storage type. The value can be in the ${ENVIRONMENT_VARIABLE_NAME} format to use dynamic substitution.|*string*| | | | |`password`|DuckDB password for a remote storage type. The value can be in the ${ENVIRONMENT_VARIABLE_NAME} format to use dynamic substitution.|*string*| | | | diff --git a/docs/reference/yaml/TableYaml.md b/docs/reference/yaml/TableYaml.md index 53c13b05a2..2803fb821d 100644 --- a/docs/reference/yaml/TableYaml.md +++ b/docs/reference/yaml/TableYaml.md @@ -631,6 +631,7 @@ The structure of this object is described below |`length`|Maximum length of text and binary columns.|*integer*| | | | |`precision`|Precision of a numeric (decimal) data type.|*integer*| | | | |`scale`|Scale of a numeric (decimal) data type.|*integer*| | | | +|`nested`|This field is a nested field inside another STRUCT. It is used to identify nested fields in JSON files.|*boolean*| | | | diff --git a/dqops/src/main/frontend/src/components/FileFormatConfiguration/KeyValueProperties/index.tsx b/dqops/src/main/frontend/src/components/FileFormatConfiguration/KeyValueProperties/index.tsx index 0b62645e52..5e20c7608d 100644 --- a/dqops/src/main/frontend/src/components/FileFormatConfiguration/KeyValueProperties/index.tsx +++ b/dqops/src/main/frontend/src/components/FileFormatConfiguration/KeyValueProperties/index.tsx @@ -81,7 +81,7 @@ const KeyValueProperties = ({ Path
@@ -102,8 +102,11 @@ const KeyValueProperties = ({ key={index} index={index} properties={arr} - valuePlaceholder={storageType === DuckdbParametersSpecStorageTypeEnum.s3 ? "s3://bucketname" : - storageType === DuckdbParametersSpecStorageTypeEnum.local ? "/path/to/folder" : undefined } + valuePlaceholder={ + storageType === DuckdbParametersSpecStorageTypeEnum.s3 ? "s3://bucket_name" : + storageType === DuckdbParametersSpecStorageTypeEnum.azure ? "az://container_name" : + storageType === DuckdbParametersSpecStorageTypeEnum.local ? "/path/to/folder" : undefined + } onChange={onChangeArr} sharedCredentials={sharedCredentials} /> diff --git a/dqops/src/main/resources/static/swagger-api/dqops-api-openapi-3.json b/dqops/src/main/resources/static/swagger-api/dqops-api-openapi-3.json index de8c2b11ba..90e6743a75 100644 --- a/dqops/src/main/resources/static/swagger-api/dqops-api-openapi-3.json +++ b/dqops/src/main/resources/static/swagger-api/dqops-api-openapi-3.json @@ -56960,6 +56960,13 @@ "extensions" : { }, "exampleSetFlag" : false, "types" : [ "integer" ] + }, + "nested" : { + "type" : "boolean", + "description" : "This field is a nested field inside another STRUCT. It is used to identify nested fields in JSON files.", + "extensions" : { }, + "exampleSetFlag" : false, + "types" : [ "boolean" ] } }, "exampleSetFlag" : false, @@ -56989,6 +56996,10 @@ "type" : "integer", "format" : "int32", "description" : "Scale of a numeric (decimal) data type." + }, + "nested" : { + "type" : "boolean", + "description" : "This field is a nested field inside another STRUCT. It is used to identify nested fields in JSON files." } } } @@ -64359,7 +64370,7 @@ "storage_type" : { "type" : "string", "description" : "The storage type.", - "enum" : [ "local", "s3" ] + "enum" : [ "local", "s3", "azure" ] }, "aws_authentication_mode" : { "type" : "string", @@ -80219,7 +80230,7 @@ "DuckdbStorageType" : { "type" : "string", "exampleSetFlag" : false, - "enum" : [ "local", "s3" ] + "enum" : [ "local", "s3", "azure" ] }, "AwsAuthenticationMode" : { "type" : "string", diff --git a/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.json b/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.json index 29bc9af9ce..aeb292fc0e 100644 --- a/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.json +++ b/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.json @@ -32975,7 +32975,7 @@ "storage_type" : { "type" : "string", "description" : "The storage type.", - "enum" : [ "local", "s3" ] + "enum" : [ "local", "s3", "azure" ] }, "aws_authentication_mode" : { "type" : "string", diff --git a/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.yaml b/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.yaml index b5f1291f21..bfbff0eb93 100644 --- a/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.yaml +++ b/dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.yaml @@ -31607,6 +31607,7 @@ definitions: enum: - "local" - "s3" + - "azure" aws_authentication_mode: type: "string" description: "The authentication mode for AWS. Supports also a ${DUCKDB_AWS_AUTHENTICATION_MODE}\