Skip to content

Commit 9a5c511

Browse files
jepett0blinkov
authored andcommitted
add external data source public API for description (#14438)
1 parent d5b954d commit 9a5c511

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

ydb/public/api/grpc/ydb_table_v1.proto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ service TableService {
1010
// Create new session. Implicit session creation is forbidden,
1111
// so user must create new session before execute any query,
1212
// otherwise BAD_SESSION status will be returned.
13-
// Simultaneous execution of requests are forbiden.
13+
// Simultaneous execution of requests are forbidden.
1414
// Sessions are volatile, can be invalidated by server, for example in case
1515
// of fatal errors. All requests with this session will fail with BAD_SESSION status.
1616
// So, client must be able to handle BAD_SESSION status.
@@ -85,4 +85,10 @@ service TableService {
8585

8686
// Executes scan query with streaming result.
8787
rpc StreamExecuteScanQuery(Table.ExecuteScanQueryRequest) returns (stream Table.ExecuteScanQueryPartialResponse);
88+
89+
// Returns information about a given external data source.
90+
rpc DescribeExternalDataSource(Table.DescribeExternalDataSourceRequest) returns (Table.DescribeExternalDataSourceResponse);
91+
92+
// Returns information about a given external table.
93+
rpc DescribeExternalTable(Table.DescribeExternalTableRequest) returns (Table.DescribeExternalTableResponse);
8894
}

ydb/public/api/protos/ydb_table.proto

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,3 +1294,43 @@ message ExecuteScanQueryPartialResult {
12941294
// collects additional diagnostics about query compilation, including query plan and scheme
12951295
string query_full_diagnostics = 7;
12961296
}
1297+
1298+
// Returns information about an external data source with a given path.
1299+
message DescribeExternalDataSourceRequest {
1300+
Ydb.Operations.OperationParams operation_params = 1;
1301+
string path = 2;
1302+
}
1303+
1304+
message DescribeExternalDataSourceResponse {
1305+
// Holds DescribeExternalDataSourceResult in case of a successful call.
1306+
Ydb.Operations.Operation operation = 1;
1307+
}
1308+
1309+
message DescribeExternalDataSourceResult {
1310+
// Description of a generic scheme object.
1311+
Ydb.Scheme.Entry self = 1;
1312+
optional string source_type = 2;
1313+
optional string location = 3;
1314+
map<string, string> properties = 4;
1315+
}
1316+
1317+
// Returns information about an external table with a given path.
1318+
message DescribeExternalTableRequest {
1319+
Ydb.Operations.OperationParams operation_params = 1;
1320+
string path = 2;
1321+
}
1322+
1323+
message DescribeExternalTableResponse {
1324+
// Holds DescribeExternalTableResult in case of a successful call.
1325+
Ydb.Operations.Operation operation = 1;
1326+
}
1327+
1328+
message DescribeExternalTableResult {
1329+
// Description of a generic scheme object.
1330+
Ydb.Scheme.Entry self = 1;
1331+
optional string source_type = 2;
1332+
optional string data_source_path = 3;
1333+
optional string location = 4;
1334+
repeated ColumnMeta columns = 5;
1335+
map<string, string> content = 6;
1336+
}

0 commit comments

Comments
 (0)