diff --git a/src/main/java/com/salesforce/dataloader/config/AppConfig.java b/src/main/java/com/salesforce/dataloader/config/AppConfig.java index 74d8894a..1579c9b0 100644 --- a/src/main/java/com/salesforce/dataloader/config/AppConfig.java +++ b/src/main/java/com/salesforce/dataloader/config/AppConfig.java @@ -333,6 +333,7 @@ public class AppConfig { public static final String PROP_EXPORT_BATCH_SIZE = "sfdc.extractionRequestSize"; //$NON-NLS-1$ public static final String PROP_EXTRACT_SOQL = "sfdc.extractionSOQL"; //$NON-NLS-1$ public static final String PROP_SORT_EXTRACT_FIELDS = "sfdc.sortExtractionFields"; //$NON-NLS-1$ + public static final String PROP_EXTRACT_ALL_CAPS_HEADERS="sfdc.extraction.allCapsHeaders"; public static final String PROP_LOAD_PRESERVE_WHITESPACE_IN_RICH_TEXT = "sfdc.load.preserveWhitespaceInRichText"; // @@ -778,6 +779,7 @@ private void setDefaults(Map cliOptionsMap) { setDefaultValue(PROP_READ_CHARSET ,getDefaultCharsetForCsvReadWrite()); setDefaultValue(PROP_GMT_FOR_DATE_FIELD_VALUE, false); setDefaultValue(PROP_SAVE_ALL_PROPS, false); + setDefaultValue(PROP_EXTRACT_ALL_CAPS_HEADERS, false); } /** diff --git a/src/main/java/com/salesforce/dataloader/dao/csv/CSVFileWriter.java b/src/main/java/com/salesforce/dataloader/dao/csv/CSVFileWriter.java index e52b60f5..2a70df84 100644 --- a/src/main/java/com/salesforce/dataloader/dao/csv/CSVFileWriter.java +++ b/src/main/java/com/salesforce/dataloader/dao/csv/CSVFileWriter.java @@ -77,7 +77,7 @@ public class CSVFileWriter implements DataWriter { /** * If capitalizedHeadings is true, output header row in caps */ - private final boolean capitalizedHeadings = false; + private boolean capitalizedHeadings = false; private final char columnDelimiter; public CSVFileWriter(String fileName, AppConfig appConfig, String columnDelimiterStr) { @@ -89,6 +89,7 @@ public CSVFileWriter(String fileName, AppConfig appConfig, String columnDelimite columnDelimiterStr = AppUtil.COMMA; } this.columnDelimiter = columnDelimiterStr.charAt(0); + this.capitalizedHeadings = appConfig.getOperationInfo().isExtraction() && appConfig.getBoolean(AppConfig.PROP_EXTRACT_ALL_CAPS_HEADERS); } /** diff --git a/src/main/resources/labels.properties b/src/main/resources/labels.properties index 9a57423d..70200425 100644 --- a/src/main/resources/labels.properties +++ b/src/main/resources/labels.properties @@ -478,6 +478,7 @@ AppConfig.property.description.sfdc.oauth.Production.clientsecret=Specify encryp AppConfig.property.description.sfdc.oauth.Sandbox.clientsecret=Specify encrypted OAuth 2.0 client secret for Sandbox. AppConfig.property.description.sfdc.proxyNtlmDomain=Details documented at https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/configuring_the_data_loader.htm AppConfig.property.description.sfdc.extractionRequestSize=Details documented at https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/loader_params.htm +AppConfig.property.description.sfdc.extraction.allCapsHeaders=set it to "true" to output extraction field headers in capital letters (uppercase characters). AppConfig.property.description.config.properties.readonly=Do not modify config.properties file even if the user makes changes through Settings dialog. AppConfig.property.description.dataAccess.readCharset=Override system default charset by specifying charset to use for import operations. Set it to UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, or UTF-32LE to handle import CSVs with Byte Order Mark (BOM) character. AppConfig.property.description.loader.cacheSObjectNamesAndField=Cache object names and fields metadata across multiple operations. Applicable in the UI mode because batch mode executes one operation and stops.