Pyspark Convert Struct Type to Map Type
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2020 05:34 AM
Hello Sir,
Could you please advise the below scenario in pyspark 2.4.3 in data-bricksto load the data into the delta table.I want to load the dataframe with this column "data" into the table as Maptype in the data-bricks spark delta table.could you please advise on thisscenario.how to convert struct type into map typei have a column named "data" which is struct type. pls find the sample dataformat:data:struct field1:long field2:string field3:array field4:long field5:struct code:string name:string field6:struct lat:double lon:double field7:long field8:string field9:boolean field10:long field11:string field12:string field13:long field14:boolean field15:array element:string id:string field16:array element:stringThanks
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2020 02:39 PM
Hi @Anbazhagan anbutech17,
you can do this by explode(), please follow the example in the below notebook, https://docs.azuredatabricks.net/_static/notebooks/transform-complex-data-types-python.htmlOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 01:56 AM
you can do it by making an api request - convert png to ico paint/api/2.0/clusters/permanent-delete
i dont see an option to delete or edit an automated cluster from UI.

