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

View all the Fabric Data Days sessions on demand. View schedule

Reply
pmscorca
Post Prodigy
Post Prodigy

Using script activity to query a lakehouse

Hi,

I'm trying to use the script activity thinking to query a lakehouse in T-SQL language and I've noticed that it isn't possible to select a lakehouse.

I think that a such feature could be very useful and a valid alternative respect to notebook.

Is querying a lakehouse by script activity planned in the Microsoft Fabric roadmap? Thanks

1 ACCEPTED SOLUTION

Hi @pmscorca

 

I just tested and script activities can connect to a lakehouse SQL endpoint and select data. 

 

 Here is my test set up: 

 

I created a script activity, and selected SQL Server database as the connection type. 

I used the TSQL endpoint to connect: 

tayloramy_0-1762717561292.png

I then wrote a simple select count(*) query to test it: 

tayloramy_1-1762717583362.png

 

and that returned the proper result: 

tayloramy_2-1762717612274.png

 

 

So if you're just trying to select data and not modify data, this works without issue. 

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

 

View solution in original post

4 REPLIES 4
tayloramy
Community Champion
Community Champion

Hi @pmscorca


Script activities can't connect to lakehouses currently, this isn't on the roadmap from what I can see.

 

I think you might be able to use the script activity to read from a lakehouse using the SQL endpoint, but I have not tried. 

 

I recommend posting an idea about this here: https://community.fabric.microsoft.com/t5/Fabric-Ideas/idb-p/fbc_ideas

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

Hi, thanks for your reply, but for script activity it isn't possible to select a lakehouse to query by T-SQL language.

Hi @pmscorca

 

I just tested and script activities can connect to a lakehouse SQL endpoint and select data. 

 

 Here is my test set up: 

 

I created a script activity, and selected SQL Server database as the connection type. 

I used the TSQL endpoint to connect: 

tayloramy_0-1762717561292.png

I then wrote a simple select count(*) query to test it: 

tayloramy_1-1762717583362.png

 

and that returned the proper result: 

tayloramy_2-1762717612274.png

 

 

So if you're just trying to select data and not modify data, this works without issue. 

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

 

Hi @pmscorca 

Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.