cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cheezee Frequent Visitor
Frequent Visitor

Connecting to ODBC Datasource using SQL Statement

Hello guys,

 

I'm trying to connect to an Oracle database (that has over 300,000 objects within a certain schema) by using an ODBC connector. Reason being, the Oracle database is hosted in a UNIX environment and I am connecting to it from Windows Server.

 

Please, how can I connect to a table/view that is not listed within the first 10,000 preview results in the Navigator window, say by querying the exact table using a SQL statement? 

 

Alternatively, is there any other method of connecting to this table  (using Blank Query, for example)?

 

Any answer at all will be appreciated. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-yuezhe-msft
Moderator

Re: Connecting to ODBC Datasource using SQL Statement

@cheezee,

Option1:

Write SQL statement in Power BI Desktop.
1.PNG

Option2:

Add a blank query in Power BI Desktop, paste the following code into Advanced Editor of the blank query.

let
    Source = Odbc.Query("dsn=yourdsn", "Select * from yourtable")
in
    Source


2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Moderator v-yuezhe-msft
Moderator

Re: Connecting to ODBC Datasource using SQL Statement

@cheezee,

Option1:

Write SQL statement in Power BI Desktop.
1.PNG

Option2:

Add a blank query in Power BI Desktop, paste the following code into Advanced Editor of the blank query.

let
    Source = Odbc.Query("dsn=yourdsn", "Select * from yourtable")
in
    Source


2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

cheezee Frequent Visitor
Frequent Visitor

Re: Connecting to ODBC Datasource using SQL Statement

Thanks Lydia,

 

I'll try this out and see how it goes. I believe this should solve my problem. Smiley Happy

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 198 members 2,244 guests
Please welcome our newest community members: