fix: bigquery schema and date inputs (#2688)
This commit is contained in:
@@ -220,7 +220,7 @@ fn convert_val(arg_t: String, arg_v: Value) -> Value {
|
||||
|
||||
match arg_t.as_str() {
|
||||
"timestamp" | "datetime" => {
|
||||
v = v + ":00";
|
||||
v = v.trim_end_matches("Z").to_string();
|
||||
}
|
||||
"date" => {
|
||||
let arr = v.split("T").collect::<Vec<&str>>();
|
||||
@@ -235,7 +235,7 @@ fn convert_val(arg_t: String, arg_v: Value) -> Value {
|
||||
let arr = v.split("T").collect::<Vec<&str>>();
|
||||
match arr.as_slice() {
|
||||
[_, time] => {
|
||||
v = time.to_string() + ":00";
|
||||
v = time.trim_end_matches("Z").to_string();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
argName: 'api'
|
||||
},
|
||||
bigquery: {
|
||||
code: `import { BigQuery } from '@google-cloud/bigquery@7.2.0';
|
||||
code: `import { BigQuery } from 'npm:@google-cloud/bigquery@7.2.0';
|
||||
export async function main(args: bigquery) {
|
||||
const bq = new BigQuery({
|
||||
credentials: args
|
||||
@@ -139,7 +139,7 @@ GROUP BY table_name".replace('{dataset.id}', dataset.id)
|
||||
}
|
||||
return schema
|
||||
}`, // nested template literals
|
||||
lang: 'bun',
|
||||
lang: 'deno',
|
||||
argName: 'args'
|
||||
},
|
||||
snowflake: {
|
||||
|
||||
Reference in New Issue
Block a user