-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-48] Implement BigQueryIO.Read as Source #190
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
Conversation
daf2b28 to
9d0451d
Compare
| .setDestinationTable(destinationTable) | ||
| .setFlattenResults(flattenResults) | ||
| .setPriority("BATCH") | ||
| .setWriteDisposition("WRITE_EMPTY"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you need to also set the location of the temp table, or else BigQuery will use a default. This caused trouble for for tables in EU -- GoogleCloudPlatform/DataflowJavaSDK#86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
creates the dataset with the query location
47ca135 to
f82a8ca
Compare
|
rebased |
| @Nullable | ||
| Boolean flattenResults; | ||
| @Nullable Boolean flattenResults; | ||
| @Nullable BigQueryServices testBigQueryServices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these final?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
Looks pretty good to me, though I think that more functionality could be moved into the Services. I'll be back Monday for further review. Thanks Pei! |
| */ | ||
| Table getTable(String projectId, String datasetId, String tableId) | ||
| throws InterruptedException, IOException; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc. Also, can you please clearly state what invariants and failure behavior these functions have (possibly, in the impl classes instead).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
7d9264f to
1ff3427
Compare
c508048 to
1f4d00f
Compare
|
Addressed all comments. PTAL |
1f4d00f to
6c104b5
Compare
| if (!dirMatch.isEmpty()) { | ||
| Collection<String> extractFiles = factory.match( | ||
| factory.resolve(extractDestinationDir, "*")); | ||
| new GcsUtilFactory().create(options).remove(extractFiles); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directory removal does not work on GCS -- should explicitly enumerate all the files and delete them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| /** | ||
| * Returns a randomUUID string without {@code '-'}. | ||
| */ | ||
| private static String randomUUIDString() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about "randomJobId"
And then in the comments explain why you remove the '-'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, it is also used in dataset id and temp directory.
Added comments.
|
Does not compile. |
934f610 to
6b49956
Compare
|
PTAL |
|
LGTM and merged |
|
Next steps:
|
No description provided.