Forum Discussion
Using script activity to query a lakehouse
- 9 months ago
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:
I then wrote a simple select count(*) query to test it:
and that returned the proper result:
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,
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.
- pmscorca9 months ago
Post Prodigy
Hi, thanks for your reply, but for script activity it isn't possible to select a lakehouse to query by T-SQL language.
- tayloramy9 months ago
Super User
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:
I then wrote a simple select count(*) query to test it:
and that returned the proper result:
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.
- v-aatheeque9 months ago
Community Support
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.