Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
Make success hook public
Browse files Browse the repository at this point in the history
As described in #125 , the original
idea was to be able to write
final Task<TableId> task = Task.named("task")
    .ofType(TableId.class)
    .context(BigQueryContext.create(table))
    .context(BigQueryOperator.create())
    .process((stagingTable, bq) -> bq.job(
        JobInfo.of(QueryJobConfiguration.newBuilder("SELECT foo FROM input")
            .setDestinationTable(stagingTable.tableId())
            .build()))
        .success(response -> stagingTable.publish()));

But because success is package private this use case is only allowed in
the classes in the same package, like the unit test
  • Loading branch information
narape committed Nov 12, 2019
1 parent 378cd74 commit b250270
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -52,7 +52,7 @@ BigQueryOperation<T> job(Fn<JobInfo> jobRequest) {
/**
* Specify some action to take on success. E.g. publishing a staging table.
*/
BigQueryOperation<T> success(F1<JobInfo, T> success) {
public BigQueryOperation<T> success(F1<JobInfo, T> success) {
this.success = Objects.requireNonNull(success);
return this;
}
Expand Down

0 comments on commit b250270

Please sign in to comment.