CommonDataModel
CommonDataModel copied to clipboard
Getting error in BigQuery DDL script.
I have used R packages to build the OMOP CDM schema in bigquery but I am getting errors. The error was caused due to unnecessary NULL keywords. e.g birth_datetime datetime null, The error given by bigquery is Error: java.sql.SQLException: [Simba]BigQueryJDBCDriver Error executing query job. Message: Syntax error: Expected ")" or "," but got keyword NULL at [8:49]
The detailed error is given in below file: errorReportSql.txt
Also, there is one issue the one column name in the NOTE_NLP table is given in a double quote which is "offset".
At last, to build the CDM schema I have manually edited the script. I have removed the unnecessary NULL keywords and removed "" from the offset column name. Then I have run the newly edited script on bigquery SQL editor.
My question is why do R packages use such a faulty script that gives errors? Also, the big query does not support the Primary key, foreign key, and indexing on the table. So that script also gives errors.
SQL DDL script for big query which gives an error is given below: OMOPCDM_bigquery_5.4_ddl.txt