Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 12:58 AM
Hi,
Thank you for the reply..
We are using below structure to change/cast the array type struct with nested new names
newteststruct= ArrayType(StructType([
StructField(""nestedAttr1" ,StringType()),
StructField("columnField" ,StringType())]))
Input will come from other source in json format and we are reading into databricks as df.
So here we are applying the schema level transformations as per business to get output in target schema.
So while casting we are facing an issue where when we get an empty array through the i/p extract.
Thank you