Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Views directly via Advanced Query Editor - Expensive Result Sets #22

Open
OlafFischer opened this issue Mar 18, 2024 · 0 comments

Comments

@OlafFischer
Copy link
Contributor

Adding a datasource via the Wizzard approach will always show the data preview. This data preview request is a full request (all columns, no filter) - just a Top 1000 is added. There are situations, where this request times out or where the result set is too large.

In this situation, you could add the data source directly in the Advanced Query Editor of PowerBI: Find below a sample where we reduced the Top condition to 100 (good for relational sources, typically not that effective on analytical sources) and selected two specific columns (in the example the columns "HOST" and "VALUE"):

let
     Source = SapDataWarehouseCloudConnector.Contents(
         "<tenant name>",
         "relational", 
         "<Space Name>",
         "<View Name>",
         "<Parameters> or null"),

     M_HOST_INFORMATION_S_table =
        Source{[Name="M_HOST_INFORMATION_S",Signature="table"]}[Data],

     #"TOP" = Table.FirstN(M_HOST_INFORMATION_S_table,100),

     #"COLUMNS" = Table.SelectColumns(#"TOP",{"HOST", "VALUE"})
in
     #"COLUMNS"

This snipped has been created using the following steps:

  • Use the datasource via wizzard (dialog) and insert a simple view
  • Use the standard options of PowerBI to apply a TopN conditions and to select some columns
  • Open the advanced editor - the script that represents your view and conditions is display
  • Take this script as a template and use it to insert datasphere views.

Note that PowerBI offers additional relevant options like setting filters on columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant