You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 23:40:00 UTC

[GitHub] [beam] kennknowles opened a new issue, #19295: Can not insert into BigQuery table that is not empty

kennknowles opened a new issue, #19295:
URL: https://github.com/apache/beam/issues/19295

   There is a Exception when I try to insert into BigQuery table that is not empty.
   
   Example code Beam SQL:
   ```
   
   BeamSqlRelUtils.toPCollection(pipeline, sqlEnv.parseQuery("INSERT INTO D_CARD_LITE(DIM_ID) VALUES('xxxx')"))
   ```
   
   The exception messages as below:
   ```
   
   java.lang.IllegalStateException: BigQuery table is not empty: mydataset:samples.D_CARD_LITE.
    at com.google.common.base.Preconditions.checkState(Preconditions.java:518)
   
   at org.apache.beam.sdk.io.gcp.bigquery.BigQueryHelpers.verifyTableNotExistOrEmpty(BigQueryHelpers.java:470)
   
   at org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO$Write.validate(BigQueryIO.java:1564)
    at org.apache.beam.sdk.Pipeline$ValidateVisitor.enterCompositeTransform(Pipeline.java:641)
   
   at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:645)
    at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
   
   at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
    at org.apache.beam.sdk.runners.TransformHierarchy$Node.access$600(TransformHierarchy.java:311)
   
   at org.apache.beam.sdk.runners.TransformHierarchy.visit(TransformHierarchy.java:245)
    at org.apache.beam.sdk.Pipeline.traverseTopologically(Pipeline.java:458)
   
   at org.apache.beam.sdk.Pipeline.validate(Pipeline.java:577)
    at org.apache.beam.sdk.Pipeline.run(Pipeline.java:312)
   
   at org.apache.beam.sdk.Pipeline.run(Pipeline.java:299)
   ```
   
   
   Imported from Jira [BEAM-6298](https://issues.apache.org/jira/browse/BEAM-6298). Original Jira may contain additional context.
   Reported by: luat.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] turb commented on issue #19295: Can not insert into BigQuery table that is not empty

Posted by "turb (via GitHub)" <gi...@apache.org>.
turb commented on issue #19295:
URL: https://github.com/apache/beam/issues/19295#issuecomment-1727820210

   Had the same problem with scio, solved using `writeDisposition = WriteDisposition.WRITE_APPEND`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org