From a353b93fcbe84a5e8e055b35e48b6bc75c941395 Mon Sep 17 00:00:00 2001 From: Kexiang Wang Date: Thu, 4 Jan 2024 22:53:37 -0500 Subject: [PATCH] fix(connector): fix gcs source connector --- e2e_test/s3/gcs_source.py | 2 +- src/connector/src/source/base.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e_test/s3/gcs_source.py b/e2e_test/s3/gcs_source.py index c917f2c2d33fd..5e1144266fb23 100644 --- a/e2e_test/s3/gcs_source.py +++ b/e2e_test/s3/gcs_source.py @@ -57,7 +57,7 @@ def _encode(): connector = 'gcs', match_pattern = '{prefix}*.{fmt}', gcs.bucket_name = '{config['GCS_BUCKET']}', - gcs.credentials = '{credential}', + gcs.credential = '{credential}', ) FORMAT PLAIN ENCODE {_encode()};''') total_rows = file_num * item_num_per_file diff --git a/src/connector/src/source/base.rs b/src/connector/src/source/base.rs index b6093a351783b..0c334bfee1de9 100644 --- a/src/connector/src/source/base.rs +++ b/src/connector/src/source/base.rs @@ -42,7 +42,7 @@ use super::google_pubsub::GooglePubsubMeta; use super::kafka::KafkaMeta; use super::monitor::SourceMetrics; use super::nexmark::source::message::NexmarkMeta; -use super::{OPENDAL_S3_CONNECTOR, POSIX_FS_CONNECTOR}; +use super::{GCS_CONNECTOR, OPENDAL_S3_CONNECTOR, POSIX_FS_CONNECTOR}; use crate::parser::ParserConfig; pub(crate) use crate::source::common::CommonSplitReader; use crate::source::filesystem::FsPageItem; @@ -389,6 +389,7 @@ impl ConnectorProperties { .map(|s| { s.eq_ignore_ascii_case(OPENDAL_S3_CONNECTOR) || s.eq_ignore_ascii_case(POSIX_FS_CONNECTOR) + || s.eq_ignore_ascii_case(GCS_CONNECTOR) }) .unwrap_or(false) } @@ -399,6 +400,7 @@ impl ConnectorProperties { .map(|s| { s.eq_ignore_ascii_case(OPENDAL_S3_CONNECTOR) || s.eq_ignore_ascii_case(POSIX_FS_CONNECTOR) + || s.eq_ignore_ascii_case(GCS_CONNECTOR) }) .unwrap_or(false) }