Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
jcamilo1985
Helper III
Helper III

sql point to R studio

Hello, greetings to everyone, it's been a while since I've been here.

The question is really simple, does anyone know the process to connect the SQL point that generates fabric to R Studio?

I appreciate any help

1 ACCEPTED SOLUTION

Thank you very much for the guidance @v-sgandrathi the driver in the text string was correctly placed, however the problem was in the driver configuration in Windows, to solve it I went to the ODBC data source administrator, select configure the ODBC_driver_sql_server driver, in this case the one I have installed is ODBC Driver 18 for SQL Server. The authentication type select "with Microsoft entre ID integrated authentication", the rest I left as default. In R studio, the dbConnect argument, I set it to: Authentication = ActiveDirectoryInteractive
and finally it worked

Again, thank you very much for the support @v-sgandrathi 

View solution in original post

5 REPLIES 5
girishthimmaiah
Resolver I
Resolver I

Install the Required Packages
First, ensure you have the required R packages installed:

r

install.packages("odbc")
install.packages("DBI")

Get Your Fabric SQL Details
Open Microsoft Fabric.
Navigate to your Lakehouse or Warehouse.
Click on "SQL Endpoint", and note down the Server and Database details.

Connect R Studio to Fabric
Now, use the below R code to connect:

r

library(odbc)
library(DBI)

con <- dbConnect(odbc::odbc(),
Driver = "ODBC Driver 17 for SQL Server", # Ensure this driver is installed
Server = "your-fabric-server.database.windows.net",
Database = "your_database_name",
UID = "your_username",
PWD = "your_password";
Encrypt = "yes",
TrustServerCertificate = "no",
Authentication = "ActiveDirectoryPassword") # Adjust authentication if necessary

# Check that the connection succeeds
dbListTables(con)
Run a Query
After being connected, you can fetch some data like this:

r
df <- dbGetQuery(con, "SELECT TOP 10 * FROM your_table_name")
print(df)

First of all, thank you very much for answering. @girishthimmaiah 
I have not been successful, I have problems with authentication, I connected the SQL point from the dbeaver client, with MFA authentication, but here I cannot get it to work.
Regarding the initial code, I have some differences, for example the driver I have installed is the ODBC Driver 18 for SQL Server
and my SQL point has the structure
...-datawarehouse.fabric.microsoft.com

Can this be solved?

Hi @jcamilo1985,

Since you have ODBC Driver 18 for SQL Server installed, make sure your connection code reflects this by specifying the driver correctly in your connection string.

As you mentioned successfully connecting using DBeaver, ensure that the same connection parameters are used in R Studio.


By following these adjustments, you should be able to resolve the authentication issues and successfully connect R Studio to your Microsoft Fabric SQL endpoint.

If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!

Thank you for being a part of the Microsoft Fabric Community.

Thank you very much for the guidance @v-sgandrathi the driver in the text string was correctly placed, however the problem was in the driver configuration in Windows, to solve it I went to the ODBC data source administrator, select configure the ODBC_driver_sql_server driver, in this case the one I have installed is ODBC Driver 18 for SQL Server. The authentication type select "with Microsoft entre ID integrated authentication", the rest I left as default. In R studio, the dbConnect argument, I set it to: Authentication = ActiveDirectoryInteractive
and finally it worked

Again, thank you very much for the support @v-sgandrathi 

Hi @jcamilo1985,

 

As we did not get a response, may I know if the above reply could clarify your issue, or could you please help confirm if we may help you with anything else?

 

And if the provided information meets your requirements, you can Accept the solution and also give Kudos on that reply. It helps other users who are searching for this same information and find the information.

 

Your understanding and patience will be appreciated.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.