LukMarks / query-executor

A query JDBC executor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

query-executor

A query JDBC executor callable as a jar format.

HOW TO USE

First it's necessary to create a json file with the following format:

{
 "query": "Select MyData from table",
 "responseTimeout": 15,
 "resultFilePath": "/path/to/WhereResultWillBeSaved",
 "jarPath": "path/to/dabaseDriver.jar",
 "connectionCredentials": {
     "driver": "driver.main.class",
     "connString": "jdbc:https://my-db-connstring",
     "user": "userName",
     "pass": "passwordWithBase64Encode",
   }
}

NOTE: The resultFilePath must be a nome with no extension, this will by added by the query-executor depending on query result.

In order to run the query, use:

java -jar <path/To/Json>

Once the query is finished there will be a file in the resultFilePath specifed path, that can either be a .csv if the query was successefuly executed or a .txt with the Exception if anything goes wrong.

About

A query JDBC executor


Languages

Language:Shell 47.8%Language:Java 33.2%Language:Batchfile 19.0%