<?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 FeatureEngineeringClient and R in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/featureengineeringclient-and-r/m-p/120732#M46243</link>
    <description>&lt;P&gt;Hi! I'm trying to find a way to create a feature table from R and reticulate&lt;BR /&gt;&lt;BR /&gt;Is it possible? Currently I'm not been able to make a pyspark dataframe to be passed from R to the create_table() function.&lt;BR /&gt;&lt;BR /&gt;The code I'm trying to make it work follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;install.packages("reticulate")
library(reticulate)
os &amp;lt;- import("os")
use_python(os$sys$executable)

library(tidyverse)
library(sparklyr)
# Connect to Spark
spark &amp;lt;- spark_connect(method = "databricks")

fs &amp;lt;- import("databricks.feature_engineering")
fe &amp;lt;- fs$FeatureEngineeringClient()

mtcars_id &amp;lt;- mtcars %&amp;gt;% rownames_to_column("car_id")
mtcars_sdf &amp;lt;- sdf_copy_to(spark, mtcars_id, overwrite = TRUE)
mtcars_sdf &amp;lt;- spark_dataframe(mtcars_sdf)

fe$create_table(
    name="databricks_asn.default.mtcars",
    primary_keys=c("car_id"),
    df=mtcars_sdf,
    description="MTCARS do R"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jun 2025 16:13:39 GMT</pubDate>
    <dc:creator>athos</dc:creator>
    <dc:date>2025-06-02T16:13:39Z</dc:date>
    <item>
      <title>FeatureEngineeringClient and R</title>
      <link>https://community.databricks.com/t5/data-engineering/featureengineeringclient-and-r/m-p/120732#M46243</link>
      <description>&lt;P&gt;Hi! I'm trying to find a way to create a feature table from R and reticulate&lt;BR /&gt;&lt;BR /&gt;Is it possible? Currently I'm not been able to make a pyspark dataframe to be passed from R to the create_table() function.&lt;BR /&gt;&lt;BR /&gt;The code I'm trying to make it work follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;install.packages("reticulate")
library(reticulate)
os &amp;lt;- import("os")
use_python(os$sys$executable)

library(tidyverse)
library(sparklyr)
# Connect to Spark
spark &amp;lt;- spark_connect(method = "databricks")

fs &amp;lt;- import("databricks.feature_engineering")
fe &amp;lt;- fs$FeatureEngineeringClient()

mtcars_id &amp;lt;- mtcars %&amp;gt;% rownames_to_column("car_id")
mtcars_sdf &amp;lt;- sdf_copy_to(spark, mtcars_id, overwrite = TRUE)
mtcars_sdf &amp;lt;- spark_dataframe(mtcars_sdf)

fe$create_table(
    name="databricks_asn.default.mtcars",
    primary_keys=c("car_id"),
    df=mtcars_sdf,
    description="MTCARS do R"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 16:13:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/featureengineeringclient-and-r/m-p/120732#M46243</guid>
      <dc:creator>athos</dc:creator>
      <dc:date>2025-06-02T16:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureEngineeringClient and R</title>
      <link>https://community.databricks.com/t5/data-engineering/featureengineeringclient-and-r/m-p/120854#M46261</link>
      <description>&lt;DIV class="paragraph"&gt;Using the provided CONTEXT, it can be concluded that:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;Creating Databricks Feature Tables using the &lt;CODE&gt;create_table()&lt;/CODE&gt; function is well-documented for use with PySpark DataFrames. However, passing a PySpark DataFrame generated in R using &lt;CODE&gt;sparklyr&lt;/CODE&gt; to the &lt;CODE&gt;create_table()&lt;/CODE&gt; function via reticulate is not directly documented or supported.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;The primary challenge is compatibility between the SparkR or &lt;CODE&gt;sparklyr&lt;/CODE&gt; DataFrame and the PySpark DataFrame expected by the Databricks Feature Store API. This process is not explicitly described in the available documentation.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;To work around this limitation, consider creating the feature table directly within PySpark after exporting the relevant data from R. Another approach is to save the DataFrame from R using the Delta table format and load it into a PySpark DataFrame in Python before invoking the &lt;CODE&gt;create_table()&lt;/CODE&gt; function in the Feature Store API.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph"&gt;Hope this helps, Lou.&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Jun 2025 19:57:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/featureengineeringclient-and-r/m-p/120854#M46261</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-06-03T19:57:36Z</dc:date>
    </item>
  </channel>
</rss>

