You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/05/10 01:17:49 UTC
[GitHub] [beam] lnogueir opened a new pull request, #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
lnogueir opened a new pull request, #17598:
URL: https://github.com/apache/beam/pull/17598
Currently, the `FhirIO.Export` transform only supports exports of Fhir resources to Google Cloud Storage. This PR expands its functionality to also be able to export to Google BigQuery by introducing a new method, namely `exportFhirResourceToBigQuery`, to `HealthcareApiClient` and modifying the existing `DoFn` `@ProcessElement` method to call the appropriate export method based on the input URI.
Unit tests will be added soon.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
- [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1121765564
R: @msbukal
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1121765330
Run Java PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on a diff in pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on code in PR #17598:
URL: https://github.com/apache/beam/pull/17598#discussion_r873919889
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOLROIT.java:
##########
@@ -38,6 +38,7 @@ public class FhirIOLROIT {
private transient HealthcareApiClient client;
private final String project;
+ private static final String BQ_DATASET_ID = "big_query_storage";
Review Comment:
I saw that BigQueryIO uses this dataset id for some of their tests, so figured we could use it here. However, I get permission denied when trying to export there. Should we request access to this dataset or should we create our own? @msbukal @pabloem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] pabloem commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
pabloem commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1142704288
LGTM!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] pabloem merged pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
pabloem merged PR #17598:
URL: https://github.com/apache/beam/pull/17598
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] kennknowles commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
kennknowles commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1125272192
@lnogueir do you have a Jira account so I can assign it to you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] pabloem commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
pabloem commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1142462452
I'll take a look this week
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] msbukal commented on a diff in pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
msbukal commented on code in PR #17598:
URL: https://github.com/apache/beam/pull/17598#discussion_r876136158
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOTest.java:
##########
@@ -146,4 +151,17 @@ public void test_FhirIO_failedPatientEverything() {
PAssert.that(everythingResult.getPatientCompartments()).empty();
pipeline.run();
}
+
+ @Test
+ public void test_FhirIO_Export_invalidUri() {
+ final String invalidUri = "someInvalidUri";
+ pipeline
+ .apply(Create.of(Arrays.asList("resource1", "resource2")))
Review Comment:
What's the point of this line? Also just call FhirIO.exportResources(...) same as the other tests
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java:
##########
@@ -194,11 +193,11 @@
* FhirIO.Write.Result writeResult =
* output.apply("Import FHIR Resources", FhirIO.executeBundles(options.getNewFhirStore()));
*
- * // Export FHIR resources to Google Cloud Storage.
+ * // Export FHIR resources to Google Cloud Storage or BigQuery.
Review Comment:
Can you also update the comment on line 135 (just add BigQuery)
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java:
##########
@@ -1518,6 +1508,7 @@ private int parseBundleStatus(String status) {
/**
* Export FHIR resources from a FHIR store to new line delimited json files on GCS or BigQuery.
+ * Output PCollection should contain the URI where the FHIR store was exported to.
Review Comment:
should contain -> contains
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] chamikaramj commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
chamikaramj commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1125279053
cc: @pabloem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1125582832
> @lnogueir do you have a Jira account so I can assign it to you?
Yes, I do have a Jira account, it's `lnogueir`. I tried emailing [dev@beam.apache.org](mailto: dev@beam.apache.org) requesting to be a contributor on Jira, but my google email currently doesn't allow me to email external domains.
If you could do that, it would be great!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on a diff in pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on code in PR #17598:
URL: https://github.com/apache/beam/pull/17598#discussion_r873919889
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOLROIT.java:
##########
@@ -38,6 +38,7 @@ public class FhirIOLROIT {
private transient HealthcareApiClient client;
private final String project;
+ private static final String BQ_DATASET_ID = "big_query_storage";
Review Comment:
I saw that `BigQueryIO` uses this dataset id for some of their tests, so figured we could use it here. However, I get permission denied when trying to export there. Should we request access to this dataset or should we create our own? @msbukal @pabloem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on a diff in pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on code in PR #17598:
URL: https://github.com/apache/beam/pull/17598#discussion_r873919889
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOLROIT.java:
##########
@@ -38,6 +38,7 @@ public class FhirIOLROIT {
private transient HealthcareApiClient client;
private final String project;
+ private static final String BQ_DATASET_ID = "big_query_storage";
Review Comment:
I saw that `BigQueryIO` uses this dataset id for some of their tests, so I figured we could use it here. However, I get permission denied when trying to export there. Should we request access to this dataset or should we create our own? @msbukal @pabloem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1121764650
Can one of the admins verify this patch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #17598:
URL: https://github.com/apache/beam/pull/17598#issuecomment-1121764649
Can one of the admins verify this patch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lnogueir commented on a diff in pull request #17598: [BEAM-14451] Support export to BigQuery in FhirIO.Export
Posted by GitBox <gi...@apache.org>.
lnogueir commented on code in PR #17598:
URL: https://github.com/apache/beam/pull/17598#discussion_r873919889
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOLROIT.java:
##########
@@ -38,6 +38,7 @@ public class FhirIOLROIT {
private transient HealthcareApiClient client;
private final String project;
+ private static final String BQ_DATASET_ID = "big_query_storage";
Review Comment:
I saw that `BigQueryIO` uses this dataset id for some of their tests, so I figured we could use it here. However, I get permission denied when trying to export there. Should we request access to this dataset or should we create our own? @msbukal @pabloem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org