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

Implement command to produce JSON output for DDL generation #18

Closed
bruth opened this issue May 14, 2015 · 5 comments
Closed

Implement command to produce JSON output for DDL generation #18

bruth opened this issue May 14, 2015 · 5 comments
Assignees

Comments

@bruth
Copy link
Contributor

bruth commented May 14, 2015

A working intermediate structure is defined here.

Depends on #17

@murphyke
Copy link
Member

Regarding this, I just posted an example of a possible JSON format to PEDSnet/pedsnetcdms#9:

Some comments about that sample:

  • I assumed the possibility of multi-column unique constraints and multi-column indexes, should those be in the offing.
  • Right now fks are duped in references.csv and definitions -- is that intentional, or a refactoring-in-progress?
  • Foreign key constraints are treated specially with their own top-level references.csv, but somehow I expect them under constraints/.

@bruth
Copy link
Contributor Author

bruth commented May 20, 2015

Right now, multi-column variants are represented using multiple lines with the name as the grouper. Of course this requires name to be provided.

ref_table and ref_field in the definition files are not the same thing as foreign keys. Obviously there is a large overlap, but I kept them because of this edge case.. a subject_id could reference records in multiple tables, but there is not foreign key constraint applied.

We can move the references.csv under constraints. I kept them separate simply because the file structure is different. That being said, the code that produces the various views relies on the file structure to determine the contents, not the directory structure.

@murphyke
Copy link
Member

Sounds good. What do you feel about the JSON sample in PEDSnet/pedsnetcdms#9 as an implicit spec? I created that based on changes that Aaron suggested to the original JSON format that he created for pedsnetcdms.

@bruth
Copy link
Contributor Author

bruth commented May 22, 2015

Sure, that looks straightforward.

@bruth
Copy link
Contributor Author

bruth commented May 31, 2015

Implemented in 71e206d

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

2 participants