<?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 Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111691#M3981</link>
    <description>&lt;P&gt;Any updates on this?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(spark.conf.&lt;/SPAN&gt;&lt;SPAN&gt;get&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"spark.databricks.ml.whitelist"&lt;/SPAN&gt;&lt;SPAN&gt;))&amp;nbsp; &amp;nbsp;yields "true" after setting it.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;py4j.security.Py4JSecurityException: Constructor public org.apache.spark.ml.feature.VectorAssembler(java.lang.String) is not whitelisted.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 04 Mar 2025 12:14:33 GMT</pubDate>
    <dc:creator>Niels80</dc:creator>
    <dc:date>2025-03-04T12:14:33Z</dc:date>
    <item>
      <title>Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/106296#M3912</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am currently using PySpark version 3.5.0 on my Databricks cluster. Despite setting the required configuration using the command: spark.conf.set("spark.databricks.ml.whitelist", "true"), I am still encountering an issue while trying to use the VectorAssembler module from PySpark MLlib.&lt;/P&gt;&lt;P&gt;When I try to import it using the statement "from pyspark.ml.feature import VectorAssembler", I receive the following error:&lt;/P&gt;&lt;P&gt;Py4JError: An error occurred while calling None.org.apache.spark.ml.feature.VectorAssembler.&lt;BR /&gt;py4j.security.Py4JSecurityException: Constructor public org.apache.spark.ml.feature.VectorAssembler(java.lang.String) is not whitelisted.&lt;/P&gt;&lt;P&gt;It appears that the class is not whitelisted despite enabling the necessary configuration. Kindly assist in resolving this issue so that I can proceed with my Spark MLlib operations.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 10:35:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/106296#M3912</guid>
      <dc:creator>Ritchie</dc:creator>
      <dc:date>2025-01-20T10:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/106307#M3913</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/144680"&gt;@Ritchie&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you run and validate outputs True:&lt;/P&gt;
&lt;P&gt;print(spark.conf.get("spark.databricks.ml.whitelist"))&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 12:31:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/106307#M3913</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2025-01-20T12:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111691#M3981</link>
      <description>&lt;P&gt;Any updates on this?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(spark.conf.&lt;/SPAN&gt;&lt;SPAN&gt;get&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"spark.databricks.ml.whitelist"&lt;/SPAN&gt;&lt;SPAN&gt;))&amp;nbsp; &amp;nbsp;yields "true" after setting it.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;py4j.security.Py4JSecurityException: Constructor public org.apache.spark.ml.feature.VectorAssembler(java.lang.String) is not whitelisted.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Mar 2025 12:14:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111691#M3981</guid>
      <dc:creator>Niels80</dc:creator>
      <dc:date>2025-03-04T12:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111809#M3982</link>
      <description>&lt;P&gt;Hi all, I just run the code today out of curiosity and it just worked without any Exception. I used a single node cluster with DBR 15.4 ML (Spark 3.5.0).&lt;/P&gt;
&lt;P&gt;Here is my code to confirm:&lt;/P&gt;
&lt;PRE&gt;from pyspark.sql import Row&lt;BR /&gt;from pyspark.sql.functions import lit&lt;BR /&gt;from pyspark.ml.feature import VectorAssembler&lt;BR /&gt;&lt;BR /&gt;# Create sample data&lt;BR /&gt;data = [&lt;BR /&gt;  Row(feature1=1.0, feature2=2.0),&lt;BR /&gt;  Row(feature1=3.0, feature2=4.0)&lt;BR /&gt;]&lt;BR /&gt;&lt;BR /&gt;# Create DataFrame&lt;BR /&gt;df = spark.createDataFrame(data)&lt;BR /&gt;&lt;BR /&gt;df = df.withColumn("pcainput_valgbp_avg_y1", lit(0))&lt;BR /&gt;&lt;BR /&gt;# Initialize VectorAssembler&lt;BR /&gt;assembler = VectorAssembler(&lt;BR /&gt;  inputCols=["feature1", "feature2", "pcainput_valgbp_avg_y1"],&lt;BR /&gt;  outputCol="features"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;# Transform the DataFrame&lt;BR /&gt;output_df = assembler.transform(df)&lt;BR /&gt;display(output_df)&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="koji_kawamura_0-1741168207126.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15241i211FA1B50C03ED06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="koji_kawamura_0-1741168207126.png" alt="koji_kawamura_0-1741168207126.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 10:06:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111809#M3982</guid>
      <dc:creator>koji_kawamura</dc:creator>
      <dc:date>2025-03-05T10:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111810#M3983</link>
      <description>&lt;P&gt;I submitted too fast. There is a similar thread mentioning that the similar error can be thrown with a Shared cluster.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.databricks.com/t5/data-engineering/constructor-public-org-apache-spark-ml-feature-bucketizer-java/td-p/86833" target="_blank"&gt;https://community.databricks.com/t5/data-engineering/constructor-public-org-apache-spark-ml-feature-bucketizer-java/td-p/86833&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 10:09:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111810#M3983</guid>
      <dc:creator>koji_kawamura</dc:creator>
      <dc:date>2025-03-05T10:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111811#M3984</link>
      <description>&lt;P&gt;Yes, you can close this topic. It works on a ML-enabled machine. I wasn't aware that you have to pay extra for ML capabilities.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 10:11:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111811#M3984</guid>
      <dc:creator>Niels80</dc:creator>
      <dc:date>2025-03-05T10:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111946#M3985</link>
      <description>&lt;P&gt;Glad to hear it works for you now! The ML runtime has variety of preinstalled integrations such as &lt;A href="https://www.databricks.com/product/managed-mlflow" target="_blank"&gt;MLflow&lt;/A&gt;, which provides ML lifecycle management, MLOps ... etc. Please explore them if you haven't done it already, to establish benefits of the extra &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 00:36:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/111946#M3985</guid>
      <dc:creator>koji_kawamura</dc:creator>
      <dc:date>2025-03-07T00:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Use VectorAssembler in PySpark 3.5.0 Due to Whitelisting</title>
      <link>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/133739#M4337</link>
      <description>&lt;P&gt;I also had this error trying to use ML on free edition. Is ML features working for free edition.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 18:38:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/unable-to-use-vectorassembler-in-pyspark-3-5-0-due-to/m-p/133739#M4337</guid>
      <dc:creator>anderaraujo92</dc:creator>
      <dc:date>2025-10-03T18:38:33Z</dc:date>
    </item>
  </channel>
</rss>

