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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Unable to connect to postgresql server using query (Expression.Error: The key didn't match any rows)

Hi,

 

I have a connection to postgresql server through ODBC that works ok. A table has become too large and now every time I need to update it, it takes too much time.

 

The only idea I came up with was to prior to retrieving of ALL the data from the table, write a query to filter it, so I get only the data I need.

 

Right now when I write my SQL code on the window shown below (sorry the language) and press accept, it throws Expression.Error: The key didn't match any rows.

 

imallea_0-1657830142903.png

 

Any idea of what should I do?

 

Thanks

1 ACCEPTED SOLUTION

I see now. Copy all the code from the custom step you added, from "let" to "in Source", then open up Advanced Editor. Delete everything and paste in your code there

View solution in original post

6 REPLIES 6
johnt75
Super User
Super User

Create a new blank query and use the below

let
	Source = Odbc.Query("dsn=Reporting Server", "
select * from my_table where my_filter = 1
	")
in
    Source

You can add any steps needed afterwards to change data types etc

Anonymous
Not applicable

HI johnt75,

 

I didn't fully understand your reply. This is what I did.

imallea_1-1657906556240.png

And got this error

 

imallea_2-1657906596263.png

 

What am I doing wrong?

 

Thanks!

remove the ; at the end of your query, it should be fine then

Anonymous
Not applicable

Still got the problem.. 😞

 

1111.png2222.png

I see now. Copy all the code from the custom step you added, from "let" to "in Source", then open up Advanced Editor. Delete everything and paste in your code there

Anonymous
Not applicable

Thank you, finally I just copied the SQL code (without the ; at the end, that's why it didn't work when I first tried) and it worked.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors