Skip to content

Commit

Permalink
HCK-8102: External table options (#152)
Browse files Browse the repository at this point in the history
* fix: normalized dependencies for 'external', 'iceberg', 'dynamic' and 'transient' table options

* fix: pass 'iceberg', 'dynamic' and 'transient' table options to script properly

* chore: refactored approach of adding space at the beginning of the statement

* fix: pass missing parameters to a template

* fix: pass missing parameters to an "external" table template
  • Loading branch information
chulanovskyi-bs authored Sep 24, 2024
1 parent b84f5a1 commit ad8e8e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion forward_engineering/configs/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
createAsSelect: 'CREATE TABLE IF NOT EXISTS ${name} AS ${selectStatement}${tableOptions};\n',

createExternalTable:
'CREATE EXTERNAL TABLE IF NOT EXISTS \n' +
'CREATE${orReplace} EXTERNAL TABLE${tableIfNotExists}\n' +
'\t${name} (\n' +
'\t\t${column_definitions}${out_of_line_constraints}\n' +
'\t)${tableOptions};\n',
Expand Down
3 changes: 2 additions & 1 deletion forward_engineering/ddlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ module.exports = (baseProvider, options, app) => {
],
comment,
),

orReplace,
tableIfNotExists,
column_definitions: columnDefinitions,
out_of_line_constraints: getOutOfLineConstraints(
isActivated,
Expand Down

0 comments on commit ad8e8e2

Please sign in to comment.