<?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 java.util.NoSuchElementException: key not found in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/java-util-nosuchelementexception-key-not-found/m-p/34355#M25110</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are using a Azure Databricks with Standard DS14_V2 Cluster with Runtime 9.1 LTS, Spark 3.1.2 and Scala 2.12 and facing the below issue frequently when running our ETL pipeline. As part of the operation that is failing there are several joins happening with delta tables and the output of that is being written into another delta table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was a similar issue reported earlier and was fixed as part of DB runtime 9.0 (unsupported) &lt;A href="https://issues.apache.org/jira/browse/SPARK-34000" alt="https://issues.apache.org/jira/browse/SPARK-34000" target="_blank"&gt;: [SPARK-34000] ExecutorAllocationListener threw an exception java.util.NoSuchElementException - ASF JIRA (apache.org)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the documentation for that : &lt;A href="https://docs.microsoft.com/en-us/azure/databricks/release-notes/runtime/9.0" alt="https://docs.microsoft.com/en-us/azure/databricks/release-notes/runtime/9.0" target="_blank"&gt;Databricks Runtime 9.0 (Unsupported) - Azure Databricks | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the below exception an unrelated issue from the one reported in the bug mentioned above and should I be logging another bug for this to be fixed? We are facing this issue every few runs of our daily job. Any help or pointers would be greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the exception with the stack trace : I have uploaded a file with the full stack trace because of the size limit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An error occurred while calling o74209.insertInto.&lt;/P&gt;&lt;P&gt;: java.util.NoSuchElementException: key not found: Project [none#1 AS #0, none#4, none#18 AS #1, none#13, none#12, none#3, CASE WHEN isnull(none#19) THEN -25567 ELSE cast(gettimestamp(none#19, yyyy-MM-dd, Some(Etc/UTC), false) as date) END AS #2, none#20, none#0 AS #3, (none#3 = '') AS #4]&lt;/P&gt;&lt;P&gt;+- Relation[none#0,none#1,none#2,none#3,none#4,none#5,none#6,none#7,none#8,none#9,none#10,none#11,none#12,none#13,none#14,none#15,none#16,none#17,none#18,none#19,none#20,none#21,none#22,none#23,... 5 more fields] parquet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.default(MapLike.scala:235)&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.default$(MapLike.scala:234)&lt;/P&gt;&lt;P&gt;	at scala.collection.AbstractMap.default(Map.scala:63)&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.apply(MapLike.scala:144)&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.apply$(MapLike.scala:143)&lt;/P&gt;&lt;P&gt;	at scala.collection.AbstractMap.apply(Map.scala:63)&lt;/P&gt;&lt;P&gt;	at com.databricks.sql.transaction.tahoe.stats.PrepareDeltaScan$$anonfun$prepareDeltaScanParallel$1.applyOrElse(PrepareDeltaScan.scala:229)&lt;/P&gt;&lt;P&gt;	at com.databricks.sql.transaction.tahoe.stats.PrepareDeltaScan$$anonfun$prepareDeltaScanParallel$1.applyOrElse(PrepareDeltaScan.scala:227)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.QueryPlan$$anon$2.apply(QueryPlan.scala:545)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.QueryPlan$$anon$2.apply(QueryPlan.scala:541)&lt;/P&gt;&lt;P&gt;	at scala.PartialFunction.applyOrElse(PartialFunction.scala:127)&lt;/P&gt;&lt;P&gt;	at scala.PartialFunction.applyOrElse$(PartialFunction.scala:126)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.QueryPlan$$anon$2.applyOrElse(QueryPlan.scala:541)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:484)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:86)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:484)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.org$apache$spark$sql$catalyst$plans$logical$AnalysisHelper$$super$transformDownWithPruning(LogicalPlan.scala:29)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hitesh&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 22:08:40 GMT</pubDate>
    <dc:creator>hitesh1</dc:creator>
    <dc:date>2022-08-17T22:08:40Z</dc:date>
    <item>
      <title>java.util.NoSuchElementException: key not found</title>
      <link>https://community.databricks.com/t5/data-engineering/java-util-nosuchelementexception-key-not-found/m-p/34355#M25110</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are using a Azure Databricks with Standard DS14_V2 Cluster with Runtime 9.1 LTS, Spark 3.1.2 and Scala 2.12 and facing the below issue frequently when running our ETL pipeline. As part of the operation that is failing there are several joins happening with delta tables and the output of that is being written into another delta table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was a similar issue reported earlier and was fixed as part of DB runtime 9.0 (unsupported) &lt;A href="https://issues.apache.org/jira/browse/SPARK-34000" alt="https://issues.apache.org/jira/browse/SPARK-34000" target="_blank"&gt;: [SPARK-34000] ExecutorAllocationListener threw an exception java.util.NoSuchElementException - ASF JIRA (apache.org)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the documentation for that : &lt;A href="https://docs.microsoft.com/en-us/azure/databricks/release-notes/runtime/9.0" alt="https://docs.microsoft.com/en-us/azure/databricks/release-notes/runtime/9.0" target="_blank"&gt;Databricks Runtime 9.0 (Unsupported) - Azure Databricks | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the below exception an unrelated issue from the one reported in the bug mentioned above and should I be logging another bug for this to be fixed? We are facing this issue every few runs of our daily job. Any help or pointers would be greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the exception with the stack trace : I have uploaded a file with the full stack trace because of the size limit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An error occurred while calling o74209.insertInto.&lt;/P&gt;&lt;P&gt;: java.util.NoSuchElementException: key not found: Project [none#1 AS #0, none#4, none#18 AS #1, none#13, none#12, none#3, CASE WHEN isnull(none#19) THEN -25567 ELSE cast(gettimestamp(none#19, yyyy-MM-dd, Some(Etc/UTC), false) as date) END AS #2, none#20, none#0 AS #3, (none#3 = '') AS #4]&lt;/P&gt;&lt;P&gt;+- Relation[none#0,none#1,none#2,none#3,none#4,none#5,none#6,none#7,none#8,none#9,none#10,none#11,none#12,none#13,none#14,none#15,none#16,none#17,none#18,none#19,none#20,none#21,none#22,none#23,... 5 more fields] parquet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.default(MapLike.scala:235)&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.default$(MapLike.scala:234)&lt;/P&gt;&lt;P&gt;	at scala.collection.AbstractMap.default(Map.scala:63)&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.apply(MapLike.scala:144)&lt;/P&gt;&lt;P&gt;	at scala.collection.MapLike.apply$(MapLike.scala:143)&lt;/P&gt;&lt;P&gt;	at scala.collection.AbstractMap.apply(Map.scala:63)&lt;/P&gt;&lt;P&gt;	at com.databricks.sql.transaction.tahoe.stats.PrepareDeltaScan$$anonfun$prepareDeltaScanParallel$1.applyOrElse(PrepareDeltaScan.scala:229)&lt;/P&gt;&lt;P&gt;	at com.databricks.sql.transaction.tahoe.stats.PrepareDeltaScan$$anonfun$prepareDeltaScanParallel$1.applyOrElse(PrepareDeltaScan.scala:227)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.QueryPlan$$anon$2.apply(QueryPlan.scala:545)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.QueryPlan$$anon$2.apply(QueryPlan.scala:541)&lt;/P&gt;&lt;P&gt;	at scala.PartialFunction.applyOrElse(PartialFunction.scala:127)&lt;/P&gt;&lt;P&gt;	at scala.PartialFunction.applyOrElse$(PartialFunction.scala:126)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.QueryPlan$$anon$2.applyOrElse(QueryPlan.scala:541)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:484)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:86)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:484)&lt;/P&gt;&lt;P&gt;	at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.org$apache$spark$sql$catalyst$plans$logical$AnalysisHelper$$super$transformDownWithPruning(LogicalPlan.scala:29)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hitesh&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 22:08:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/java-util-nosuchelementexception-key-not-found/m-p/34355#M25110</guid>
      <dc:creator>hitesh1</dc:creator>
      <dc:date>2022-08-17T22:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.NoSuchElementException: key not found</title>
      <link>https://community.databricks.com/t5/data-engineering/java-util-nosuchelementexception-key-not-found/m-p/34356#M25111</link>
      <description>&lt;P&gt;Hey man,&lt;/P&gt;&lt;P&gt;Please use these configuration in your cluster and it will work,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spark.sql.storeAssignmentPolicy LEGACY&lt;/P&gt;&lt;P&gt;spark.sql.parquet.binaryAsString true&lt;/P&gt;&lt;P&gt;spark.speculation false&lt;/P&gt;&lt;P&gt;spark.sql.legacy.timeParserPolicy LEGACY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it wont work let me know what problem you are facing there,we can discuss &lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 09:53:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/java-util-nosuchelementexception-key-not-found/m-p/34356#M25111</guid>
      <dc:creator>Aviral-Bhardwaj</dc:creator>
      <dc:date>2022-12-02T09:53:14Z</dc:date>
    </item>
  </channel>
</rss>

