Skip to main content

How do you load batch data into the ‘sdb’ database through ADM/DSP without deleting the existing data from the table?

Answered

Comments

7 comments

  • Best answer
    DSP Expert

    PCardoso: My approach to enable this through a robust Collect process is to create a replica of the table in question with a different name (e.g. TABLE_Delta) and build the Collect Process using this table instead, where [TABLE] is the actual table name you are looking to build a unified view of. Then, register a stored procedure as a rule for the TABLE_Delta entry. This stored procedure updates the table in question with the new information, performing whatever deletes might be required (or using a left join if applicable). To Alyssa's point, creating control columns could be useful in some use cases.

    0
  • DSP Expert

    ASliney: The truncate step is built into Collect (but not Assemble) and is not skippable. On the vertical view of the Assemble package, on the Advanced Properties tab, turn off Target Delete Records. Then you can run the Assemble package without emptying the table. I still recommend a backup/indicator of some kind on the already extracted records in case there is an error.

    0
  • DSP User

    Thanks Alyssa, I have already tried it. I have unchecked the 'Target Delete Records' before loading the first batch. The package deleted all existing data and loaded fresh data.

    0
  • DSP Expert

    ASliney: What version of DSP are you on? You're running the package directly from Assemble, correct? Did you try putting in a dummy Where clause for the delete e.g., MATNR = '0'? I tested this on a 6.6.4 box and it works as expected.

    0
  • DSP User

    Thank you for your guidance, Pedro. I did a similar kind of procedure on the database level. I replicated the table to another table name (Table_Delta) and every time the batch download finished, I inserted data from the main table to the delta table. Once all batches are completed, I will just rename the delta table to the main table.

    Do we have any functionality on ADM level with minimal manual work?

    0
  • DSP Expert

    VGazquez: Hi Syed, In addition to the previous answers, please check this post in Data Insiders, which details how to merge tables in Collect: https://support.syniti.com/hc/en-us/community/posts/360007976134--Collect-How-to-merge-tables

    This post might help you insert multiple batches into a single table. It also shows you how to use the Assemble Where clause (in case you need it). You can also uncheck the advance property in the Assemble package "Target Delete Records."

    0

Please sign in to leave a comment.