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 details)

Uploaded Source

File details

Details for the file pyhdbsql-0.0.6.tar.gz.

File metadata

  • Download URL: pyhdbsql-0.0.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.0

File hashes

Hashes for pyhdbsql-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e7c3a7fb393cbe55186b6d9d1eeaeed51d998903d99063f559ac52f34378106d
MD5 3fbd5a96dd67b0b12d6112b3e1a488a7
BLAKE2b-256 70e4981f5f7d4441785985584e7a43c1bcb1dd86cf7eda08716998b04224e9e1

See more details on using hashes here.

Supported by

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