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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
bosho
Frequent Visitor

sql command in SparkR

Hi,

 

I'm following along with the SparkR demo for Fabric notebooks that's on the microsoft website here:
https://learn.microsoft.com/en-us/fabric/data-science/r-use-sparkr

However, when I try to run any of the sql commands in a cell, instead of actually processing the command my notebook seems to just print out the SQL statement. Any ideas what I might be doing wrong?

Cheers,


1 ACCEPTED SOLUTION

Have since seen it's beecause I had loaded tidyverse in that notebook to work on some R stuff, and dplyr's sql() command seems to mask SparkR's. Think that's why it wasn't executing it on my spark dataframe.

View solution in original post

6 REPLIES 6
bosho
Frequent Visitor

Thanks for the quick responses. Yes trying it again today I don't seem to be able to replicate the issue, and I see what you're seeing. Previously it was just printing the SQL code back but today I'm getting what you're getting. 

Anonymous
Not applicable

Hi @bosho ,

Glad to know that you no longer see the issue. Please continue using Fabric Community for your further queries.

Have since seen it's beecause I had loaded tidyverse in that notebook to work on some R stuff, and dplyr's sql() command seems to mask SparkR's. Think that's why it wasn't executing it on my spark dataframe.

Anonymous
Not applicable

Hi @bosho ,

Thanks for using Fabric Community.
I cannot find issue while I am executing the below code -

vgchennamsft_0-1709290897676.png


Can you please share your test code so I can guide you better?

govindarajan_d
Super User
Super User

Hi @bosho,

 

Did you use the SQL command like this:

sqlquery <- sql("SELECT * FROM TABLE")
HimanshuS-msft
Microsoft Employee
Microsoft Employee

Hello @bosho ,

Can you please share the test code which you are running ?

Thanks 
Himanshu

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Fabric Update Carousel

Fabric Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors