Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support column_list for redshift_load operator #1549

Open
toru-takahashi opened this issue Mar 23, 2021 · 0 comments
Open

Support column_list for redshift_load operator #1549

toru-takahashi opened this issue Mar 23, 2021 · 0 comments

Comments

@toru-takahashi
Copy link
Contributor

Looks like column_list option hasn't not implemented yet even though the doc shows it.

Because, I found copy statement is build by the following syntax.

String buildCopyStatement(CopyConfig copyConfig, boolean maskCredentials)
{
StringBuilder sb = new StringBuilder();
sb.append(
String.format("COPY %s FROM '%s'\n",
escapeIdent(copyConfig.table),
escapeParam(copyConfig.from)));

       sb.append(
                String.format("COPY %s FROM '%s'\n",
                        escapeIdent(copyConfig.table),
                        escapeParam(copyConfig.from)));

But, The expected syntax is COPY tablename (column1 [,column2, ...])

So, copy_list option is allowed by the following but the logic hasn’t been implemented yet.

copyConfig.columnList = config.getOptional("column_list", String.class);

It’s a documentation bug. What we need to do is…

  • Remove column_list option from the doc for now
  • Support column_list option for redshift_load operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant