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 |
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).
Metadata
Release files for sql-extract 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sql_extract-0.3.1.tar.gz | 5.4 kB | Without provenance | Details for sql_extract-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sql_extract-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for sql_extract-0.3.1-py3-none-any.whl |
Total release size: 12.2 kB
Release files / sql_extract-0.3.1.tar.gz
| Download URL | sql_extract-0.3.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e67385723db0b5dda2f0cf2379c24e48ae03e55cf9caeb204db7b6f9e1a9e2b4
|
|
BLAKE2b-256 checksum How to use checksums |
29d8954dff282f1d6507dbc72f77b0dbd89ae27076392d2d690d383b7b448f8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|
Release files / sql_extract-0.3.1-py3-none-any.whl
| Download URL | sql_extract-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ffb88dda42d244448194fd927e05d10287f72285f77240fe5c72fa6ff253d37
|
|
BLAKE2b-256 checksum How to use checksums |
ffa7e6c4fd4e61416eae2c4318e6bf1213a50cf4aee58a64bd54e4ad5c2c957b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|
Security for sql-extract 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.