-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now can run WhiteRabbit from command prompt
- Loading branch information
Showing
5 changed files
with
141 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
WORKING_FOLDER = /users/joe # Path to the folder where all output will be written | ||
DATA_TYPE = PostgreSQL # "Delimited text files", "MySQL", "Oracle", "SQL Server", "PostgreSQL", "MS Access", or "Redshift" | ||
SERVER_LOCATION = 127.0.0.1 # Name or address of the server. For Postgres, add the database name | ||
USER_NAME = joe # User name for the database | ||
PASSWORD = supersecret # Password for the database | ||
DATABASE_NAME = my_database # Name of the data schema used | ||
DELIMITER = , # The delimiter that separates values | ||
TABLES_TO_SCAN = * # Comma-delimited list of table names to scan. Use "*" (asterix) to include all tables in the database | ||
SCAN_FIELD_VALUES = yes # Include a frequency count of field values in the scan report? "yes" or "no" | ||
MIN_CELL_COUNT = 5 # Minimum frequency for a field value to be included in the report | ||
MAX_DISTINCT_VALUES = 1000 # Maximum number of distinct values per field to be reported | ||
ROWS_PER_TABLE = 100000 # Maximum number of rows per table to be scanned for field values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/******************************************************************************* | ||
* Copyright 2016 Observational Health Data Sciences and Informatics | ||
* | ||
* This file is part of WhiteRabbit | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
******************************************************************************/ | ||
package org.ohdsi.utilities.files; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class IniFile { | ||
private Map<String, String> settings = new HashMap<String, String>(); | ||
|
||
public IniFile(String filename){ | ||
for (String line : new ReadTextFile(filename)){ | ||
int indexOfHash = line.lastIndexOf('#'); | ||
if (indexOfHash != -1) | ||
line = line.substring(0,indexOfHash); | ||
|
||
int indexOfEqualsSigns = line.indexOf('='); | ||
|
||
if (indexOfEqualsSigns != -1) | ||
settings.put(line.substring(0,indexOfEqualsSigns).trim().toLowerCase(), line.substring(indexOfEqualsSigns+1).trim()); | ||
} | ||
} | ||
|
||
public String get(String fieldName){ | ||
String value = settings.get(fieldName.toLowerCase()); | ||
if (value == null) | ||
return ""; | ||
else | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters