<?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 Connect to Federation Server from R Studio with ODBC in SAS Community Nordic</title>
    <link>https://communities.sas.com/t5/SAS-Community-Nordic/Connect-to-Federation-Server-from-R-Studio-with-ODBC/m-p/645271#M285</link>
    <description>&lt;P&gt;A customer recently asked how they could provide SAS datasets to their R and R Studio users. Remembering they already have SAS Federation Server licensed and in use, the ODBC driver for Federation Server could make this possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, to help my customer I started up a test environment to investigate this. Federation Server was already up and running so didn't need to do any configuration server-side. Also the Federation Server driver for ODBC was installed in my Windows environment. If you don't have it installed, contact your SAS administrator for advice how to get it installed. It should be part of the SAS Federation Server software depot. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The windows client did not yet have the Federation Server data source defined, so I looked into the ODBC DSN administration panel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMPORTANT: In Windows there is the 32bit and 64bit DSN administration panel, so if you plan to run 64bit R, then use the 64bit ODBC admin panel, like I did.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1_Configure_Fed_DSN.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39067i800ED616A2F64343/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1_Configure_Fed_DSN.jpg" alt="1_Configure_Fed_DSN.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose a descriptive name for the new data source, I used "FEDODBC" in this example. Make sure to enter correct server hostname and port for your Federation Server. And check in your Federation Server administration console for the correct Fed Server DSN to use. I use "Company" in this example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can click "Test Connection":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2_Test_Fed_DSN.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39068iAEE1D7AB16CBE000/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2_Test_Fed_DSN.JPG" alt="2_Test_Fed_DSN.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I didn't have R and R Studio installed, so I went to cran for R:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://cran.r-project.org/bin/windows/" target="_blank"&gt;https://cran.r-project.org/bin/windows/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to rstudio.com for R Studio:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://rstudio.com/products/rstudio/download/" target="_blank"&gt;https://rstudio.com/products/rstudio/download/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="3_Install_R_and_RStudio.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39074iA26F5D4FEE0A771F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3_Install_R_and_RStudio.jpg" alt="3_Install_R_and_RStudio.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Installer will as if you want both 32bit or 64bit R Studio installed, I only installed the 64bit binaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start R Studio the first thing you'll need is the ODBC package.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fortunately it's simple to add packages in R, I used the following command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;# Install the latest odbc release from CRAN:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#008000"&gt;&amp;gt;&lt;/FONT&gt; install.packages("odbc")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;This started the download of R tools first and then proceeded to load the odbc package (some parts of log have been omitted)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;A href="https://cran.rstudio.com/bin/windows/Rtools/" target="_blank"&gt;https://cran.rstudio.com/bin/windows/Rtools/&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;also installing the dependencies ‘ellipsis’, ‘digest’, ‘glue’, ‘bit’, ‘vctrs’, ‘pkgconfig’, ‘bit64’, ‘blob’, ‘DBI’, ‘hms’, ‘rlang’, ‘Rcpp’, ‘BH’&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;There is a binary version available but the source version is later:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;binary source needs_compilation&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;rlang 0.4.5 0.4.6 TRUE&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;Binaries will be installed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;trying URL '&lt;A href="https://cran.rstudio.com/bin/windows/contrib/4.0/odbc_1.2.2.zip" target="_blank"&gt;https://cran.rstudio.com/bin/windows/contrib/4.0/odbc_1.2.2.zip&lt;/A&gt;'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Content type 'application/zip' length 1297511 bytes (1.2 MB)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;downloaded 1.2 MB&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;package ‘odbc’ successfully unpacked and MD5 sums checked&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;The downloaded binary packages are in&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;C:\Users\sas\AppData\Local\Temp\2\Rtmps50ErW\downloaded_packages&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the log, odbc packege was now installed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I proceeded to R Studio Connections panel:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="4_Open_R_connections_tab.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39069i8ACC0CE287C00C90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4_Open_R_connections_tab.jpg" alt="4_Open_R_connections_tab.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There I can see my "FEDODBC" data source readily available as we already configured that on the Windows side as the first step. Opening that I can see the configuration for that data source:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="5_Configure_FEDODBC_connection.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39070i747B82FA36306C45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5_Configure_FEDODBC_connection.jpg" alt="5_Configure_FEDODBC_connection.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There you can see the connection string for the FEDODBC connection:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;library(DBI)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;con &amp;lt;- dbConnect(odbc::odbc(), "FEDODBC", timeout = 10)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Clicking on "Test" we see the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="6_Test_FEDODBC_connection.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39071iFE6FBA16B2664640/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6_Test_FEDODBC_connection.jpg" alt="6_Test_FEDODBC_connection.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success! So we know the connection from R Studio to the ODBC client works and we can open up a data source on the Federation Server:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="7_Open_data_on_FedServer.jpg" style="width: 737px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39073iF11B2EB662F2D685/image-size/large?v=v2&amp;amp;px=999" role="button" title="7_Open_data_on_FedServer.jpg" alt="7_Open_data_on_FedServer.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I opened a test table named "ORION_PROFIT" under the data source Company/SASData/Finance and I can readily see the data in the R Studio data panel. Your path and data are of course what you have defined in your Federation Server administration console.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's all! It really is this easy &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you end up trying this in the comments below. As a SAS employee I of course recommend the use of SAS for all your analytics needs, but realize the R is very popular in many organizations and often the need to make use of SAS datasets in R comes up. There are other way to share data between these tools but this is by far the easiest way if you already have SAS Federation Server available.&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;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2020 12:34:01 GMT</pubDate>
    <dc:creator>jarno</dc:creator>
    <dc:date>2020-05-05T12:34:01Z</dc:date>
    <item>
      <title>Connect to Federation Server from R Studio with ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Community-Nordic/Connect-to-Federation-Server-from-R-Studio-with-ODBC/m-p/645271#M285</link>
      <description>&lt;P&gt;A customer recently asked how they could provide SAS datasets to their R and R Studio users. Remembering they already have SAS Federation Server licensed and in use, the ODBC driver for Federation Server could make this possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, to help my customer I started up a test environment to investigate this. Federation Server was already up and running so didn't need to do any configuration server-side. Also the Federation Server driver for ODBC was installed in my Windows environment. If you don't have it installed, contact your SAS administrator for advice how to get it installed. It should be part of the SAS Federation Server software depot. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The windows client did not yet have the Federation Server data source defined, so I looked into the ODBC DSN administration panel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMPORTANT: In Windows there is the 32bit and 64bit DSN administration panel, so if you plan to run 64bit R, then use the 64bit ODBC admin panel, like I did.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1_Configure_Fed_DSN.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39067i800ED616A2F64343/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1_Configure_Fed_DSN.jpg" alt="1_Configure_Fed_DSN.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose a descriptive name for the new data source, I used "FEDODBC" in this example. Make sure to enter correct server hostname and port for your Federation Server. And check in your Federation Server administration console for the correct Fed Server DSN to use. I use "Company" in this example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can click "Test Connection":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2_Test_Fed_DSN.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39068iAEE1D7AB16CBE000/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2_Test_Fed_DSN.JPG" alt="2_Test_Fed_DSN.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I didn't have R and R Studio installed, so I went to cran for R:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://cran.r-project.org/bin/windows/" target="_blank"&gt;https://cran.r-project.org/bin/windows/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to rstudio.com for R Studio:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://rstudio.com/products/rstudio/download/" target="_blank"&gt;https://rstudio.com/products/rstudio/download/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="3_Install_R_and_RStudio.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39074iA26F5D4FEE0A771F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3_Install_R_and_RStudio.jpg" alt="3_Install_R_and_RStudio.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Installer will as if you want both 32bit or 64bit R Studio installed, I only installed the 64bit binaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start R Studio the first thing you'll need is the ODBC package.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fortunately it's simple to add packages in R, I used the following command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;# Install the latest odbc release from CRAN:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#008000"&gt;&amp;gt;&lt;/FONT&gt; install.packages("odbc")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;This started the download of R tools first and then proceeded to load the odbc package (some parts of log have been omitted)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;A href="https://cran.rstudio.com/bin/windows/Rtools/" target="_blank"&gt;https://cran.rstudio.com/bin/windows/Rtools/&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;also installing the dependencies ‘ellipsis’, ‘digest’, ‘glue’, ‘bit’, ‘vctrs’, ‘pkgconfig’, ‘bit64’, ‘blob’, ‘DBI’, ‘hms’, ‘rlang’, ‘Rcpp’, ‘BH’&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;There is a binary version available but the source version is later:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;binary source needs_compilation&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;rlang 0.4.5 0.4.6 TRUE&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;Binaries will be installed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;trying URL '&lt;A href="https://cran.rstudio.com/bin/windows/contrib/4.0/odbc_1.2.2.zip" target="_blank"&gt;https://cran.rstudio.com/bin/windows/contrib/4.0/odbc_1.2.2.zip&lt;/A&gt;'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Content type 'application/zip' length 1297511 bytes (1.2 MB)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;downloaded 1.2 MB&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;package ‘odbc’ successfully unpacked and MD5 sums checked&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;The downloaded binary packages are in&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;C:\Users\sas\AppData\Local\Temp\2\Rtmps50ErW\downloaded_packages&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the log, odbc packege was now installed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I proceeded to R Studio Connections panel:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="4_Open_R_connections_tab.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39069i8ACC0CE287C00C90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4_Open_R_connections_tab.jpg" alt="4_Open_R_connections_tab.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There I can see my "FEDODBC" data source readily available as we already configured that on the Windows side as the first step. Opening that I can see the configuration for that data source:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="5_Configure_FEDODBC_connection.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39070i747B82FA36306C45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5_Configure_FEDODBC_connection.jpg" alt="5_Configure_FEDODBC_connection.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There you can see the connection string for the FEDODBC connection:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;library(DBI)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;con &amp;lt;- dbConnect(odbc::odbc(), "FEDODBC", timeout = 10)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Clicking on "Test" we see the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="6_Test_FEDODBC_connection.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39071iFE6FBA16B2664640/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6_Test_FEDODBC_connection.jpg" alt="6_Test_FEDODBC_connection.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success! So we know the connection from R Studio to the ODBC client works and we can open up a data source on the Federation Server:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="7_Open_data_on_FedServer.jpg" style="width: 737px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39073iF11B2EB662F2D685/image-size/large?v=v2&amp;amp;px=999" role="button" title="7_Open_data_on_FedServer.jpg" alt="7_Open_data_on_FedServer.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I opened a test table named "ORION_PROFIT" under the data source Company/SASData/Finance and I can readily see the data in the R Studio data panel. Your path and data are of course what you have defined in your Federation Server administration console.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's all! It really is this easy &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you end up trying this in the comments below. As a SAS employee I of course recommend the use of SAS for all your analytics needs, but realize the R is very popular in many organizations and often the need to make use of SAS datasets in R comes up. There are other way to share data between these tools but this is by far the easiest way if you already have SAS Federation Server available.&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;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 12:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Community-Nordic/Connect-to-Federation-Server-from-R-Studio-with-ODBC/m-p/645271#M285</guid>
      <dc:creator>jarno</dc:creator>
      <dc:date>2020-05-05T12:34:01Z</dc:date>
    </item>
  </channel>
</rss>

