PrimaryKeyPattern
- Last Updated: January 6, 2025
- 1 minute read
- DataDirect Connectors
- JDBC
- Google BigQuery 6.0
- Documentation
Purpose
Determines which column in a table is designated as the primary key in the metadata returned by the driver. Google BigQuery does not have the concept of primary keys, or even uniqueness. However, some applications will not function properly without at least one column in a table designated as the primary key. This property allows your applications that require a primary key to function correctly when connecting to Google BigQuery data sources.
Valid Values
* | column_name
where
- column_name
- is the name of the column, specified as a regular expression, that you want designated as the primary key in each table.
Behavior
If set to *, the driver designates the
first column in each table that is not of the BOOL, RECORD, ARRAY or GEOGRAPHY data types as
the primary key.
If set to column_name, the driver
designates the primary key as the first column in each table whose name matches the
specified regular expression. The driver will not designate any column that is of the BOOL,
RECORD, ARRAY, or GEOGRAPHY data types as the primary key.
Data Source Method
setPrimaryKeyPattern
Default
*
Data Type
String