Write Database
Hi,
Can someone kindly advise on the "Overwrite mode" in write database?
I am trying to read data from original database, and apply processes onto it, then the output will to write to another database (db1).
Initial record in original db = 1600 records
Initial write to db1 = 1600 records
When the subsequent write trigger, how will the record in db1 updated based on the overwrite mode?
none => It will add again all the records in the original db to db1, so there will be duplicate of records?
overwrite first, append then =>
overwrite =>
append =>
Overwite, how does it checks which record in db1 to overwrite?
append, how does it checks which record should be appended into db1?
Is any of the 4 modes that actually delete all the data in db1 and add again all the data from original data?
Best Answer
-
Thomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn
Hi,
"Overwrite" just overwrites everything. "Append" just adds rows without overwriting. "Overwrite then Append" will overwrite first and then start appending. For example, if you had 100 rows written, the new data will overwrite the first 100 rows and then start appending.
0
Answers
Thanks for the clarification.
Just wondering, is there any difference between "Overwrite" and "Overwrite then Append"?
I tried 2 scenarios and it seems display the same number of records.
Existing: 400 records in db1
Scenario 1: Add 1 more record, db1 will show 401 records using both modes
Scenario 2: Minus 1 record, db1 will show 399 records using both modes
If you're in an environment where the database administrator doesn't let you do that (as the tables are already there and not changeable by data scientist), you can't use the overwrite modes. Depending on your task, you would use Append or the Update Database operator in this case.
"None" just blindly tries to create the table and write into it.