Skip to content

Commit

Permalink
fix(Navigation): correct cluster name in yql query [YTFRONT-4274]
Browse files Browse the repository at this point in the history
  • Loading branch information
SimbiozizV committed Oct 25, 2024
1 parent 881c08c commit 4b9cab5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function generateYQLQuery(tableParams: GenerateTableQueryParams, cluster:
? ''
: `-- Please note that table schema not specified, so we're telling YQL to infer it from data.
PRAGMA yt.InferSchema = '1';\n`;
const yqlCluster = cluster.replace(/-/g, '').toLowerCase();
const yqlCluster = cluster.toLowerCase();
const columnsToQuery = prepareColumns(columns, {maxSize: maxColumnsLength});
return `${pragma}USE ${yqlCluster};\n\nSELECT\n${INDENT}${columnsToQuery}\nFROM \`${path}\`\nLIMIT ${pageSize};\n`;
return `${pragma}USE \`${yqlCluster}\`;\n\nSELECT\n${INDENT}${columnsToQuery}\nFROM \`${path}\`\nLIMIT ${pageSize};\n`;
}

export function generateCHYTQuery(tableParams: GenerateTableQueryParams): string {
Expand Down

0 comments on commit 4b9cab5

Please sign in to comment.