The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I am having a trouble passing sql queries to notebooks as they are originally stored in .Xlsx file , when they are passed as a string it gives me an error that it can't unserialize the response, tried to put the query betweena single qoute and between double qoutes , it didn't help
Solved! Go to Solution.
Hi
My problem was concerned with the Sql Query itself in the .xlsx file
The flow of the data is not directly to the notebook but it goes throw stages
The excel file is a metadata config file so i use it to control the flow of the data from source to gold layer of the medallion architecture.
So the data goes through this flow:
lookup -> filter -> loop on filtered rows
So the metadata is passed to the notebook ,including the sql query,
I hade to remove the tabs , \n, extra spaces making the query on a single line as it is passed as a string.
that is how i solved the issue.
Hi @UsefGamal
Thanks for using the Microsoft Fabric Community.
Could you please confirm the source of your .xlsx file?
Try loading the file into a Lakehouse and use the below code.
import pandas as pd
# Read the Excel file
df = pd.read_excel('lakehouse ABFS file path', sheet_name='Sheet1')
I hope this information helps. Please do let us know if you have any further queries.
Thank you.
Hi
My problem was concerned with the Sql Query itself in the .xlsx file
The flow of the data is not directly to the notebook but it goes throw stages
The excel file is a metadata config file so i use it to control the flow of the data from source to gold layer of the medallion architecture.
So the data goes through this flow:
lookup -> filter -> loop on filtered rows
So the metadata is passed to the notebook ,including the sql query,
I hade to remove the tabs , \n, extra spaces making the query on a single line as it is passed as a string.
that is how i solved the issue.
Hi @UsefGamal
Glad that you were able to find some insights and thank you for sharing the same with the community as it can be helpful to others.
Please continue using Fabric Community for further queries.
Thank you.
Hi @UsefGamal
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.
Thanks.