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

Incorrect Data Types for Google BigQuery creation #168

Closed
kevinjyee opened this issue Mar 19, 2018 · 1 comment
Closed

Incorrect Data Types for Google BigQuery creation #168

kevinjyee opened this issue Mar 19, 2018 · 1 comment

Comments

@kevinjyee
Copy link
Contributor

kevinjyee commented Mar 19, 2018

In the scripts for big query,

create table concept (
  concept_id			    integer			  not null ,
  concept_name	            varchar(255)  not null ,
  domain_id		            varchar(20)		  not null ,
  vocabulary_id	            varchar(20)		  not null ,
  concept_class_id		   varchar(20)		  not null ,
  standard_concept		   varchar(1)		  null ,
  concept_code		   varchar(50)		  not null ,
  valid_start_date		   date			  not null ,
  valid_end_date		   date			  not null ,
  invalid_reason		   varchar(1)		  null
)
;

the data type varchar is used.
However, Google Bigquery does not support the datatype "varchar" for neither their Legacy nor Standard SQL

https://cloud.google.com/bigquery/data-types
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types

Was this script meant for Google Cloud Sql instead of BigQuery?

@clairblacketer
Copy link
Contributor

@kevinjyee I created the big query ddl using SqlRender which takes a sql server script and converts it to a different dialect. I suspect this problem is an artifact of how it was translated. I see you created a PR to address this. I will pull it in and open an issue with SqlRender (#119).

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