Skip to content

Commit 39a8146

Browse files
committed
The table and column list models also return a list of labels.
1 parent 1c2257d commit 39a8146

File tree

4 files changed

+89
-45
lines changed

4 files changed

+89
-45
lines changed

dqops/src/main/java/com/dqops/rest/models/metadata/ColumnListModel.java

+7
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ public class ColumnListModel {
5050
@JsonPropertyDescription("Column names.")
5151
private String columnName;
5252

53+
/**
54+
* List of labels applied to the table.
55+
*/
56+
@JsonPropertyDescription("List of labels applied to the table.")
57+
private String[] labels;
58+
5359
@JsonPropertyDescription("SQL expression.")
5460
private String sqlExpression;
5561

@@ -144,6 +150,7 @@ public static ColumnListModel fromColumnSpecificationForListEntry(String connect
144150
setColumnHash(columnSpec.getHierarchyId() != null ? columnSpec.getHierarchyId().hashCode64() : null);
145151
setTable(physicalTableName);
146152
setColumnName(columnName);
153+
setLabels(columnSpec.getLabels() != null ? columnSpec.getLabels().toArray(String[]::new) : null);
147154
setSqlExpression(columnSpec.getSqlExpression());
148155
setDisabled(columnSpec.isDisabled());
149156
setTypeSnapshot(columnSpec.getTypeSnapshot());

dqops/src/main/java/com/dqops/rest/models/metadata/TableListModel.java

+7
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ public class TableListModel {
6464
@JsonPropertyDescription("Physical table details (a physical schema name and a physical table name).")
6565
private PhysicalTableName target;
6666

67+
/**
68+
* List of labels applied to the table.
69+
*/
70+
@JsonPropertyDescription("List of labels applied to the table.")
71+
private String[] labels;
72+
6773
/**
6874
* Disables all data quality checks on the table. Data quality checks will not be executed.
6975
*/
@@ -240,6 +246,7 @@ public static TableListModel fromTableSpecificationForListEntry(
240246
setConnectionName(connectionName);
241247
setTableHash(tableSpec.getHierarchyId() != null ? tableSpec.getHierarchyId().hashCode64() : null);
242248
setTarget(tableSpec.getPhysicalTableName());
249+
setLabels(tableSpec.getLabels() != null ? tableSpec.getLabels().toArray(String[]::new) : null);
243250
setDisabled(tableSpec.isDisabled());
244251
setProfilingChecksResultTruncation(tableSpec.getProfilingChecks() != null ? tableSpec.getProfilingChecks().getResultTruncation() : null);
245252
setPartitioningConfigurationMissing(tableSpec.getTimestampColumns() == null ||

dqops/src/main/resources/static/swagger-api/dqops-api-swagger-2.json

+27-13
Original file line numberDiff line numberDiff line change
@@ -19908,11 +19908,11 @@
1990819908
}
1990919909
},
1991019910
"daily_detected_datatype_in_text" : {
19911-
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores the most recent captured value for each day when the data quality check was evaluated.",
19911+
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores the most recent captured value for each day when the data quality check was evaluated.",
1991219912
"$ref" : "#/definitions/ColumnDetectedDatatypeInTextCheckSpec"
1991319913
},
1991419914
"daily_detected_datatype_in_text_changed" : {
19915-
"description" : "Detects that the data type of texts stored in a text column has changed since the last verification. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Stores the most recent captured value for each day when the data quality check was evaluated.",
19915+
"description" : "Detects that the data type of texts stored in a text column has changed since the last verification. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Stores the most recent captured value for each day when the data quality check was evaluated.",
1991619916
"$ref" : "#/definitions/ColumnDatatypeDetectedDatatypeInTextChangedCheckSpec"
1991719917
}
1991819918
}
@@ -19928,11 +19928,11 @@
1992819928
}
1992919929
},
1993019930
"daily_partition_detected_datatype_in_text" : {
19931-
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores a separate data quality check result for each daily partition.",
19931+
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores a separate data quality check result for each daily partition.",
1993219932
"$ref" : "#/definitions/ColumnDetectedDatatypeInTextCheckSpec"
1993319933
},
1993419934
"daily_partition_detected_datatype_in_text_changed" : {
19935-
"description" : "Detects that the data type of texts stored in a text column has changed when compared to an earlier not empty partition. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Stores a separate data quality check result for each daily partition.",
19935+
"description" : "Detects that the data type of texts stored in a text column has changed when compared to an earlier not empty partition. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Stores a separate data quality check result for each daily partition.",
1993619936
"$ref" : "#/definitions/ColumnDatatypeDetectedDatatypeInTextChangedCheckSpec"
1993719937
}
1993819938
}
@@ -19976,7 +19976,7 @@
1997619976
"description" : "Data grouping configuration name that should be applied to this data quality check. The data grouping is used to group the check's result by a GROUP BY clause in SQL, evaluating the data quality check for each group of rows. Use the name of one of data grouping configurations defined on the parent table."
1997719977
},
1997819978
"parameters" : {
19979-
"description" : "The sensor parameters for a sensor that returns a value that identifies the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types.",
19979+
"description" : "The sensor parameters for a sensor that returns a value that identifies the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types.",
1998019980
"$ref" : "#/definitions/ColumnDatatypeStringDatatypeDetectSensorParametersSpec"
1998119981
},
1998219982
"warning" : {
@@ -20004,11 +20004,11 @@
2000420004
}
2000520005
},
2000620006
"monthly_detected_datatype_in_text" : {
20007-
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores the most recent check result for each month when the data quality check was evaluated.",
20007+
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores the most recent check result for each month when the data quality check was evaluated.",
2000820008
"$ref" : "#/definitions/ColumnDetectedDatatypeInTextCheckSpec"
2000920009
},
2001020010
"monthly_detected_datatype_in_text_changed" : {
20011-
"description" : "Detects that the data type of texts stored in a text column has changed since the last verification. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Stores the most recent captured value for each day when the data quality check was evaluated.",
20011+
"description" : "Detects that the data type of texts stored in a text column has changed since the last verification. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Stores the most recent captured value for each day when the data quality check was evaluated.",
2001220012
"$ref" : "#/definitions/ColumnDatatypeDetectedDatatypeInTextChangedCheckSpec"
2001320013
}
2001420014
}
@@ -20024,11 +20024,11 @@
2002420024
}
2002520025
},
2002620026
"monthly_partition_detected_datatype_in_text" : {
20027-
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores a separate data quality check result for each monthly partition.",
20027+
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type. Stores a separate data quality check result for each monthly partition.",
2002820028
"$ref" : "#/definitions/ColumnDetectedDatatypeInTextCheckSpec"
2002920029
},
2003020030
"monthly_partition_detected_datatype_in_text_changed" : {
20031-
"description" : "Detects that the data type of texts stored in a text column has changed when compared to an earlier not empty partition. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Stores a separate data quality check result for each monthly partition.",
20031+
"description" : "Detects that the data type of texts stored in a text column has changed when compared to an earlier not empty partition. The sensor returns the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Stores a separate data quality check result for each monthly partition.",
2003220032
"$ref" : "#/definitions/ColumnDatatypeDetectedDatatypeInTextChangedCheckSpec"
2003320033
}
2003420034
}
@@ -20044,11 +20044,11 @@
2004420044
}
2004520045
},
2004620046
"profile_detected_datatype_in_text" : {
20047-
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type.",
20047+
"description" : "Detects the data type of text values stored in the column. The sensor returns the code of the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types. Raises a data quality issue when the detected data type does not match the expected data type.",
2004820048
"$ref" : "#/definitions/ColumnDetectedDatatypeInTextCheckSpec"
2004920049
},
2005020050
"profile_detected_datatype_in_text_changed" : {
20051-
"description" : "Detects that the data type of texts stored in a text column has changed since the last verification. The sensor returns the detected data type of a column: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types.",
20051+
"description" : "Detects that the data type of texts stored in a text column has changed since the last verification. The sensor returns the detected data type of a column: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types.",
2005220052
"$ref" : "#/definitions/ColumnDatatypeDetectedDatatypeInTextChangedCheckSpec"
2005320053
}
2005420054
}
@@ -20387,7 +20387,7 @@
2038720387
"description" : "Data grouping configuration name that should be applied to this data quality check. The data grouping is used to group the check's result by a GROUP BY clause in SQL, evaluating the data quality check for each group of rows. Use the name of one of data grouping configurations defined on the parent table."
2038820388
},
2038920389
"parameters" : {
20390-
"description" : "The sensor parameters for a sensor that returns a value that identifies the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - strings, 8 - mixed data types.",
20390+
"description" : "The sensor parameters for a sensor that returns a value that identifies the detected type of column data: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - strings, 8 - mixed data types.",
2039120391
"$ref" : "#/definitions/ColumnDatatypeStringDatatypeDetectSensorParametersSpec"
2039220392
},
2039320393
"warning" : {
@@ -22177,6 +22177,13 @@
2217722177
"type" : "string",
2217822178
"description" : "Column names."
2217922179
},
22180+
"labels" : {
22181+
"type" : "array",
22182+
"description" : "List of labels applied to the table.",
22183+
"items" : {
22184+
"type" : "string"
22185+
}
22186+
},
2218022187
"sql_expression" : {
2218122188
"type" : "string",
2218222189
"description" : "SQL expression."
@@ -32553,7 +32560,7 @@
3255332560
"properties" : {
3255432561
"expected_datatype" : {
3255532562
"type" : "string",
32556-
"description" : "Expected data type code, the values for the sensor's actual values are: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 6 - booleans, 7 - texts, 8 - mixed data types.",
32563+
"description" : "Expected data type code, the values for the sensor's actual values are: 1 - integers, 2 - floats, 3 - dates, 4 - datetimes, 5 - timestamps, 6 - booleans, 7 - texts, 8 - mixed data types.",
3255732564
"enum" : [ "integers", "floats", "dates", "datetimes", "booleans", "texts", "mixed" ]
3255832565
}
3255932566
}
@@ -36775,6 +36782,13 @@
3677536782
"description" : "Physical table details (a physical schema name and a physical table name).",
3677636783
"$ref" : "#/definitions/PhysicalTableName"
3677736784
},
36785+
"labels" : {
36786+
"type" : "array",
36787+
"description" : "List of labels applied to the table.",
36788+
"items" : {
36789+
"type" : "string"
36790+
}
36791+
},
3677836792
"disabled" : {
3677936793
"type" : "boolean",
3678036794
"description" : "Disables all data quality checks on the table. Data quality checks will not be executed."

0 commit comments

Comments
 (0)