viant / bigquery Goto Github PK
View Code? Open in Web Editor NEWBigQuery database/sql golang driver
License: Apache License 2.0
BigQuery database/sql golang driver
License: Apache License 2.0
The SDK errors out and outputs an error:
sql: expected 4 arguments, got 0
However, this syntax is valid in BigQuery
MERGE INTO
mock.customers_robin c
USING
(
SELECT
1001 AS id,
'Sally' AS first_name,
'Thomas' AS last_name,
'[email protected]' AS email,
FALSE AS __artie_delete
UNION ALL
SELECT
1002,
'George',
'Bailey',
'[email protected]',
FALSE
UNION ALL
SELECT
1003,
'Edward',
'Walker',
'[email protected]',
FALSE
UNION ALL
SELECT
1004,
'Anne',
'Kretchmar',
'[email protected]',
FALSE) AS cc
ON
c.id = cc.id
WHEN MATCHED AND cc.__artie_delete THEN DELETE
WHEN MATCHED
AND IFNULL(cc.__artie_delete, FALSE) = FALSE THEN
UPDATE
SET
id = cc.id,
first_name = cc.first_name,
last_name = cc.last_name,
email = cc.email
WHEN NOT MATCHED
AND IFNULL(cc.__artie_delete, FALSE) = FALSE THEN
INSERT
( id,
first_name,
last_name,
email )
VALUES
( cc.id,cc.first_name,cc.last_name,cc.email );
I'm unable to create a temporary table using SQL.
See logs:
CREATE TEMP TABLE IF NOT EXISTS _SESSION.customers_customers_custom_snapshot_foo (id int)
WARN[0011] Failed to execute merge...not going to flush memory error="failed to create temp table, error: failed to run job: artie-labs.job_Fidyw28jRgs4CRXmHFQS87VP4YNl, Use of CREATE TEMPORARY TABLE requires a script or session: [{\"message\":\"Use of CREATE TEMPORARY TABLE requires a script or session\",\"reason\":\"invalid\"}]" tableName=customers_custom_snapshot
INFO[0011] Flushing via pool... error="<nil>"
Temporary tables: https://cloud.google.com/bigquery/docs/multi-statement-queries#create_temporary_table
I'm using a service account to auth with my DB, is there a way to make use of it with this library? without using scy?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.