IsPrimaryKey - Amazon Glue
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

IsPrimaryKey

Checks whether a column contains a primary key. A column contains a primary key if all of the values in the column are unique and complete (non-null).

Syntax

IsPrimaryKey <COL_NAME>
  • COL_NAME – The name of the column that you want to evaluate the data quality rule against.

    Supported column types: Any column type

Example: Primary key

The following example rule checks whether the column named Customer_ID contains a primary key.

IsPrimaryKey "Customer_ID" IsPrimaryKey "Customer_ID" where "Customer_ID < 10"

Example: Primary key with multiple columns. Any of the following examples are valid.

IsPrimaryKey "colA" "colB" IsPrimaryKey "colA" "colB" "colC" IsPrimaryKey colA "colB" "colC"