Reputation: 2077
I wish to create a table using edit text. The reason that I don't use auto detect is that my date format is not in the US format and Bigquery doesn't understand it (I'm not sure if it is a bug or I'm missing something). When I use Auto detect, Bigquery reads the date as mm/dd/yyyy while my date format is dd/mm/yyy.
I've tried the below but I'm getting an error
State:string,
New_Existing:string,
PARSE_DATE('%d/%m/%Y', Prd_Dt):DATE
Upvotes: 2
Views: 5040
Reputation: 1201
You can use JSON to write your schema using edit text, refer to this GCP Documentation. Using your scenario below this is how we applied it to JSON:
However, you can only use the PARSE_DATE function in Bigquery when doing DML statements such as SELECT
as per this GCP Documentation.
Upvotes: 5