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:ย 

Unity catalogue sync problem

ajai_duraisamy
New Contributor

Hi Everyone ,
while I am creating sync table in UC, I got an error and failed . then I am not able to recreate the same table.
when I checked the catalogue table name is there but not able to open , and I am querying the same in the notebook .
it's giving as The table or view cannot be found
Can some one help me here.

Thankyou 

1 REPLY 1

nayan_wylde
Honored Contributor II

@ajai_duraisamy Here are few checks you can do:

1. SHOW TABLES IN <catalog>.<schema> LIKE '<table>'; This command will show if the table exists in UC.

2. Make sure your compute is UCโ€‘enabled.
If youโ€™re on a cluster/SQL Warehouse without UC enabled (or created before the metastore assignment settled), object resolution can misbehave. You should see the Unity Catalog badge on the cluster and use Single User or Shared access mode.

3. Run refresh command on the table.

%sql
-- Force Spark to drop any cached plan/metadata
REFRESH TABLE <catalog>.<schema>.<table>;

-- Ask UC to resync table metadata (works for Delta tables)
REPAIR TABLE <catalog>.<schema>.<table> SYNC METADATA;

4. If none of the above steps works out. Can you please drop the table and run a dry run on the table and share the output.

%sql
SYNC TABLE <uc_catalog>.<uc_schema>.<table>
  FROM hive_metastore.<hms_schema>.<source_table>
  DRY RUN;