-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some docs. Override config with command line parameters
- Loading branch information
Showing
4 changed files
with
47 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,7 @@ hs_err_pid* | |
|
||
.idea | ||
*.iml | ||
target/ | ||
target/ | ||
.classpath | ||
.project | ||
.settings/ |
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 |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# sqlcmd | ||
SQL command line executor using JDBC drivers. Usefull for cron jobs and some automation. Porting of my previous sf.net code | ||
SQL command line executor using JDBC drivers. Useful for cron jobs and some automation. Porting of my previous sf.net code | ||
|
||
Usage: | ||
|
||
java -jar sqlcmd.jar -c:sqlcmd_config.properties <<EOF | ||
SELECT * | ||
FROM MY_TABLE | ||
EOF | ||
|
||
Config values: | ||
|
||
* jdbcDriverPath=Path to jdbc driver jar (loaded dynamically) | ||
* jdbcDriverClass=Jdbc Driver class full name | ||
* jdbcUrl=Jdbc connection URL | ||
* jdbcUser= | ||
* jdbcPass= | ||
* inputSQL=Path to input sql file (not required/optional if not present it uses stdin) | ||
* outputResult=Path to output file (if not present uses stdout) | ||
* printHeader=true/false If true adds header with query's column name. Default true | ||
* printFieldSeparator=Field separator for printing. Default tab (\t) | ||
|
||
Config values can be set also with parameters: | ||
|
||
-p:paran_name=param_value | ||
|
||
Ex: | ||
|
||
-p:printHeader=false | ||
|
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