Skip to content

Commit

Permalink
Merge pull request #1399 from ashitsalesforce/master
Browse files Browse the repository at this point in the history
config property to support extraction result fields in all capital le…
  • Loading branch information
ashitsalesforce authored Dec 4, 2024
2 parents bf8f85a + ceb1fd8 commit 551db63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/com/salesforce/dataloader/config/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

//
Expand Down Expand Up @@ -778,6 +779,7 @@ private void setDefaults(Map<String, String> 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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class CSVFileWriter implements DataWriter {
/**
* If <code>capitalizedHeadings</code> 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) {
Expand All @@ -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);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/labels.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 551db63

Please sign in to comment.