This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
omop_cdm_bigquery_to_postgress_extraction [2020/06/26 12:35] podalv |
omop_cdm_bigquery_to_postgress_extraction [2020/10/11 12:55] podalv |
||
---|---|---|---|
Line 8: | Line 8: | ||
module load google | module load google | ||
gcloud auth application-default login | gcloud auth application-default login | ||
+ | |||
</ | </ | ||
Line 55: | Line 56: | ||
create or replace table `som-nero-phi-nigam-starr.starr_omop_cdm5_deid_20200328.visit_occurrence` as select * from `som-rit-phi-starr-prod.starr_omop_cdm5_deid_latest.visit_occurrence`; | create or replace table `som-nero-phi-nigam-starr.starr_omop_cdm5_deid_20200328.visit_occurrence` as select * from `som-rit-phi-starr-prod.starr_omop_cdm5_deid_latest.visit_occurrence`; | ||
create or replace table `som-nero-phi-nigam-starr.starr_omop_cdm5_deid_20200328.vocabulary` as select * from `som-rit-phi-starr-prod.starr_omop_cdm5_deid_latest.vocabulary`; | create or replace table `som-nero-phi-nigam-starr.starr_omop_cdm5_deid_20200328.vocabulary` as select * from `som-rit-phi-starr-prod.starr_omop_cdm5_deid_latest.vocabulary`; | ||
+ | |||
</ | </ | ||
Line 97: | Line 99: | ||
bq extract --compression GZIP ' | bq extract --compression GZIP ' | ||
bq extract --compression GZIP ' | bq extract --compression GZIP ' | ||
+ | |||
</ | </ | ||
Line 103: | Line 106: | ||
< | < | ||
gsutil -m cp gs:// | gsutil -m cp gs:// | ||
+ | |||
</ | </ | ||
Line 111: | Line 115: | ||
< | < | ||
sftp podalv@nero.compute.stanford.edu | sftp podalv@nero.compute.stanford.edu | ||
+ | |||
</ | </ | ||
Line 116: | Line 121: | ||
< | < | ||
- | get / | + | get / |
</ | </ | ||
Line 123: | Line 129: | ||
< | < | ||
quit | quit | ||
+ | |||
</ | </ | ||
Line 128: | Line 135: | ||
< | < | ||
- | scp / | + | scp / |
</ | </ | ||
Line 136: | Line 144: | ||
< | < | ||
rename ' | rename ' | ||
+ | |||
</ | </ | ||
Line 146: | Line 155: | ||
psql -h ohdsi.shahlab.stanford.edu -p 5432 -d starr_omop_cdm_20200404 -U achilles | psql -h ohdsi.shahlab.stanford.edu -p 5432 -d starr_omop_cdm_20200404 -U achilles | ||
psql -h ohdsi.shahlab.stanford.edu -e -f / | psql -h ohdsi.shahlab.stanford.edu -e -f / | ||
+ | |||
</ | </ | ||
Line 186: | Line 196: | ||
create table visit_occurrence(visit_occurrence_id bigint not null, | create table visit_occurrence(visit_occurrence_id bigint not null, | ||
create table vocabulary(vocabulary_id varchar not null, | create table vocabulary(vocabulary_id varchar not null, | ||
+ | |||
</ | </ | ||
Line 1331: | Line 1342: | ||
COPY visit_occurrence FROM '/ | COPY visit_occurrence FROM '/ | ||
COPY vocabulary FROM '/ | COPY vocabulary FROM '/ | ||
+ | |||
</ | </ | ||
Line 1511: | Line 1523: | ||
create index note_nlp_note_nlp_concept_id on note_nlp (note_nlp_concept_id); | create index note_nlp_note_nlp_concept_id on note_nlp (note_nlp_concept_id); | ||
ANALYZE verbose; | ANALYZE verbose; | ||
+ | |||
</ | </ | ||
Line 1517: | Line 1530: | ||
< | < | ||
psql -h ohdsi.shahlab.stanford.edu -e -f sql.txt -p 5432 -d cdm_stride8_20191011 -U achilles | psql -h ohdsi.shahlab.stanford.edu -e -f sql.txt -p 5432 -d cdm_stride8_20191011 -U achilles | ||
+ | |||
</ | </ | ||