-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Bug]: ClassCastException when using custom DynamicDestination in BigQueryIO.Write #22543
Comments
I am not able to replicate this exception with the code you provided. I suspect the issue is that your dynamicDestinations expects a String argument to the getTable method, but a TableDestination is being passed instead, causing the casting exception |
Can you update your replication code to make this reproducible? |
Are you getting any error or just green test? I am able to replicate the issue using the code I posted:
|
Updated code with missing imports just in case. |
I'm running into a separate issue com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request which would appear to be after any destination resolution |
That sounds like your |
In order to fix your issue you might need to provide a valid GS bucket (where you should have permissions for writing) when setting So either you replace
with something like:
Or you run the test specifying |
Beam ITs follow the same approach
|
I'm replicating your issue now and the issue is what I'm seeing is what I thought. The destination that is being passed in is already a TableDestination, which causing the class cast exception |
@ahmedabu98 this is the BQ issue. |
That's because As @johnjcasey mentioned, our custom These two will fail for sure. |
Looks like the user-specified The |
.take-issue |
With the changes in #22624 I was able to write successfully with the following pipeline:
|
…) fixing #22543 * keeping hold of user specified dynamic destination type to be able to use it in UpdateSchemaDestinations * fix for testWriteTables * cleanup and support default project when not included in table ref * allow side inputs called from getTable() * style fixes
What happened?
Beam: 2.40
While using custom
DynamicDestination
inBigQueryIO.Write
got the following exception:Find below test case to reproduce:
Issue Priority
Priority: 1
Issue Component
Component: io-java-gcp
The text was updated successfully, but these errors were encountered: