StructField Metadata Dictionary - What are the possible keys?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 05:40 AM
I have a Delta Live Table which is being deposited to Unity Catalog. In the Python notebook, I am defining the schema with a series of StructFields, for example:
StructField(
"columnName",
StringType(),
True,
metadata = {
'comment': "This is a comment"
}
)
This works, however now I am trying to add tags, I have tried the following, but it doesn't seem to work:
metadata = {
'comment': "This is a comment"
'tags': {
'tag1': 'x',
'tag2': 'y',
}
}
Does anyone know to add tags to columns programmatically using the Python API?
Also, does anyone know how to add tags to the specific table, I am using
dlt.create_streaming_table(), but there doesn't seem to be an option here: Delta Live Tables Python language reference | Databricks on AWS
Any help would be greatly appreciated!
Thanks,
Riqo