National-COVID-Cohort-Collaborative / Phenotype_Data_Acquisition

The repository for code and documentation produced by the N3C Phenotype and Data Acquisition workstream
60 stars 35 forks source link

datepart() not valid in bigquery #186

Closed mgkahn closed 3 years ago

mgkahn commented 3 years ago

Not sure if fixable via SQLRender. Datepart function used in ExtractScripts (lines 155,156) is not a valid GBQ function.

image image

GBQ uses EXTRACT function: EXTRACT(part FROM date_expression)

How can I help?

empfff commented 3 years ago

Is there any chance you would be able to correct it and submit as a pull request? Our challenge is that we don't have an environment we can use to test changes to the GBQ script. Let us know if that would work.

Sorry for the bugs!

mgkahn commented 3 years ago

Pull request with fix submitted.

mgkahn commented 3 years ago

Pull request submitted. M

From: empfff notifications@github.com Reply-To: National-COVID-Cohort-Collaborative/Phenotype_Data_Acquisition reply@reply.github.com Date: Friday, February 12, 2021 at 1:47 PM To: National-COVID-Cohort-Collaborative/Phenotype_Data_Acquisition Phenotype_Data_Acquisition@noreply.github.com Cc: "Kahn, Michael" MICHAEL.KAHN@CUANSCHUTZ.EDU, Author author@noreply.github.com Subject: Re: [National-COVID-Cohort-Collaborative/Phenotype_Data_Acquisition] datepart() not valid in bigquery (#186)

Is there any chance you would be able to correct it and submit as a pull request? Our challenge is that we don't have an environment we can use to test changes to the GBQ script. Let us know if that would work.

Sorry for the bugs!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/National-COVID-Cohort-Collaborative/Phenotype_Data_Acquisition/issues/186#issuecomment-778446138, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA557TQALIJYC7TE5TZM4RLS6WHWXANCNFSM4XPZA52A.

kmkostka commented 3 years ago

Resolved in #188