java-docs-samples
java-docs-samples copied to clipboard
docs(samples): Add Dataflow snippet for reading from Cloud Storage
Description
Adds a snippet that shows how to reading from a Cloud Storage file into Dataflow.
Snippet bug: b/340947448 Related doc bug: b/337851367
I structured this snippet similarly to the KafkaRead sample, where the snippet includes the code to create the pipeline, but not omits the pipeline options class and running the pipeline.
Also fixed some integration tests that were failing due to setting System.out to null.
Checklist
- [ ] I have followed Sample Format Guide
- [ ]
pom.xmlparent set to latestshared-configuration - [ ] Appropriate changes to README are included in PR
- [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
- [ ] Tests pass:
mvn clean verifyrequired - [ ] Lint passes:
mvn -P lint checkstyle:checkrequired - [ ] Static Analysis:
mvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only - [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
- [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
- [x] Please merge this PR for me once it is approved
Here is the summary of changes.
You are about to add 2 region tags.
- dataflow/snippets/src/main/java/com/example/dataflow/ReadFromStorage.java:19, tag
dataflow_read_from_cloud_storage - dataflow/snippets/src/main/java/com/example/dataflow/ReadFromStorage.java:44, tag
dataflow_read_from_cloud_storage
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:
- [ ] Refresh this comment