Skip to main content

Python based sql console

Project description

pyhdbsql

Command line app that connects to a HANA database and call an sql statement. The credentials of the database are stored in the config.yaml.

The outcome of a SELECT- statement can be stored in an output-file given in the config-file.

For uploading the data can be read from a csv-file of a path given in the config-file.

Example

pyhdbsql <sql-statement> or explicitly

pyhdbsql SELECT * FROM TESTTABLE;

config.yaml

###### HANA DB
HDB_HOST : db.com
HDB_USER : 'dbuser'
HDB_PWD : 'pwd123!'
HDB_PORT : 443

BATCHSIZE : 1  # uinteger, 0: no batches, 1: cursor.execute(), >1:cursor.executemany()
INFO_BATCHSIZE : 10000 # logging info when this number of records have been uploaded. Only used for BATCH_SIZE = 1, value 0: No info


### output file
OUTPUT_FILE : ./sqlout.csv

### input file for executemany
INPUT_CSV : ./records.csv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhdbsql-0.0.6.tar.gz (3.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page