Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sink): support delta sink with gcs #16182

Merged
merged 5 commits into from
Apr 8, 2024
Merged

feat(sink): support delta sink with gcs #16182

merged 5 commits into from
Apr 8, 2024

Conversation

xxhZs
Copy link
Contributor

@xxhZs xxhZs commented Apr 7, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

#16140

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

we can create delta lake sink with gcs the option is :
location = 'gs://bucket/xxx’
gcs.service.account = ‘service account json string’

@xxhZs xxhZs requested a review from a team as a code owner April 7, 2024 07:39
@xxhZs xxhZs added the user-facing-changes Contains changes that are visible to users label Apr 7, 2024
@xxhZs xxhZs requested a review from wenym1 April 7, 2024 08:31
let mut storage_options = HashMap::new();
storage_options.insert(
GCS_SERVICE_ACCOUNT.to_string(),
self.gcs_service_account.clone().unwrap(),
Copy link
Member

@fuyufjh fuyufjh Apr 8, 2024

Choose a reason for hiding this comment

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

If the gcs_service_account is not specified, the CN will panic?

If so, sounds unacceptable to me. Please do validation when create sink

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member

Choose a reason for hiding this comment

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

The fix is inside create_deltalake_client(), you are sure that it will be called during create sink, right?

Copy link
Contributor Author

@xxhZs xxhZs Apr 8, 2024

Choose a reason for hiding this comment

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

Yes, It will call it on create sink and sink write, create sinkis called first, so when the user just makes a write error, it will report the error to the psql client, not recovery

storage_options.insert(
GCS_SERVICE_ACCOUNT.to_string(),
self.gcs_service_account.clone().ok_or_else(|| {
SinkError::Config(anyhow!("gcs.service.account is required with aws gcs"))
Copy link
Member

Choose a reason for hiding this comment

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

not aws

Suggested change
SinkError::Config(anyhow!("gcs.service.account is required with aws gcs"))
SinkError::Config(anyhow!("gcs.service.account is required with Google Cloud Storage (GCS)"))

@xxhZs xxhZs enabled auto-merge April 8, 2024 09:21
@xxhZs xxhZs added this pull request to the merge queue Apr 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 8, 2024
@xxhZs xxhZs added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit faef9dd Apr 8, 2024
28 of 29 checks passed
@xxhZs xxhZs deleted the xxh/support-delta-gcs branch April 8, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants