The aggregation script currently drops file with aggregated data and creates a new one. This is problematic:
The created file is for some reason not recognized by Google Drive (and thus CartoDB) as a CSV. It has a different icon.
The CartoDB sync is using the file ID to synchronize. If the script deletes the file to replace it with a new one, the sync will still use the old file (in the trash)
Proposal:
The script should use a file ID of an existing file, empty it and write the new data to it. As a fail safe, it could back up the old file.
We'll be using R scripts now, not Google Scripts. This means the scripts will run locally and file ids can differ on different machines and different operating systems.
We wont sync this file with CartoDB anymore. We'll use an aggregated file for that, so this issue will apply to that file.
The aggregation script currently drops file with aggregated data and creates a new one. This is problematic:
Proposal:
The script should use a file ID of an existing file, empty it and write the new data to it. As a fail safe, it could back up the old file.