<?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 What are the best practices to store VectorUDT into the databricks feature store? in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/what-are-the-best-practices-to-store-vectorudt-into-the/m-p/24224#M614</link>
    <description>&lt;P&gt;Hello, I am having issues to store VectorUDT columns into the databricks feature store. I saw that the feature store is not able to handle this kind of data type, but can store arrays. So, I tried to convert my VectorsUDT into arrays as a workaround. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I use the command &lt;B&gt;.cast('array&amp;lt;double&amp;gt;') &lt;/B&gt;or the &lt;B&gt;vector_to_array&lt;/B&gt; function from pyspark.ml.functions, I systematically get the same following error: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;SparkException: Failed to execute user defined function(functions$$$Lambda$9020/747195126: (array&amp;lt;struct&amp;lt;type:tinyint,size:int,indices:array&amp;lt;int&amp;gt;,values:array&amp;lt;double&amp;gt;&amp;gt;&amp;gt;) =&amp;gt; array&amp;lt;double&amp;gt;)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Caused by: IllegalArgumentException: function vector_to_array requires a non-null input argument and input type must be `org.apache.spark.ml.linalg.Vector` or `org.apache.spark.mllib.linalg.Vector`, but got scala.collection.mutable.WrappedArray$ofRef.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* How can I fix this error and convert my VectorUDT data into array?&lt;/P&gt;&lt;P&gt;* Or, are there better practices to store VectorUDT into the databricks feature store? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help! &lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 16:32:53 GMT</pubDate>
    <dc:creator>145625</dc:creator>
    <dc:date>2022-03-30T16:32:53Z</dc:date>
    <item>
      <title>What are the best practices to store VectorUDT into the databricks feature store?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/what-are-the-best-practices-to-store-vectorudt-into-the/m-p/24224#M614</link>
      <description>&lt;P&gt;Hello, I am having issues to store VectorUDT columns into the databricks feature store. I saw that the feature store is not able to handle this kind of data type, but can store arrays. So, I tried to convert my VectorsUDT into arrays as a workaround. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I use the command &lt;B&gt;.cast('array&amp;lt;double&amp;gt;') &lt;/B&gt;or the &lt;B&gt;vector_to_array&lt;/B&gt; function from pyspark.ml.functions, I systematically get the same following error: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;SparkException: Failed to execute user defined function(functions$$$Lambda$9020/747195126: (array&amp;lt;struct&amp;lt;type:tinyint,size:int,indices:array&amp;lt;int&amp;gt;,values:array&amp;lt;double&amp;gt;&amp;gt;&amp;gt;) =&amp;gt; array&amp;lt;double&amp;gt;)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Caused by: IllegalArgumentException: function vector_to_array requires a non-null input argument and input type must be `org.apache.spark.ml.linalg.Vector` or `org.apache.spark.mllib.linalg.Vector`, but got scala.collection.mutable.WrappedArray$ofRef.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* How can I fix this error and convert my VectorUDT data into array?&lt;/P&gt;&lt;P&gt;* Or, are there better practices to store VectorUDT into the databricks feature store? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help! &lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:32:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/what-are-the-best-practices-to-store-vectorudt-into-the/m-p/24224#M614</guid>
      <dc:creator>145625</dc:creator>
      <dc:date>2022-03-30T16:32:53Z</dc:date>
    </item>
  </channel>
</rss>

