summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tools/sql2yql
diff options
context:
space:
mode:
Diffstat (limited to 'yql/essentials/tools/sql2yql')
-rw-r--r--yql/essentials/tools/sql2yql/sql2yql.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/yql/essentials/tools/sql2yql/sql2yql.cpp b/yql/essentials/tools/sql2yql/sql2yql.cpp
index 85ff6111c49..948cf86ef63 100644
--- a/yql/essentials/tools/sql2yql/sql2yql.cpp
+++ b/yql/essentials/tools/sql2yql/sql2yql.cpp
@@ -275,7 +275,12 @@ int BuildAST(int argc, char** argv) {
opts.AddLongOption("mem-limit", "Set memory limit in megabytes").Handler1T<ui32>(0, NYql::SetAddressSpaceLimit);
opts.AddLongOption("gateways-cfg", "Gateways configuration file").Optional().RequiredArgument("FILE").Handler1T<TString>([&gatewaysConfig, &clusterMapping](const TString& file) {
gatewaysConfig = ParseProtoConfig<NYql::TGatewaysConfig>(file);
- GetClusterMappingFromGateways(*gatewaysConfig, clusterMapping);
+
+ THashMap<TString, TString> local;
+ GetClusterMappingFromGateways(*gatewaysConfig, local);
+ for (const auto& [cluster, service] : local) {
+ clusterMapping.emplace(cluster, service); // priority to argv
+ }
});
opts.AddLongOption("pg-ext", "Pg extensions config file").Optional().RequiredArgument("FILE").Handler1T<TString>([](const TString& file) {
auto pgExtConfig = ParseProtoConfig<NYql::NProto::TPgExtensions>(file);