Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 30988

Query Folding

$
0
0

Why would Power Query stop Query Folding upon the simple act of filtering a column?

 

let
     Source = Odbc.DataSource("dsn=ABCD", [HierarchicalNavigation=true]),
     ABC_Schema = Source{[Name="ABC",Kind="Schema"]}[Data],
     ABC1234_View = ABC_Schema{[Name="ABC1234",Kind="View"]}[Data],
     #"Removed Other Columns" = Table.SelectColumns(ABC1234_View,{"TX_DATE_POST", "ORDER_ID", "CORP_ID", "ORDER_SITE", "PRODUCT_ID", "ORDER_TYPE", "TX_ID", "TX_AMOUNT", "TX_QTY"}),
     #"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each [CORP_ID] = "54"),

 

I'm querying an IBM DB2 (z/OS) database via ODBC (could never get the built-in connector to work).  The table (or view) I'm querying is an extremely large transactions table (nearly 900 million rows), I just want to pull a subset but cannot because the filtering takes forever. I know folding is not working because when I right click on the filtering step the "View Native Query" option is dithered out. The steps prior, however, are folding because on those steps the "View Native Query" option is selectable.


Viewing all articles
Browse latest Browse all 30988

Trending Articles