Information_schema.columns : identity information missing
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 05:22 AM
In the documentation is stated that the identity information is reserved for future use and currently always returns 'NO'.
when is this going to be available ?
and is there an alternative way to check if a specific column is already identity-defined or not ?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2025 04:24 AM
found an alternative way to check it for the moment :
# check if identity column is active or not work around
identityValue = 0
try:
identityValue = str(spark.sql(f"show create table {table_catalog}.{table_schema}.{table_name}").collect()[0]).lower().index("identity")
print(f"No processing {table_catalog}.{table_schema}.{table_name} with primary key : {column_name} because there is already an identity column")
except:
identityValue = 0
print(f"Further processing {table_catalog}.{table_schema}.{table_name} with primary key : {column_name} because there is no identity column")

