<?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 Azure Databricks: leading zeros in decimal integer literals are not permitted in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/azure-databricks-leading-zeros-in-decimal-integer-literals-are/m-p/38678#M26712</link>
    <description>&lt;P&gt;Hey team,&lt;/P&gt;&lt;P&gt;Need your help.&lt;/P&gt;&lt;P&gt;I am trying to run the below python code in a data bricks notebook, which is part of parsing an XML file, exploding the element. This works great for all the other elements with no numbers and elements not starting with a zero but anything that starts with a 0 in the second part of the string is where it's failing.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;Code&lt;/STRONG&gt;:&lt;BR /&gt;56:.withColumn(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo_Bond-102005'&lt;/SPAN&gt;&lt;SPAN&gt;, explode_outer(col(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo'&lt;/SPAN&gt;&lt;SPAN&gt;).Bond&lt;/SPAN&gt;&lt;SPAN&gt;-102005&lt;/SPAN&gt;&lt;SPAN&gt;)) \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;57:.withColumn(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo_Bond-052009'&lt;/SPAN&gt;&lt;SPAN&gt;, explode_outer(col(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo'&lt;/SPAN&gt;&lt;SPAN&gt;).Bond&lt;/SPAN&gt;&lt;SPAN&gt;-052009&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)) \&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Error&lt;/STRONG&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers (, line 57)&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;.withColumn('OcrnInfo_Bond-052009', explode_outer(col('OcrnInfo').Bond-052009)) \&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^&lt;BR /&gt;&lt;SPAN class=""&gt;Bond-052009 is a structfield in XML definition of arraytype which in turn has a structype for the attributes it holds. I have tried single/double quotes, all sorts of brackets around the string but just keeps failing with the same error. If I delete this line it fails on the next one which is&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Bnkrpt&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;SPAN class=""&gt;052009 so definitely the second part of the string is failing.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I am unable to change these names.&lt;BR /&gt;&lt;BR /&gt;Any advice is greatly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 28 Jul 2023 15:40:34 GMT</pubDate>
    <dc:creator>gopikrsna925</dc:creator>
    <dc:date>2023-07-28T15:40:34Z</dc:date>
    <item>
      <title>Azure Databricks: leading zeros in decimal integer literals are not permitted</title>
      <link>https://community.databricks.com/t5/data-engineering/azure-databricks-leading-zeros-in-decimal-integer-literals-are/m-p/38678#M26712</link>
      <description>&lt;P&gt;Hey team,&lt;/P&gt;&lt;P&gt;Need your help.&lt;/P&gt;&lt;P&gt;I am trying to run the below python code in a data bricks notebook, which is part of parsing an XML file, exploding the element. This works great for all the other elements with no numbers and elements not starting with a zero but anything that starts with a 0 in the second part of the string is where it's failing.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;Code&lt;/STRONG&gt;:&lt;BR /&gt;56:.withColumn(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo_Bond-102005'&lt;/SPAN&gt;&lt;SPAN&gt;, explode_outer(col(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo'&lt;/SPAN&gt;&lt;SPAN&gt;).Bond&lt;/SPAN&gt;&lt;SPAN&gt;-102005&lt;/SPAN&gt;&lt;SPAN&gt;)) \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;57:.withColumn(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo_Bond-052009'&lt;/SPAN&gt;&lt;SPAN&gt;, explode_outer(col(&lt;/SPAN&gt;&lt;SPAN&gt;'OcrnInfo'&lt;/SPAN&gt;&lt;SPAN&gt;).Bond&lt;/SPAN&gt;&lt;SPAN&gt;-052009&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)) \&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Error&lt;/STRONG&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers (, line 57)&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;.withColumn('OcrnInfo_Bond-052009', explode_outer(col('OcrnInfo').Bond-052009)) \&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^&lt;BR /&gt;&lt;SPAN class=""&gt;Bond-052009 is a structfield in XML definition of arraytype which in turn has a structype for the attributes it holds. I have tried single/double quotes, all sorts of brackets around the string but just keeps failing with the same error. If I delete this line it fails on the next one which is&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Bnkrpt&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;SPAN class=""&gt;052009 so definitely the second part of the string is failing.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I am unable to change these names.&lt;BR /&gt;&lt;BR /&gt;Any advice is greatly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Jul 2023 15:40:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/azure-databricks-leading-zeros-in-decimal-integer-literals-are/m-p/38678#M26712</guid>
      <dc:creator>gopikrsna925</dc:creator>
      <dc:date>2023-07-28T15:40:34Z</dc:date>
    </item>
  </channel>
</rss>

