Skip to content

Conversation

@peihe
Copy link
Contributor

@peihe peihe commented Apr 15, 2016

No description provided.

@peihe peihe force-pushed the custom-bigquery-source branch 3 times, most recently from daf2b28 to 9d0451d Compare April 20, 2016 22:01
@dhalperi
Copy link
Contributor

@peihe should I assume you want R: @dhalperi for this?

.setDestinationTable(destinationTable)
.setFlattenResults(flattenResults)
.setPriority("BATCH")
.setWriteDisposition("WRITE_EMPTY");
Copy link
Contributor

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

Copy link
Contributor Author

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

@peihe peihe force-pushed the custom-bigquery-source branch 3 times, most recently from 47ca135 to f82a8ca Compare April 26, 2016 22:41
@peihe
Copy link
Contributor Author

peihe commented Apr 26, 2016

rebased

@Nullable
Boolean flattenResults;
@Nullable Boolean flattenResults;
@Nullable BigQueryServices testBigQueryServices;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these final?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@dhalperi
Copy link
Contributor

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;

Copy link
Contributor

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@peihe peihe force-pushed the custom-bigquery-source branch from 7d9264f to 1ff3427 Compare May 9, 2016 23:23
@peihe peihe force-pushed the custom-bigquery-source branch 2 times, most recently from c508048 to 1f4d00f Compare May 10, 2016 02:23
@peihe
Copy link
Contributor Author

peihe commented May 10, 2016

Addressed all comments. PTAL

@peihe peihe force-pushed the custom-bigquery-source branch from 1f4d00f to 6c104b5 Compare May 10, 2016 18:11
if (!dirMatch.isEmpty()) {
Collection<String> extractFiles = factory.match(
factory.resolve(extractDestinationDir, "*"));
new GcsUtilFactory().create(options).remove(extractFiles);
Copy link
Contributor

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.

Copy link
Contributor Author

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() {
Copy link
Contributor

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 '-'

Copy link
Contributor Author

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.

@dhalperi
Copy link
Contributor

Does not compile.

@peihe peihe force-pushed the custom-bigquery-source branch from 934f610 to 6b49956 Compare May 12, 2016 22:49
@peihe
Copy link
Contributor Author

peihe commented May 12, 2016

PTAL

@asfgit asfgit closed this in 470b3d1 May 13, 2016
@dhalperi
Copy link
Contributor

LGTM and merged

@dhalperi
Copy link
Contributor

Next steps:

  • backport to Dataflow.
  • write an end-to-end test and get it working here!

@peihe peihe deleted the custom-bigquery-source branch May 16, 2016 18:12
iemejia pushed a commit to iemejia/beam that referenced this pull request Jan 12, 2018
pl04351820 pushed a commit to pl04351820/beam that referenced this pull request Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants