diff options
author | Daniil Demin <deminds@ydb.tech> | 2025-02-12 22:27:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-12 22:27:28 +0300 |
commit | 4fee49410462f4f18bb6741d93ea23cb61af448a (patch) | |
tree | 7b5e3ea83d30eb0dd800e2258eebe1c2808b64a9 | |
parent | 4045ae8943df276c31c030751c64701b5e4d8a5b (diff) | |
download | ydb-4fee49410462f4f18bb6741d93ea23cb61af448a.tar.gz |
add external data source public API for description (#14438)
-rw-r--r-- | ydb/public/api/grpc/ydb_table_v1.proto | 8 | ||||
-rw-r--r-- | ydb/public/api/protos/ydb_table.proto | 40 |
2 files changed, 47 insertions, 1 deletions
diff --git a/ydb/public/api/grpc/ydb_table_v1.proto b/ydb/public/api/grpc/ydb_table_v1.proto index 2c2053404c..9591942f50 100644 --- a/ydb/public/api/grpc/ydb_table_v1.proto +++ b/ydb/public/api/grpc/ydb_table_v1.proto @@ -10,7 +10,7 @@ service TableService { // Create new session. Implicit session creation is forbidden, // so user must create new session before execute any query, // otherwise BAD_SESSION status will be returned. - // Simultaneous execution of requests are forbiden. + // Simultaneous execution of requests are forbidden. // Sessions are volatile, can be invalidated by server, for example in case // of fatal errors. All requests with this session will fail with BAD_SESSION status. // So, client must be able to handle BAD_SESSION status. @@ -85,4 +85,10 @@ service TableService { // Executes scan query with streaming result. rpc StreamExecuteScanQuery(Table.ExecuteScanQueryRequest) returns (stream Table.ExecuteScanQueryPartialResponse); + + // Returns information about a given external data source. + rpc DescribeExternalDataSource(Table.DescribeExternalDataSourceRequest) returns (Table.DescribeExternalDataSourceResponse); + + // Returns information about a given external table. + rpc DescribeExternalTable(Table.DescribeExternalTableRequest) returns (Table.DescribeExternalTableResponse); } diff --git a/ydb/public/api/protos/ydb_table.proto b/ydb/public/api/protos/ydb_table.proto index f21a3b2749..a101f3a084 100644 --- a/ydb/public/api/protos/ydb_table.proto +++ b/ydb/public/api/protos/ydb_table.proto @@ -1294,3 +1294,43 @@ message ExecuteScanQueryPartialResult { // collects additional diagnostics about query compilation, including query plan and scheme string query_full_diagnostics = 7; } + +// Returns information about an external data source with a given path. +message DescribeExternalDataSourceRequest { + Ydb.Operations.OperationParams operation_params = 1; + string path = 2; +} + +message DescribeExternalDataSourceResponse { + // Holds DescribeExternalDataSourceResult in case of a successful call. + Ydb.Operations.Operation operation = 1; +} + +message DescribeExternalDataSourceResult { + // Description of a generic scheme object. + Ydb.Scheme.Entry self = 1; + optional string source_type = 2; + optional string location = 3; + map<string, string> properties = 4; +} + +// Returns information about an external table with a given path. +message DescribeExternalTableRequest { + Ydb.Operations.OperationParams operation_params = 1; + string path = 2; +} + +message DescribeExternalTableResponse { + // Holds DescribeExternalTableResult in case of a successful call. + Ydb.Operations.Operation operation = 1; +} + +message DescribeExternalTableResult { + // Description of a generic scheme object. + Ydb.Scheme.Entry self = 1; + optional string source_type = 2; + optional string data_source_path = 3; + optional string location = 4; + repeated ColumnMeta columns = 5; + map<string, string> content = 6; +} |