Skip to main content

No project description provided

Project description

sql-extract

Exports the results of Oracle sql code contained in a .sql file out to a csv file.

Usage

# with input file
sql-extract in_sql_file.sql -o output_file.csv

# with quick text
sql-extract -t "select 1 from dual" -o output_file.csv

# with named bind parameters
sql-extract -t "select * from phonebook where first_name=:fn and last_name=:ln" -b fn=Dennis ln=Nedry -o output_file.csv

# additional help
sql-extract -h

Parameters

Name Description Type Required
filename input .sql file name string yes
-o, --outfile output .csv file name string no
-d, --delimiter .csv delimiter string no
-c, --quotechar .csv quote character string no
-l, --login Oracle login string string no
-p, --password Oracle password string no
-t, --text SQL query text (instead of file) string no
-b, --bind-variables Any named bind parameters in the .sql file, must follow param=value convention list no
positional_variables any positional variables in the .sql file list no

Unit Testing

./unittests.py

Configuration

Store your Oracle login and password in full_login and db_password environment variables, respectively. Otherwise, you must use --login and --password to pass in your credential(s). You can alternatively store your login as an environment variable but not your password (or vice versa).

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

sql_extract-0.3.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sql_extract-0.3.2-py3.7.egg (11.4 kB view details)

Uploaded Egg

sql_extract-0.3.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file sql_extract-0.3.2.tar.gz.

File metadata

  • Download URL: sql_extract-0.3.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.4

File hashes

Hashes for sql_extract-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4cf4149fb435457128a7ae8fa6295111d29c803edef46fb57f588fe8383d83b3
MD5 5611d29aba53571db02efd629048e351
BLAKE2b-256 b8300a167dcba1c5a4179b2765b22f24e7de7e6955f8443b99f3eb3af27640c0

See more details on using hashes here.

File details

Details for the file sql_extract-0.3.2-py3.7.egg.

File metadata

  • Download URL: sql_extract-0.3.2-py3.7.egg
  • Upload date:
  • Size: 11.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.4

File hashes

Hashes for sql_extract-0.3.2-py3.7.egg
Algorithm Hash digest
SHA256 7eaa60c6a62cab4af639dc11d63ae81c2d2e101566c9a5f20b881a13e13082c3
MD5 f0eb1be6c284000879f4b0bd531b23b9
BLAKE2b-256 65d2a09630b31b26917b71c1c4f050bfaa5d442e017f7ccae737fc9d7b91a9ae

See more details on using hashes here.

File details

Details for the file sql_extract-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: sql_extract-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.4

File hashes

Hashes for sql_extract-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 425d5290bc783308a52cc5177e00435b3fd7396edc347634d96e08ab3ca89401
MD5 561f5b9a03d5ac522dac82473c545465
BLAKE2b-256 67b62af5d59b3d4d2cee032217da5d86a48d53ae2294e0c2baba8aae6967c835

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