Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Question about the behavior of internal sub query processing in Power Query

Hi community

 

I would have  a question about the behavior of internal sub query processing in Power Query.

 

Let's assume we have a query (A) that reads an external datat source, like :

let
         Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(..........),
         #"Changed Type" = Table.TransformColumnTypes(Source,{{"Input", type text}})
in
         #"Changed Type

 

And two queries (B) & (C) that take (A) as input, like:

let
        Source = (A),
#"Added Index" = Table.AddIndexColumn(Source, "Index", 0, 1)
        in
#"Added Index"

 

I need to ensure that (B) and (C) have exactly the same snapshot of the data as input. And as the data read by (A) might change at anytime, it will make a difference if the internal processing is like a one-time run of (A) with (B) & (C) just taking the result of this one-time run OR if (B) & (C) each trigger their own run of (A) in the background.

 

Is the processing in the way that (B) and (C) will have exactly the same data status? If not, how can I achieve this?

 

Thanks
 

 

 

  • Unfortunately there isn't a built-in way to do this in PQ Desktop today. There are some workarounds, but they're not ideal.

     

    One way to do this in the cloud world would be to use a dataflow. Load (A) as a computed entity, and then all the queries that reference it will get the same copy of (A). Is this an option for you?

3 Replies

  • Ehren's avatar
    Ehren
    Microsoft Employee

    Unfortunately there isn't a built-in way to do this in PQ Desktop today. There are some workarounds, but they're not ideal.

     

    One way to do this in the cloud world would be to use a dataflow. Load (A) as a computed entity, and then all the queries that reference it will get the same copy of (A). Is this an option for you?

  • Hi Anonymous ,

     

    I'm tagging Ehren as he's the wizard you need for this, I think.

    Ehren , sorry to disturb, but can you take a look at this one and advise please?

     

    Pete

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks - took a dataflow now and rearranged my process a bit