<?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: How to load data using Sparklyr in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41157#M2077</link>
    <description>&lt;P&gt;Those set of commands didn't seem to work. However, with a little digging and reading I found this set of command did work.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%r
# Load Sparklyr library
library(sparklyr)

# Connect to the cluster using a service principal
sc &amp;lt;- spark_connect(method = "databricks")

# Set the database where the table is located
tbl_change_db &amp;lt;- "xxx_mydata"

# Use spark_read_table() function to read the table
data_tbl &amp;lt;- spark_read_table(sc, "mydata_etl")&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 23 Aug 2023 12:31:15 GMT</pubDate>
    <dc:creator>JefferyReichman</dc:creator>
    <dc:date>2023-08-23T12:31:15Z</dc:date>
    <item>
      <title>How to load data using Sparklyr</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/40699#M2066</link>
      <description>&lt;P&gt;Databricks Community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;New to Databricks, and R User and trying to figure out how to load a hive table via Sparklyr. The path to the file is https://databricks.xxx.xx.gov/#table/xxx_mydata/mydata_etl&amp;nbsp; (right clicking on the file). I tried&lt;/P&gt;&lt;P data-unlink="true"&gt;data_tbl &amp;lt;- tbl(sc, "https://databricks.xxx.xx.gov/#table/xxx_mydata/mydata_etl") &amp;nbsp;and apparently that isn't correct.&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 02:35:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/40699#M2066</guid>
      <dc:creator>JefferyReichman</dc:creator>
      <dc:date>2023-08-21T02:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to load data using Sparklyr</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/40734#M2067</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/55676"&gt;@JefferyReichman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;When trying to read a Hive table through Sparklyr, you can use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;spark_read_table()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function. This function reads tables from your cluster's default database or a specific database.&lt;/P&gt;&lt;P&gt;Here's an example of how to read a Hive table in Sparklyr using a specific database:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%r
# Load Sparklyr library
library(sparklyr)

# Connect to the cluster using a service principal
sc &amp;lt;- spark_connect(method = "databricks", 
                    username = "client_id",
                    password = "client_secret",
                    tenant_id = "tenant_id",
                    endpoint = "https://westus2.azuredatabricks.net")

# Set the database where the table is located
database_name &amp;lt;- "xxx_mydata"

# Use spark_read_table() function to read the table
data_tbl &amp;lt;- spark_read_table(sc, in_database(database_name, "mydata_etl"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 06:51:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/40734#M2067</guid>
      <dc:creator>Kumaran</dc:creator>
      <dc:date>2023-08-21T06:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to load data using Sparklyr</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41068#M2074</link>
      <description>&lt;P&gt;Thanks - where can I read up on this for getting started - Jeff&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 21:53:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41068#M2074</guid>
      <dc:creator>JefferyReichman</dc:creator>
      <dc:date>2023-08-22T21:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to load data using Sparklyr</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41157#M2077</link>
      <description>&lt;P&gt;Those set of commands didn't seem to work. However, with a little digging and reading I found this set of command did work.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%r
# Load Sparklyr library
library(sparklyr)

# Connect to the cluster using a service principal
sc &amp;lt;- spark_connect(method = "databricks")

# Set the database where the table is located
tbl_change_db &amp;lt;- "xxx_mydata"

# Use spark_read_table() function to read the table
data_tbl &amp;lt;- spark_read_table(sc, "mydata_etl")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Aug 2023 12:31:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41157#M2077</guid>
      <dc:creator>JefferyReichman</dc:creator>
      <dc:date>2023-08-23T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to load data using Sparklyr</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41190#M2078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/55676"&gt;@JefferyReichman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Not sure that I completely understood your last question about "where I can read up on this for getting started". However, you can start by running this code in the Databricks community edition notebook.&lt;/P&gt;&lt;P&gt;For more details: &lt;A href="https://www.databricks.com/product/faq/community-edition" target="_self"&gt;Link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 16:55:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-load-data-using-sparklyr/m-p/41190#M2078</guid>
      <dc:creator>Kumaran</dc:creator>
      <dc:date>2023-08-23T16:55:11Z</dc:date>
    </item>
  </channel>
</rss>

