cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Information_schema.columns : identity information missing

MikeHubrecht
New Contributor II

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

MikeHubrecht
New Contributor II

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")

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now