Skip to content

Commit

Permalink
fix missing config file
Browse files Browse the repository at this point in the history
  • Loading branch information
edigonzales committed Jul 9, 2023
1 parent 043067b commit 691b658
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ run {
//args = ["--trace", "--config=src/test/data/bewilligte_erdwaermeanlagen/ch.so.afu.bewilligte_erdwaermeanlagen.toml", "--id=ch.so.afu.bewilligte_erdwaermeanlagen", "--input=src/test/data/bewilligte_erdwaermeanlagen/bewilligte_erdwaermeanlagen.csv", "--output=build/"]
//args = ["--trace", "--config=src/test/data/bewilligte_erdwaermeanlagen/ch.so.afu.bewilligte_erdwaermeanlagen.toml", "--input=src/test/data/bewilligte_erdwaermeanlagen/bewilligte_erdwaermeanlagen.csv", "--output=build/"]
//args = ["--trace", "--config=src/test/data/abfallmengen_gemeinden/ch.so.afu.abfallmengen_gemeinden.toml", "--input=src/test/data/abfallmengen_gemeinden/abfallmengen_gemeinden.csv", "--output=build/"]
args = ["--trace", "--config=src/test/data/steuerfuesse/ch.so.agem.steuerfuesse.toml", "--id=ch.so.agem.steuerfuesse.natuerliche_personen", "--input=src/test/data/steuerfuesse/ch.so.agem.steuerfuesse.natuerliche_personen.csv", "--meta", "--output=build/"]
//args = ["--trace", "--config=src/test/data/steuerfuesse/ch.so.agem.steuerfuesse.toml", "--id=ch.so.agem.steuerfuesse.natuerliche_personen", "--input=src/test/data/steuerfuesse/ch.so.agem.steuerfuesse.natuerliche_personen.csv", "--meta", "--output=build/"]
//args = ["--trace", "--config=src/test/data/kantonale_gebaeude/ch.so.hba.kantonale_gebaeude.toml", "--input=src/test/data/kantonale_gebaeude/20230124_sap_Gebaeude.csv", "--output=build/"]

args = ["--trace", "--input=src/test/data/bewilligte_erdwaermeanlagen/bewilligte_erdwaermeanlagen.csv"]

}

Expand Down
16 changes: 9 additions & 7 deletions src/main/java/ch/so/agi/csv2parquet/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ public Integer call() throws Exception {
// TODO
// Fake it, till you make it.
// Zukünftig soll ilidata aus einem INTERLIS-Repo geladen werden.
File configFile;
if (configFileName.startsWith("ilidata")) {
configFile = Utils.copyResourceToTmpDir(configFileName.split(":")[1]);
if (configFile != null) {
EhiLogger.traceState("config file <"+configFile.getAbsolutePath()+">.");
File configFile = null;
if (configFileName != null) {
if (configFileName.startsWith("ilidata")) {
configFile = Utils.copyResourceToTmpDir(configFileName.split(":")[1]);
if (configFile != null) {
EhiLogger.traceState("config file <"+configFile.getAbsolutePath()+">.");
}
} else {
configFile = new File(configFileName);
}
} else {
configFile = new File(configFileName);
}

// Config-File parsen und die Prosanamen der Parameter auf die technischen Namen mappen.
Expand Down

0 comments on commit 691b658

Please sign in to comment.