You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "jp0317 (via GitHub)" <gi...@apache.org> on 2023/09/08 00:09:55 UTC
[GitHub] [hudi] jp0317 opened a new pull request, #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
jp0317 opened a new pull request, #9650:
URL: https://github.com/apache/hudi/pull/9650
### Change Logs
The project id is missing in the query statement when using bigquery manifest file. Currently it's "create external table dataset.table" and does not work for cross-project scenarios. It should be fixed to "create external table project.dataset.table"
### Impact
Fix the bug which failed cross-project scenarios.
### Risk level (write none, low medium or high below)
None
### Documentation Update
_Describe any necessary documentation update if there is any new feature, config, or user-facing change_
- _The config description must be updated if new configs are added or the default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
changes to the website._
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jp0317 commented on a diff in pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "jp0317 (via GitHub)" <gi...@apache.org>.
jp0317 commented on code in PR #9650:
URL: https://github.com/apache/hudi/pull/9650#discussion_r1319282103
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -94,8 +94,9 @@ public void createTableUsingBqManifestFile(String tableName, String bqManifestFi
}
String query =
String.format(
- "CREATE EXTERNAL TABLE `%s.%s` %s OPTIONS (%s "
+ "CREATE EXTERNAL TABLE `%s.%s.%s` %s OPTIONS (%s "
+ "uris=[\"%s\"], format=\"PARQUET\", file_set_spec_type=\"NEW_LINE_DELIMITED_MANIFEST\")",
+ projectId,
Review Comment:
Thanks for your review! Here the project id can be skipped if the sync and data are in the same project, otherwise it's required.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9650:
URL: https://github.com/apache/hudi/pull/9650#issuecomment-1710921429
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a diff in pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9650:
URL: https://github.com/apache/hudi/pull/9650#discussion_r1319245196
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -94,8 +94,9 @@ public void createTableUsingBqManifestFile(String tableName, String bqManifestFi
}
String query =
String.format(
- "CREATE EXTERNAL TABLE `%s.%s` %s OPTIONS (%s "
+ "CREATE EXTERNAL TABLE `%s.%s.%s` %s OPTIONS (%s "
+ "uris=[\"%s\"], format=\"PARQUET\", file_set_spec_type=\"NEW_LINE_DELIMITED_MANIFEST\")",
+ projectId,
Review Comment:
Nice catch ~ Is the projectId always required for BigQuery sync? Is there any default value for it?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] jp0317 commented on a diff in pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "jp0317 (via GitHub)" <gi...@apache.org>.
jp0317 commented on code in PR #9650:
URL: https://github.com/apache/hudi/pull/9650#discussion_r1320075990
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -94,8 +94,9 @@ public void createTableUsingBqManifestFile(String tableName, String bqManifestFi
}
String query =
String.format(
- "CREATE EXTERNAL TABLE `%s.%s` %s OPTIONS (%s "
+ "CREATE EXTERNAL TABLE `%s.%s.%s` %s OPTIONS (%s "
+ "uris=[\"%s\"], format=\"PARQUET\", file_set_spec_type=\"NEW_LINE_DELIMITED_MANIFEST\")",
+ projectId,
Review Comment:
It would require actual query execution..I've tested the fixed version manually (similar to [this setup](https://github.com/apache/hudi/pull/5125#issuecomment-1086715332)) and it worked as expected.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9650:
URL: https://github.com/apache/hudi/pull/9650#issuecomment-1710947463
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19726",
"triggerID" : "634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19726)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #9650:
URL: https://github.com/apache/hudi/pull/9650#issuecomment-1712388181
@the-other-tim-brown Do you have intreast to review this PR?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a diff in pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9650:
URL: https://github.com/apache/hudi/pull/9650#discussion_r1319245196
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -94,8 +94,9 @@ public void createTableUsingBqManifestFile(String tableName, String bqManifestFi
}
String query =
String.format(
- "CREATE EXTERNAL TABLE `%s.%s` %s OPTIONS (%s "
+ "CREATE EXTERNAL TABLE `%s.%s.%s` %s OPTIONS (%s "
+ "uris=[\"%s\"], format=\"PARQUET\", file_set_spec_type=\"NEW_LINE_DELIMITED_MANIFEST\")",
+ projectId,
Review Comment:
Nice catch ~
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a diff in pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9650:
URL: https://github.com/apache/hudi/pull/9650#discussion_r1319320294
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -94,8 +94,9 @@ public void createTableUsingBqManifestFile(String tableName, String bqManifestFi
}
String query =
String.format(
- "CREATE EXTERNAL TABLE `%s.%s` %s OPTIONS (%s "
+ "CREATE EXTERNAL TABLE `%s.%s.%s` %s OPTIONS (%s "
+ "uris=[\"%s\"], format=\"PARQUET\", file_set_spec_type=\"NEW_LINE_DELIMITED_MANIFEST\")",
+ projectId,
Review Comment:
Got it, can we write some tests for it.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9650:
URL: https://github.com/apache/hudi/pull/9650#issuecomment-1711354355
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19726",
"triggerID" : "634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 634e9882daaf39ee1f5cb8612b5213e3a9bc0f6b Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19726)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a diff in pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9650:
URL: https://github.com/apache/hudi/pull/9650#discussion_r1319245196
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -94,8 +94,9 @@ public void createTableUsingBqManifestFile(String tableName, String bqManifestFi
}
String query =
String.format(
- "CREATE EXTERNAL TABLE `%s.%s` %s OPTIONS (%s "
+ "CREATE EXTERNAL TABLE `%s.%s.%s` %s OPTIONS (%s "
+ "uris=[\"%s\"], format=\"PARQUET\", file_set_spec_type=\"NEW_LINE_DELIMITED_MANIFEST\")",
+ projectId,
Review Comment:
Nice catch ~ Is the projectId always required for BigQuery sync?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] the-other-tim-brown commented on pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "the-other-tim-brown (via GitHub)" <gi...@apache.org>.
the-other-tim-brown commented on PR #9650:
URL: https://github.com/apache/hudi/pull/9650#issuecomment-1712390246
> @the-other-tim-brown Do you have intreast to review this PR?
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 merged pull request #9650: [HUDI-6831] Add back missing project_id to query statement in BigQuerySyncTool
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #9650:
URL: https://github.com/apache/hudi/pull/9650
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org