Skip to content

Commit 508fc80

Browse files
committed
Make database_name mandatory
1 parent 64672e3 commit 508fc80

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

ydb/library/yql/providers/generic/connector/tests/datasource/ydb/docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ services:
55
echo \"$$(dig fq-tests-ydb-ydb +short) fq-tests-ydb-ydb\" >> /etc/hosts; cat /etc/hosts;
66
/opt/ydb/bin/fq-connector-go server -c /opt/ydb/cfg/fq-connector-go.yaml"
77
container_name: fq-tests-ydb-fq-connector-go
8-
image: ghcr.io/ydb-platform/fq-connector-go:v0.4.17@sha256:3763344ab70f9a6b8c1546f15c0b31465590e8ac6636be15ca2d29c4f4cd9b19
8+
# image: ghcr.io/ydb-platform/fq-connector-go:v0.4.17@sha256:3763344ab70f9a6b8c1546f15c0b31465590e8ac6636be15ca2d29c4f4cd9b19
9+
build:
10+
context: /home/vitalyisaev/projects/fq-connector-go
11+
dockerfile: Dockerfile.release
912
ports:
1013
- 2130
1114
volumes:

ydb/library/yql/providers/generic/provider/yql_generic_cluster_config.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,12 @@ namespace NYql {
107107
NYql::TGenericClusterConfig& clusterConfig) {
108108
auto it = properties.find("database_name");
109109
if (it == properties.cend()) {
110-
// TODO: make this property required during https://st.yandex-team.ru/YQ-2494
111-
// ythrow yexception() << "missing 'DATABASE_NAME' value";
110+
ythrow yexception() << "missing 'DATABASE_NAME' value";
112111
return;
113112
}
114113

115114
if (!it->second) {
116-
// TODO: make this property required during https://st.yandex-team.ru/YQ-2494
117-
// ythrow yexception() << "invalid 'DATABASE_NAME' value: '" << it->second << "'";
115+
ythrow yexception() << "invalid 'DATABASE_NAME' value: '" << it->second << "'";
118116
return;
119117
}
120118

@@ -125,14 +123,12 @@ namespace NYql {
125123
NYql::TGenericClusterConfig& clusterConfig) {
126124
auto it = properties.find("schema");
127125
if (it == properties.cend()) {
128-
// TODO: make this property required during https://st.yandex-team.ru/YQ-2494
129-
// ythrow yexception() << "missing 'SCHEMA' value";
126+
// SCHEMA is optional field
130127
return;
131128
}
132129

133130
if (!it->second) {
134-
// TODO: make this property required during https://st.yandex-team.ru/YQ-2494
135-
// ythrow yexception() << "invalid 'SCHEMA' value: '" << it->second << "'";
131+
// SCHEMA is optional field
136132
return;
137133
}
138134

@@ -333,9 +329,12 @@ namespace NYql {
333329
}
334330

335331
static const TSet<NConnector::NApi::EDataSourceKind> managedDatabaseKinds{
336-
NConnector::NApi::EDataSourceKind::POSTGRESQL,
337332
NConnector::NApi::EDataSourceKind::CLICKHOUSE,
338-
NConnector::NApi::EDataSourceKind::YDB};
333+
NConnector::NApi::EDataSourceKind::GREENPLUM,
334+
NConnector::NApi::EDataSourceKind::MYSQL,
335+
NConnector::NApi::EDataSourceKind::POSTGRESQL,
336+
NConnector::NApi::EDataSourceKind::YDB,
337+
};
339338

340339
void ValidateGenericClusterConfig(
341340
const NYql::TGenericClusterConfig& clusterConfig,

0 commit comments

Comments
 (0)