oradump
OraDump is a simple class for extracting data from Oracle database. It works over the native Oracle client, so you'll have the fastest and convenient way to get your data dumped.
Requirements
- Since it works directly with native Oracle client, you need to have installed 12.2c(or higher) version of it on your computer.
- Path to BIN directory of Oracle client have to be in PATH variable.
- Set ENV variable
NLS_LANGto encoding which used on your Oracle server. LikeAMERICAN_AMERICA.AL32UTF8 - Installed Python 3.6 or higher.
Installation
pip install oradump
Usage
Before utilize OraDump you need to prepare SQL-statement that will be used for retrieving data.
For values that will be changing you set placeholders like that {start_date}. So you'll have SQL script, but like as a template.
Example:
select
field_1,
id,
first_name,
last_name,
birth_day,
....
field_N ,
from scheme.employees
where birth_day = to_date('{date}', 'dd.mm.yyyy')
from oradump import OraDump
By now, you can get data only in csv format. So to achieve this, you need to call dump or dump_gziped(if want get it compressed) functions.
dump example:
rows_cnt = OraDump.dump(conn_str, template, csv, params)
-
conn_str - connection string that you specify when you connect to Oracle instance by native client(sqlplus). Like
user/password@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL=TCP)(HOST=XXX.XXX.XXX.XXX)(PORT=1521)))(CONNECT_DATA = (SERVICE_NAME=SID.alias))) -
template - SQL template described above
-
csv - path to target csv file
-
params - parameters passing into SQL template and substituting into according placeholders.
dump_gziped example:
rows_cnt = OraDump.dump_gziped(conn_str, template, gzip, params, del_orig=False)
- gzip - path to target gziped csv file
- del_orig - whether if you want to delete csv file that OraDump gets before compressing.
purposes of rest of parameters are the same as in dump
If all went successful number of retrieved rows is returned.
Metadata
Release files for oradump 1.0.7
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 | |
|---|---|---|---|---|
| oradump-1.0.7.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oradump-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / oradump-1.0.7.tar.gz
| Download URL | oradump-1.0.7.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
403c6bd0b4ed944d8c4e255a0e7a1bcc5bd57757428be233ce286f0a233a4540
|
|
BLAKE2b-256 checksum How to use checksums |
bd991ae77430688549beda7efb952a8225f2e15826e298e56968116b55e0dece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5rc1
|
Release files / oradump-1.0.7-py3-none-any.whl
| Download URL | oradump-1.0.7-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ed6004b24b98e7eb90c2f19bb59431136d0cf62e8e17f4431668e3b286347b5
|
|
BLAKE2b-256 checksum How to use checksums |
57880e5bbd4bc7e0d35c0d603342868b5b178535e69704f2327d41d9ebd4e7c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5rc1
|
Security for oradump 1.0.7
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.