Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
6 years ago

Incremental refresh with left join

Hello everyone!

I am trying to add some ERP Data through sql into my data set.

I have one Order Master, that cointains all dates, value etc per order nr:

OrderCreatedStartedFinishedQuantityValue
101.01.201901.01.201901.02.2019505
201.01.201901.01.201901.03.201945

 

And I have a Item Ledger, that contains all booking types per order nr:

OrderBookingValueDate
1Export502.02.2019
1Entry501.02.2019

 

Now I would like to include the Item ledger with an incremental refresh into my dataset.

But I would like to add just data from Item Ledger for orders that are also in the Order master listed.

This would be a simple left join in sql, right?

Is this also possible when adding an incremental refresh in the end?

 

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    joshua1990 - Well, you can do a left join in Power Query Editor using a Merge query. Not sure I 100% understand the dilemma with incremental refresh and such.

    • joshua1990's avatar
      joshua1990
      Post Prodigy

      I mean, from a performance point of view I would do the join within a individual sql statement, right?

      But that would also mean I can't add an incremental refresh in the end, right?

      I guess I have to do all operations in Power Query.

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        joshua1990 - If you want to only load the main table once and do incremental on the ledger, then yes I would think you would need to do that in Power Query and then the Merge there. Alternatively, if you did the join in SQL as a view perhaps, could you do an incremental against that view? I'm not sure I see why not exactly but I may not be thinking it through 100%