Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Add BigQuery starter for project #1859

Merged
merged 8 commits into from
Sep 12, 2019
Merged

Add BigQuery starter for project #1859

merged 8 commits into from
Sep 12, 2019

Conversation

dzou
Copy link
Contributor

@dzou dzou commented Sep 5, 2019

Add the BigQuery starter for the project.

@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #1859 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1859   +/-   ##
=========================================
  Coverage     72.48%   72.48%           
  Complexity     1837     1837           
=========================================
  Files           229      229           
  Lines          6774     6774           
  Branches        701      701           
=========================================
  Hits           4910     4910           
  Misses         1542     1542           
  Partials        322      322
Flag Coverage Δ Complexity Δ
#integration ? ?
#unittests 72.48% <ø> (ø) 1837 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0513b87...6c5b465. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #1859 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1859   +/-   ##
=========================================
  Coverage     70.95%   70.95%           
  Complexity     1800     1800           
=========================================
  Files           236      236           
  Lines          6776     6776           
  Branches        695      695           
=========================================
  Hits           4808     4808           
  Misses         1649     1649           
  Partials        319      319
Flag Coverage Δ Complexity Δ
#unittests 70.95% <ø> (ø) 1800 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e859cf3...9ca6d53. Read the comment docs.

meltsufin
meltsufin previously approved these changes Sep 5, 2019
Copy link
Contributor

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

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

Do we need to update the refdoc as well?

elefeint
elefeint previously approved these changes Sep 6, 2019
Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

Do you want to update docs/src/main/asciidoc/sagan-index.adoc to include BigQuery, too, while you are at it?

@dzou dzou dismissed stale reviews from elefeint and meltsufin via 3792bfe September 6, 2019 20:29
@dzou
Copy link
Contributor Author

dzou commented Sep 6, 2019

Added refdoc, PTAL.


Spring Cloud GCP provides https://spring.io/projects/spring-integration[Spring Integration] message handlers which can be used to build pipelines that load data into BigQuery tables.

Spring Cloud GCP the following message handlers:
Copy link
Contributor

Choose a reason for hiding this comment

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

Skipped words? Singular vs plural?


Spring Cloud GCP the following message handlers:

* `BigQueryFileMessageHandler` - Handle messages containing data files and loads these into BigQuery tables.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `BigQueryFileMessageHandler` - Handle messages containing data files and loads these into BigQuery tables.
* `BigQueryFileMessageHandler` - Handles messages containing data files and loads contents into BigQuery tables.

@@ -0,0 +1,91 @@
== Google Cloud BigQuery

https://cloud.google.com/bigquery[Google Cloud BigQuery] is a fully managed, petabyte scale, low cost analytics data warehouse.
Copy link
Contributor

Choose a reason for hiding this comment

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

What about also documenting the starter and that it can be used to easily get an auto-wirable BigQuery object?
Also, maybe document the spring.cloud.gcp.bigquery.* properties like we do for other starters.

==== Input Channel

The `BigQueryFileMessageHandler` accepts messages whose payloads contain the data file being loaded.
The accepted payload types include `byte[]`, `java.io.File`, or `java.io.InputStream`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is payload of type byte[] the actual contents of the file or the file reference?


|===========================================================================
| Message Header Name | Description
| `DATASET_NAME` | Name of the BigQuery dataset that the file should be loaded to.
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if we can also set the defaults for these through spring.cloud.gcp.bigquery.* properties so that it just becomes configuration, rather than code.

@dzou dzou requested a review from meltsufin September 10, 2019 21:13
@dzou
Copy link
Contributor Author

dzou commented Sep 11, 2019

@meltsufin - Changes made ! PTAL.

@dzou dzou merged commit 4751874 into master Sep 12, 2019
@dzou dzou deleted the bigquery-starter branch September 12, 2019 14:36
@vijaykrajpoot
Copy link

I see that this starter project is not available in maven central version - 1.1.3.RELEASE.

Any idea when is gonna be available?

@meltsufin
Copy link
Contributor

It will be part of the 1.2.0 Release. 1.2.0.M3 is scheduled for September 23rd.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants