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

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

Reply
Waseem_22
New Member

DataSource Error in Connecting Azure Cosmos DB with Sql Statement

Hello,

 

I am trying to connect to Azure Cosmos DB by writing a sql statement, but I am unable to fetch the data.

It says Datasource error (Screenclip attached).

Waseem_22_0-1615899891454.png

I am able to get the data with URL and Database name, ,But when I entering Sql Statement it is giving an error. 

Can anyone please help me.

 

 

Regards,

Waseem

 

2 REPLIES 2
amitchandak
Super User
Super User

@Waseem_22 , with _ts it is giving an error. Can you check if that SQL is running directly on DB

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for replying @amitchandak , I have created a sampleDB provided by CosmosDB, which created a table with just 4 rows, I am trying to write SQL Statement based on that.

I am writing a sql statement as 
Select * From Persons where id = '61476e5d-ba88'.

Even with this I am getting the same error as 

Waseem_22_0-1615903307184.png

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI 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.

Users online (2,924)