Unity catalog tagging through Code

Mamzy10
New Contributor II

Hi I was wondering how you would apply tags to tables, columns etc in unity catalog through code?

One use case i want to have a look at is by automatically applying PI classification against certain tables and columns that contain certain words.

Is this possible?

TIA

-werners-
Esteemed Contributor III

Using sql:

https://docs.databricks.com/en/data-governance/unity-catalog/tags.html#manage-tags-using-sql-command...
I am not aware of a python/scala counterpart (but using spark.sql() that is no issue).