user1716729
user1716729

Reputation: 397

Azure Synapse Delta table

I encountered a problem when I tried to modify a Synapse delta table from a Synapse Notebook. I used the ALTER TABLE command to add a new column to the table, and I verified that the column was created by using the DESCRIBE and SELECT commands. However, when I checked the Lake database in the Azure portal, I could not see the new column under the table properties. Also, the new column was missing from the sys.columns list.

enter image description here I wonder why there is a discrepancy between the DESCRIBE and the portal views of the table, and how I can fix it.

Thanks

Upvotes: 1

Views: 561

Answers (1)

Pratik Lad
Pratik Lad

Reputation: 8402

I wonder why there is a discrepancy between the DESCRIBE and the portal views of the table, and how I can fix it.

I tried it in my environment and faced similar issue with the lake database table when altering it from synapse.

The issue might cause when there is a delay in refresh of metadata. You can try below steps to resolve it:

  • Refresh the Metadata: You can try run below command in Notebook to refresh the table metadata explicitly.
REFRESH TABLE <table_name>

enter image description here

  • Restart Synapse Workspace: Sometimes, because of caching metadata is not getting refreshed you can first publish your notebook and then refresh the synapse workspace can trigger a metadata refresh.

Now it's working for me:

enter image description here

Upvotes: 2

Related Questions