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

load.bety.sh doesn't populate trait_covariate_associations table #403

Closed
gsrohde opened this issue Apr 21, 2016 · 9 comments
Closed

load.bety.sh doesn't populate trait_covariate_associations table #403

gsrohde opened this issue Apr 21, 2016 · 9 comments
Assignees
Labels

Comments

@gsrohde
Copy link
Contributor

gsrohde commented Apr 21, 2016

It creates it but it's empty. From a developer's standpoint, it's inconvenient to have to populate this table manually. And for users doing synchonization, I don't see any reason why this table should be treated any differently from the others.

@gsrohde
Copy link
Contributor Author

gsrohde commented Jun 17, 2016

@robkooper Can you prioritize this? It's a nuisance to always have to copy this table manually.

robkooper added a commit that referenced this issue Jun 17, 2016
@robkooper
Copy link
Member

robkooper commented Jun 17, 2016

Need to have #422 merged first, most of the code is there already in dump.bety.sh but commented out.

gsrohde added a commit that referenced this issue Jun 17, 2016
@gsrohde
Copy link
Contributor Author

gsrohde commented Jun 17, 2016

Done. But I haven't deployed the code yet.

@dlebauer
Copy link
Member

@gsrohde has this been deployed? #422 has been merged

@gsrohde
Copy link
Contributor Author

gsrohde commented Mar 10, 2017

@dlebauer Pull request #422 only adds the ids to the table—it's only a preliminary step toward fixing the problem. I think now @robkooper has to uncomment the commented out code he mentioned in his previous comment in order for things to work.

@serbinsh
Copy link
Member

@dlebauer @robkooper is there a work around until this is automated? I am running into this issue and may be why I can not use the Bulk Uploader on our instance of BETYdb (modex.bnl.gov/bety)

@dlebauer
Copy link
Member

@serbinsh workaround to populate the trait_covariate_associations table is to run this:

https://gist.github.com/dlebauer/0000fde0c926e2185380056d0743ee53#file-trait_covariate_associations-sql

@serbinsh
Copy link
Member

OK, so updating the table using commands like:

INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('39', '343', 'f', '1');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('492', '343', 'f', '2');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('568', '343', 'f', '3');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('15', '80', 'f', '4');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('4', '80', 'f', '5');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('546', '80', 'f', '6');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('404', '80', 'f', '7');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('38', '80', 'f', '8');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('5', '80', 'f', '9');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('7', '80', 'f', '10');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('546', '81', 't', '11');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('404', '81', 't', '12');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('38', '81', 't', '13');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('4', '81', 't', '14');
INSERT INTO trait_covariate_associations ("trait_variable_id", "covariate_variable_id", "required", "id") VALUES ('5', '81', 't', '15');

....

And then trying bulk upload again worked for me so it seems the solution is to populate that table?

robkooper added a commit to PecanProject/pecan that referenced this issue Mar 16, 2017
dlebauer added a commit to PecanProject/pecan that referenced this issue Mar 17, 2017
@serbinsh
Copy link
Member

Actually this is how I ran the command, leaving here for posterity
psql -U bety -d bety -a -f trait_covariate_associations.sql

@ghost ghost removed the help wanted label Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants