<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Pyspark Convert Struct Type to Map Type in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27273#M19150</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello Sir,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Could you please advise the below scenario in pyspark 2.4.3 in data-bricks&lt;P&gt;&lt;/P&gt;to load the data into the delta table.&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;I want to load the dataframe with this column "data" into the table as Map&lt;P&gt;&lt;/P&gt;type in the data-bricks spark delta table.could you please advise on this&lt;P&gt;&lt;/P&gt;scenario.how to convert struct type into map type&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;i have a column named "data" which is struct type. pls find the sample data&lt;P&gt;&lt;/P&gt;format:&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;data:struct&lt;P&gt;&lt;/P&gt; field1:long&lt;P&gt;&lt;/P&gt; field2:string&lt;P&gt;&lt;/P&gt; field3:array&lt;P&gt;&lt;/P&gt; field4:long&lt;P&gt;&lt;/P&gt; field5:struct&lt;P&gt;&lt;/P&gt; code:string&lt;P&gt;&lt;/P&gt; name:string&lt;P&gt;&lt;/P&gt; field6:struct&lt;P&gt;&lt;/P&gt; lat:double&lt;P&gt;&lt;/P&gt; lon:double&lt;P&gt;&lt;/P&gt; field7:long&lt;P&gt;&lt;/P&gt; field8:string&lt;P&gt;&lt;/P&gt; field9:boolean&lt;P&gt;&lt;/P&gt; field10:long&lt;P&gt;&lt;/P&gt; field11:string&lt;P&gt;&lt;/P&gt; field12:string&lt;P&gt;&lt;/P&gt; field13:long&lt;P&gt;&lt;/P&gt; field14:boolean&lt;P&gt;&lt;/P&gt; field15:array&lt;P&gt;&lt;/P&gt; element:string&lt;P&gt;&lt;/P&gt; id:string&lt;P&gt;&lt;/P&gt; field16:array&lt;P&gt;&lt;/P&gt; element:string&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Thanks 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Mar 2020 13:34:53 GMT</pubDate>
    <dc:creator>Anbazhagananbut</dc:creator>
    <dc:date>2020-03-01T13:34:53Z</dc:date>
    <item>
      <title>Pyspark Convert Struct Type to Map Type</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27273#M19150</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello Sir,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Could you please advise the below scenario in pyspark 2.4.3 in data-bricks&lt;P&gt;&lt;/P&gt;to load the data into the delta table.&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;I want to load the dataframe with this column "data" into the table as Map&lt;P&gt;&lt;/P&gt;type in the data-bricks spark delta table.could you please advise on this&lt;P&gt;&lt;/P&gt;scenario.how to convert struct type into map type&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;i have a column named "data" which is struct type. pls find the sample data&lt;P&gt;&lt;/P&gt;format:&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;data:struct&lt;P&gt;&lt;/P&gt; field1:long&lt;P&gt;&lt;/P&gt; field2:string&lt;P&gt;&lt;/P&gt; field3:array&lt;P&gt;&lt;/P&gt; field4:long&lt;P&gt;&lt;/P&gt; field5:struct&lt;P&gt;&lt;/P&gt; code:string&lt;P&gt;&lt;/P&gt; name:string&lt;P&gt;&lt;/P&gt; field6:struct&lt;P&gt;&lt;/P&gt; lat:double&lt;P&gt;&lt;/P&gt; lon:double&lt;P&gt;&lt;/P&gt; field7:long&lt;P&gt;&lt;/P&gt; field8:string&lt;P&gt;&lt;/P&gt; field9:boolean&lt;P&gt;&lt;/P&gt; field10:long&lt;P&gt;&lt;/P&gt; field11:string&lt;P&gt;&lt;/P&gt; field12:string&lt;P&gt;&lt;/P&gt; field13:long&lt;P&gt;&lt;/P&gt; field14:boolean&lt;P&gt;&lt;/P&gt; field15:array&lt;P&gt;&lt;/P&gt; element:string&lt;P&gt;&lt;/P&gt; id:string&lt;P&gt;&lt;/P&gt; field16:array&lt;P&gt;&lt;/P&gt; element:string&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Thanks 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Mar 2020 13:34:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27273#M19150</guid>
      <dc:creator>Anbazhagananbut</dc:creator>
      <dc:date>2020-03-01T13:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Pyspark Convert Struct Type to Map Type</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27274#M19151</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi @Anbazhagan anbutech17,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;you can do this by explode(), please follow the example in the below notebook, &lt;P&gt;&lt;/P&gt;&lt;A href="https://docs.azuredatabricks.net/_static/notebooks/transform-complex-data-types-python.html" target="_blank"&gt;https://docs.azuredatabricks.net/_static/notebooks/transform-complex-data-types-python.html&lt;/A&gt;</description>
      <pubDate>Wed, 04 Mar 2020 22:39:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27274#M19151</guid>
      <dc:creator>shyam_9</dc:creator>
      <dc:date>2020-03-04T22:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pyspark Convert Struct Type to Map Type</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27275#M19152</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;you can do it by making an api request - convert &lt;A target="_blank" href="https://"&gt;png to ico&lt;/A&gt; paint/api/2.0/clusters/permanent-delete&lt;/P&gt;
&lt;P&gt;i dont see an option to delete or edit an automated cluster from UI.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 08:56:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-convert-struct-type-to-map-type/m-p/27275#M19152</guid>
      <dc:creator>sherryellis</dc:creator>
      <dc:date>2020-08-24T08:56:24Z</dc:date>
    </item>
  </channel>
</rss>

