Hi,
I havent done it on a fusion table, but since FME supports all database writer modes for itI imagine it is possible.
To be able to do updates/inserts and deletes with a single writer, you have to define the fme_where and fme_db_operation per feature and set the writer feature type and writer's wirter mode setting to none.
The are plenty of examples to find about the subject in FMEpedia.
Hope this helps,
Itay
Hi Itay,
Thanks for the answer. I saw the example implementation of Oracle and SQL writers using the FME_Where and FME_DB_Operation variables to do that, but they seem to be setup to do one action at a time, ie. one record at a time, then the translation runs again for the next. Not sure if this is the case, but it did seem that way.
Also with Fusion tables I am not sure if it will work the same way. I have one translation setup to do Updating and Inserts at the same time using two different feature types, one set to update and one to insert and the table name as an attribute and every now and then this translation spits an error out, but after running it a second time its fine.
I will try using the DB_Operation variable and one feature type and see what the results are like and if it still has that error that comes up every now and then.
Hi,
I agree with the fme_db_operation approach. It will enable what you want with only one single output feature type, just remember to define the primary key in the output "update key columns".
Another thing is to make sure that the features hit writer in the correct order, e.g. so that an UPDATE does not preceed an INSERT. You can use the Sorter transformer on the fme_db_operation value just before the writer to prevent this (sort descending).
David
Hi,
I have tried doing everything mentioned here and the scripts work for a certain amount of the records, but then at some point, always when processing large amounts of records (400+) the script errors out and then when I try to switch back to smaller amounts of records (30-50) it still errors doing the exact same thing it was doing fine before I tried the larger amount.
I have to replace the writers and recreate the fusion table in order to get everything to work again with smaller chunks of data. This is very frustrating and I am thinking I have a few issues that are continually cycling around so its very hard to determine where a fix is for anything.
In addition the error messaging for Fusion writers is basically 'there is an error' and it closes... no record number, record summery or anything, just telling me an error happened see log file above (where there is nothing) and it shuts down.
I am having to hold the system back from using Fusion tables for the transactional record keeping due to this issue, which is unfortunate. I am using a Beta version of 2014, not sure if the final version of 2014 had any enhancements to google fusion writer.