NRGI / resource-projects-etl

ETL processes for rp.org
GNU General Public License v2.0
3 stars 2 forks source link

Remove a project IDs, company IDs #71

Open davidmihalyi opened 8 years ago

davidmihalyi commented 8 years ago

I have a question on removing project IDs, or company IDs I can edit data at source to rectify previously wrong data, and redeploy. But what if I want to delete a project or company? I can remove the entry but what happens to its unique ID code? I assume removing the entry that created it won`t remove the code?

For example I got rid of "13 concesiones sin identificar" in Mexico, coz was not a project name. What is with its unique ID MX/13co-axm1um ? How can that be deleted?

timgdavies commented 8 years ago

If you remove a project from all source files and the reload the data from the source files it existed in, then it and it's identifier will be removed.

If it is found in a source file again, then a new identifier will be auto-generated.

Identifiers are generated in two ways:

(1) Being found in a source file;

(2) Auto-generated as the data is converted;

The auto-generated identifiers are added to the file that gets loaded to staging or live, but if that gets removed, then the identifier disappears. There is no other caching of auto-generated IDs at present.