Column comments in DLT python notebook

Richard_547342
New Contributor III

The SQL API specification in the DLT docs shows an option for adding column comments when creating a table. Is there an equivalent way to do this when creating a DLT pipeline with a python notebook? The Python API specification in the DLT docs does not seem to show this as an option.

Thanks!

Richard_547342
New Contributor III

Just realised this can be done in the schema definition

StructField("column1", StringType(), True, {"comment": "Column One"})

View solution in original post

jonathandbyrd
New Contributor II

this works in a readStream writeStream scenario for us, but the exact same code fails when put in a DLT