1
votes

I have created a local instance of a Tabular model using Visual Studio's SSAS Project Template.

Still a little new to this, but I have used an OLEDB connection to import data using a SQL Query.

The table is imported successfully, but I want to make changes to the Query I used to import the data.

Below circled in blue is my connection, and circled in red is the table properties option.

enter image description here

When I select the table properties, I don't see the query. I just see the connection string;

enter image description here

The same goes for the Power Query Editor

enter image description here

Where do I find the Query I made to edit it? I cannot find it anywhere!

Thank you

1

1 Answers

0
votes

I am not familiar with SSAS, but the interface looks very similar to PowerBI.

Currently you have imported a whole table, you cannot apply an SQL query to that connection.

To import the results of a SQL query you need to create a native query.

For example, if I want to query a Postgres database that would look like this:

let
    Source = Value.NativeQuery(PostgreSQL.Database("db.host.path", "db_name"), "select * from some_table where condition = 1")
in
    Source

I understand that you don't have a Postgres database, so the command would look something like this (not sure, can't test):

let
    Source = Value.NativeQuery(#"OleDb/provider-SQLNCLI11 1", "select * from some_table where condition = 1")
in
    Source