Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CopyConfiguration does not work. #353

Open
yeilho opened this issue Sep 2, 2024 · 1 comment
Open

CopyConfiguration does not work. #353

yeilho opened this issue Sep 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yeilho
Copy link

yeilho commented Sep 2, 2024

What happened?

Job creation fails for copy tables. Here is the code that I wrote to do some testings and it fails with configuration information.

    try {
      CopyJobConfiguration configuration =
          CopyJobConfiguration.newBuilder(targetTableId, sourceTableId)
              .setCreateDisposition(JobInfo.CreateDisposition.CREATE_IF_NEEDED)
              .build();

      Job job = bigquery.create(JobInfo.of(configuration));

Here is the error message:

com.google.cloud.bigquery.BigQueryException: unspecified job configuration query
	at com.google.cloud.bigquery.spi.v2.HttpBigQueryRpc.translate(HttpBigQueryRpc.java:114)
	at com.google.cloud.bigquery.spi.v2.HttpBigQueryRpc.create(HttpBigQueryRpc.java:219)

Although CopyJobConfiguraiton does not require query, it seems it's checking for query and fails. I looked up code and I don't find any code that handles copy job config so I am assuming it's not implemented.

What did you expect to happen?

I expected that the copy creation job succeeds.

How can we reproduce it (as minimally and precisely as possible)?

Create copy job such as following:

    try {
      CopyJobConfiguration configuration =
          CopyJobConfiguration.newBuilder(targetTableId, sourceTableId)
              .setCreateDisposition(JobInfo.CreateDisposition.CREATE_IF_NEEDED)
              .build();

      Job job = bigquery.create(JobInfo.of(configuration));

Anything else we need to know?

No response

@yeilho yeilho added the bug Something isn't working label Sep 2, 2024
@yeilho
Copy link
Author

yeilho commented Sep 3, 2024

https://github.com/goccy/bigquery-emulator/blob/main/server/handler.go#L1377 is where it handles configuration and it does not seem to consider copy job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant