Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider use of UUIDs to allow importing multiple independent sets of HSDS CSV files #341

Open
pmackay opened this issue May 19, 2015 · 9 comments

Comments

@pmackay
Copy link
Contributor

pmackay commented May 19, 2015

How are the ID columns used when importing CSVs? Are they just for cross referencing within the CSV content? Presumably on import Rails allocates IDs to the entries?

Has the use of a UUID field been considered for replication of content, so an item (org or location) could be uniquely identified? I notice OR has a "Resource ID" field, might that be a future feature on Ohana?

@monfresh
Copy link
Member

The import script uses the ID in the CSV file to set the ID in the Rails DB, so the ID in the CSV file acts as a unique identifier.

@pmackay
Copy link
Contributor Author

pmackay commented May 20, 2015

Would the Resource ID field in the OR spec be implemented by adding a separate UUID field to each applicable model?

And how does current import process handle entries with the same ID as one in the database? Presumably it cannot be a UUID because it has to be an integer/key column.

@monfresh
Copy link
Member

Why is a Resource ID field needed? The id field already serves the purpose of a unique identifier.

Is there a specific issue with the import process you are running into? If so, please state the bug and the steps to reproduce.

@pmackay
Copy link
Contributor Author

pmackay commented May 20, 2015 via email

@monfresh
Copy link
Member

Thanks! That's more helpful. Starting with the actual issue is always a good idea 😄 I hadn't thought about this scenario, and in this case, yes, a uuid field would make sense.

@md5
Copy link
Contributor

md5 commented May 20, 2015

Having a uuid or resource_id field on each table would make it possible to implement the metadata table in HSDS as well, although the spec seems to say that the id field should contain the UUID.

@md5
Copy link
Contributor

md5 commented May 20, 2015

I supposed it's possible to do so now since the id fields are all the same type.

@monfresh monfresh changed the title Consider use of UUIDs Consider use of UUIDs to allow importing multiple independent sets of HSDS CSV files May 20, 2015
@cderenburger
Copy link

Could this potentially allow importing (and potentially resetting/dropping) from each separate source db as independent tasks? I'm currently attempting to import our whole state db and am having issues completing an import. Breaking this into smaller tasks might help with larger data sets as well.

@monfresh
Copy link
Member

This particular issue only deals with adding a new field to the DB.

If you're having problems importing a large data set, please open a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants