Skip to content

Commit

Permalink
Merge pull request #3361 from bamaer/3281
Browse files Browse the repository at this point in the history
date, time formats, dialog defaults, i18n update. #3281
  • Loading branch information
hansva authored Nov 8, 2023
2 parents dfd02bb + 0cb5f8c commit 3c3579e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ private String buildCopyStatementSqlString() {
sb.append(" FROM '" + resolve(meta.getCopyFromFilename()) + "'");
sb.append(" NULL '' ");
sb.append(" EMPTYASNULL ");
sb.append("DATEFORMAT AS 'YYYY/MM/DD' ");
sb.append("TIMEFORMAT AS 'YYYY/MM/DD HH:MI:SS'");
if(meta.isStreamToS3Csv() || meta.getLoadFromExistingFileFormat().equals("CSV")){
sb.append(" DELIMITER ',' ");
sb.append(" CSV QUOTE AS '\"'");
Expand Down Expand Up @@ -462,7 +464,7 @@ private void writeRowToFile(IRowMeta rowMeta, Object[] row) throws HopTransformE
boolean needConversion = false;
if (v.getType() == IValueMeta.TYPE_TIMESTAMP) {
v = new ValueMetaDate();
v.setConversionMask("yyyy/MM/dd HH:mm:ss");
v.setConversionMask("yyyy/MM/dd HH:mm:ss.SSS");
needConversion = true;
} else if (v.getType() == IValueMeta.TYPE_DATE) {
v = new ValueMetaDate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ public void widgetSelected(SelectionEvent e) {
PropsUi.setLook(wCopyFromFilename);
wCopyFromFilename.addModifyListener(lsMod);
wCopyFromFilename.addFocusListener(lsFocusLost);
wCopyFromFilename.getTextWidget().setMessage("s3://<FILENAME_IN_BUCKET>");

FormData fdCopyFromFile = new FormData();
fdCopyFromFile.top = new FormAttachment(lastControl, margin*2);
fdCopyFromFile.left = new FormAttachment(middle, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public class RedshiftBulkLoaderMeta
injectionKey = "STREAM_TO_S3",
injectionKeyDescription = ""
)
private boolean streamToS3Csv;
private boolean streamToS3Csv = true;

/** CSV: Trim whitespace */
@HopMetadataProperty(key = "trim_whitespace", injectionKeyDescription = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RedshiftBulkLoaderDialog.StreamCsvToS3.Label=Stream to S3 CSV
RedshiftBulkLoaderDialog.StreamCsvToS3.Tooltip=Writes the current pipeline stream to a file in an S3 bucket before copying into Redshift.
RedshiftBulkLoaderDialog.LoadFromExistingFile.Label=Load from existing file
RedshiftBulkLoaderDialog.LoadFromExistingFile.Tooltip=Copy data into Redshift table from an existing file.
RedshiftBulkLoaderDialog.CopyFromFile.Label=Copy into Redshift from existing file
RedshiftBulkLoaderDialog.CopyFromFile.Label=Copy into Redshift from file name/path
RedshiftBulkLoader.Connection.Connected=Connected to database {0}
RedshiftBulkLoaderDialog.Authenticate.Options.Label=AWS authentication
RedshiftBulkLoaderDialog.Authenticate.UseSystemVars.Label=Use AWS system variables
Expand Down

0 comments on commit 3c3579e

Please sign in to comment.