diff --git a/ydb/public/api/grpc/ydb_table_v1.proto b/ydb/public/api/grpc/ydb_table_v1.proto index 2c2053404c7e..9591942f5095 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 f21a3b2749d0..a101f3a08493 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 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 content = 6; +}