Skip to content

Commit 9479058

Browse files
committed
fix: templates
1 parent cba78ed commit 9479058

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/containers/Tenant/utils/schemaQueryTemplates.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ export const createAsyncReplicationTemplate = () => {
6363
return `CREATE OBJECT secret_name (TYPE SECRET) WITH value="secret_value";
6464
6565
CREATE ASYNC REPLICATION my_replication
66-
FOR \`/\${1:<remote_database>}/\${2:table_name}\` AS \${3:local_table_name} --[, \`/remote_database/another_table_name\` AS \`another_local_table_name\` ...]
66+
FOR \${1:<table_name>} AS \${2:local_table_name} --[, \`/remote_database/another_table_name\` AS \`another_local_table_name\` ...]
6767
WITH (
68-
CONNECTION_STRING="grpcs://mydb.ydb.tech:2135/?database=/\${1:remote_database}",
68+
CONNECTION_STRING="grpcs://mydb.ydb.tech:2135/?database=/\${3:<remote_database>}",
6969
TOKEN_SECRET_NAME = "secret_name"
7070
-- ENDPOINT="mydb.ydb.tech:2135",
71-
-- DATABASE=\`\${1:/remote_database}\`,
71+
-- DATABASE=\`\${3:/remote_database}\`,
7272
-- USER="user",
7373
-- PASSWORD_SECRET_NAME="your_password"
7474
);`;
@@ -111,13 +111,9 @@ export const createExternalTableTemplate = (params?: SchemaQueryParams) => {
111111
// to create table in the same folder with data source
112112
const targetPath = params?.relativePath.split('/').slice(0, -1).join('/');
113113

114-
const target = targetPath
115-
? `\`${targetPath}/my_external_table\``
116-
: '${1:<path_to_table>}/${2:my_external_table_name}';
114+
const target = targetPath ? `\`${targetPath}/my_external_table\`` : '${1:<my_external_table>}';
117115

118-
const source = params?.relativePath
119-
? `${params.relativePath}`
120-
: '${1:path_to_table}/${3:data_source_name}';
116+
const source = params?.relativePath ? `${params.relativePath}` : '${2:<path_to_data_source>}';
121117
return `CREATE EXTERNAL TABLE ${target} (
122118
column1 Int,
123119
column2 Int

0 commit comments

Comments
 (0)