-
Notifications
You must be signed in to change notification settings - Fork 347
Add extracopyoptions #35
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
Changes from all commits
02fa789
d383c77
8c94de2
390e08a
b398732
a113f41
0a6dd23
7fc9202
183aa6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,6 +178,12 @@ private[redshift] object Parameters { | |
| */ | ||
| def useStagingTable: Boolean = parameters("usestagingtable").toBoolean | ||
|
|
||
| /** | ||
| * Extra options to pass to the Redshift COPY command (e.g. "MAXERROR 100"). | ||
| * | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra blank line
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed on merge. |
||
| */ | ||
| def extraCopyOptions: String = parameters.get("extracopyoptions").getOrElse("") | ||
|
|
||
| /** | ||
| * List of semi-colon separated SQL statements to run after successful write operations. | ||
| * This can be useful for running GRANT operations to make your new tables readable to other | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,7 +98,7 @@ private[redshift] class RedshiftWriter( | |
| val credsString: String = AWSCredentialsUtils.getRedshiftCredentialsString(creds) | ||
| val fixedUrl = Utils.fixS3Url(manifestUrl) | ||
| s"COPY ${params.table.get} FROM '$fixedUrl' CREDENTIALS '$credsString' FORMAT AS " + | ||
| "AVRO 'auto' DATEFORMAT 'YYYY-MM-DD HH:MI:SS' manifest" | ||
| "AVRO 'auto' DATEFORMAT 'YYYY-MM-DD HH:MI:SS' manifest ${params.extraCopyOptions}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoops, just realized that this isn't going to be interpolated properly due to a missing |
||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass -> append