GoodData up to Release 36 uses this, we can't remove it in v1.0 branch
to warrant smooth transition.
This reverts commit f239427bdbf8cbe2226f292e5c5ac91ea67a4444.
Conflicts:
cli/src/main/resources/com/gooddata/processor/COMMANDS.txt
connector/src/main/java/com/gooddata/connector/CsvConnector.java
---
.../resources/com/gooddata/processor/COMMANDS.txt | 6 ++++++
.../java/com/gooddata/connector/CsvConnector.java | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/cli/src/main/resources/com/gooddata/processor/COMMANDS.txt b/cli/src/main/resources/com/gooddata/processor/COMMANDS.txt
index e0c3d65..a5840e4 100644
--- a/cli/src/main/resources/com/gooddata/processor/COMMANDS.txt
+++ b/cli/src/main/resources/com/gooddata/processor/COMMANDS.txt
@@ -82,6 +82,12 @@ CSV Connector Commands:
defaultLdmType - LDM type to be associated with new columns (only ATTRIBUTE type is supported by the ProcessNewColumns task at this time)
folder - folder where to place new attributes
+ UpdateConfig(csvHeaderFile=<headers>, configFile=<config>, defaultLdmType=<type>, defaultFolder=<folder>) - adds new columns in the CSV headers file into the configFile
+ headers - path to CSV header file (only the first header row will be used)
+ config - path to configuration file (will be overwritten with a version extended with new columns)
+ type - LDM type to be associated with new columns (only ATTRIBUTE type is supported by the ProcessNewColumns task at this time)
+ folder - folder where to place new attributes
+
LoadCsv(csvDataFile=<data>, configFile=<config>, header=<true | false>) - load CSV data file using config file describing the file structure, must call CreateProject or OpenProject before
csvDataFile - path to CSV datafile
configFile - path to XML configuration file (see the GenerateCsvConfig command that generates the config file template)
diff --git a/connector/src/main/java/com/gooddata/connector/CsvConnector.java b/connector/src/main/java/com/gooddata/connector/CsvConnector.java
index 3343937..5208381 100644
--- a/connector/src/main/java/com/gooddata/connector/CsvConnector.java
+++ b/connector/src/main/java/com/gooddata/connector/CsvConnector.java
@@ -213,6 +213,9 @@ public class CsvConnector extends AbstractConnector implements Connector {
else if(c.match("LoadCsv")) {
loadCsv(c, cli, ctx);
}
+ else if (c.match( "UpdateConfig")) {
+ generateCsvConfig(c, cli, ctx);
+ }
else
return super.processCommand(c, cli, ctx);
}
--
1.7.1