Use Java object as a temp table within a BGQ query

39 Views Asked by At

I need to use below query to insert/update a row in a gbq table

MERGE INTO `target_table` AS target
USING `source_table` AS source
ON target.id = source.id
WHEN MATCHED THEN
  UPDATE SET
    target.name = source.name,
    target.age = source.age
WHEN NOT MATCHED THEN
  INSERT (name, age)
  VALUES (source.name, source.age);

Now the problem is I have target_table in GBQ but for source_table I have Java object as input parameter. I am having trouble to use Java object as source_table.

Is there even a way I can do this? I am bit lost.

0

There are 0 best solutions below