diff options
author | hcpp <hcpp@ydb.tech> | 2023-08-16 15:39:49 +0300 |
---|---|---|
committer | hcpp <hcpp@ydb.tech> | 2023-08-16 17:03:14 +0300 |
commit | ee18cea3ee1a18d6a2374e066ee9e28b9b9fbfe6 (patch) | |
tree | ab15174ddea8e8702066cd860eb349bceec622ce | |
parent | 4c9df3d01ce4efa9e576f9b72f046966b39d8f67 (diff) | |
download | ydb-ee18cea3ee1a18d6a2374e066ee9e28b9b9fbfe6.tar.gz |
ExternalDataSource and ExternalTable have been added to Scheme public API
We can find an example of using: https://st.yandex-team.ru/#64db86bc530fe81874700736
-rw-r--r-- | ydb/core/tx/replication/controller/util.h | 2 | ||||
-rw-r--r-- | ydb/public/api/protos/ydb_scheme.proto | 2 | ||||
-rw-r--r-- | ydb/public/lib/ydb_cli/common/print_utils.cpp | 9 | ||||
-rw-r--r-- | ydb/public/sdk/cpp/client/ydb_scheme/scheme.cpp | 4 | ||||
-rw-r--r-- | ydb/public/sdk/cpp/client/ydb_scheme/scheme.h | 4 |
5 files changed, 19 insertions, 2 deletions
diff --git a/ydb/core/tx/replication/controller/util.h b/ydb/core/tx/replication/controller/util.h index e9b6d70612..9120a0a17a 100644 --- a/ydb/core/tx/replication/controller/util.h +++ b/ydb/core/tx/replication/controller/util.h @@ -29,6 +29,8 @@ inline TMaybe<TReplication::ETargetKind> TryTargetKindFromEntryType(NYdb::NSchem case NYdb::NScheme::ESchemeEntryType::ColumnTable: case NYdb::NScheme::ESchemeEntryType::ColumnStore: case NYdb::NScheme::ESchemeEntryType::Topic: + case NYdb::NScheme::ESchemeEntryType::ExternalTable: + case NYdb::NScheme::ESchemeEntryType::ExternalDataSource: return Nothing(); } } diff --git a/ydb/public/api/protos/ydb_scheme.proto b/ydb/public/api/protos/ydb_scheme.proto index 1ae2de26dd..dc5fb0996e 100644 --- a/ydb/public/api/protos/ydb_scheme.proto +++ b/ydb/public/api/protos/ydb_scheme.proto @@ -61,6 +61,8 @@ message Entry { SEQUENCE = 15; REPLICATION = 16; TOPIC = 17; + EXTERNAL_TABLE = 18; + EXTERNAL_DATA_SOURCE = 19; } // Name of scheme entry (dir2 of /dir1/dir2) diff --git a/ydb/public/lib/ydb_cli/common/print_utils.cpp b/ydb/public/lib/ydb_cli/common/print_utils.cpp index 710e44ccf9..627528c1ed 100644 --- a/ydb/public/lib/ydb_cli/common/print_utils.cpp +++ b/ydb/public/lib/ydb_cli/common/print_utils.cpp @@ -35,7 +35,10 @@ void PrintSchemeEntry(IOutputStream& o, const NScheme::TSchemeEntry& entry, NCol case NScheme::ESchemeEntryType::CoordinationNode: o << colors.YellowColor(); break; - + case NScheme::ESchemeEntryType::ExternalTable: + case NScheme::ESchemeEntryType::ExternalDataSource: + o << colors.LightWhite(); + break; default: o << colors.RedColor(); } @@ -95,6 +98,10 @@ TString EntryTypeToString(NScheme::ESchemeEntryType entry) { return "block-store-volume"; case NScheme::ESchemeEntryType::CoordinationNode: return "coordination-node"; + case NScheme::ESchemeEntryType::ExternalDataSource: + return "external-data-source"; + case NScheme::ESchemeEntryType::ExternalTable: + return "external-table"; case NScheme::ESchemeEntryType::Unknown: case NScheme::ESchemeEntryType::Sequence: case NScheme::ESchemeEntryType::Replication: diff --git a/ydb/public/sdk/cpp/client/ydb_scheme/scheme.cpp b/ydb/public/sdk/cpp/client/ydb_scheme/scheme.cpp index 98b7aa55b6..d79a992879 100644 --- a/ydb/public/sdk/cpp/client/ydb_scheme/scheme.cpp +++ b/ydb/public/sdk/cpp/client/ydb_scheme/scheme.cpp @@ -87,6 +87,10 @@ static ESchemeEntryType ConvertProtoEntryType(::Ydb::Scheme::Entry::Type entry) return ESchemeEntryType::Topic; case ::Ydb::Scheme::Entry::COLUMN_STORE: return ESchemeEntryType::ColumnStore; + case ::Ydb::Scheme::Entry::EXTERNAL_TABLE: + return ESchemeEntryType::ExternalTable; + case ::Ydb::Scheme::Entry::EXTERNAL_DATA_SOURCE: + return ESchemeEntryType::ExternalDataSource; default: return ESchemeEntryType::Unknown; } diff --git a/ydb/public/sdk/cpp/client/ydb_scheme/scheme.h b/ydb/public/sdk/cpp/client/ydb_scheme/scheme.h index 327fdffd41..db78082612 100644 --- a/ydb/public/sdk/cpp/client/ydb_scheme/scheme.h +++ b/ydb/public/sdk/cpp/client/ydb_scheme/scheme.h @@ -39,7 +39,9 @@ enum class ESchemeEntryType : i32 { ColumnTable = 13, Sequence = 15, Replication = 16, - Topic = 17 + Topic = 17, + ExternalTable = 18, + ExternalDataSource = 19 }; struct TVirtualTimestamp { |