datus-oracle
Oracle database adapter for Datus.
Generates Oracle Database 19c-compatible SQL and connects via python-oracledb Thin mode (no Oracle Client required, supports Oracle Database 12.1+). Integration CI runs against Oracle AI Database 26ai Free (23.26.3).
Timeouts
timeout_seconds must be positive and now bounds driver I/O as well as pool
checkout where applicable. Long operations may need a larger value. Server
execution deadlines and supported overrides are described in the shared
timeout policy and real-database validation.
A socket/RPC timeout is distinct from an overall operation deadline.
Installation
pip install datus-oracle
Configuration
services:
datasources:
oracle_demo:
type: oracle
host: 127.0.0.1
port: 1521
username: datus_test
password: ${ORACLE_PASSWORD}
service_name: FREEPDB1
schema: DATUS_TEST
default: true
Exactly one connection target is required: service_name (recommended, addresses a PDB/service), sid (legacy environments) or dsn (TNS alias). database is accepted as a compatibility alias for service_name.
The service/PDB is a connection target only — SQL object identifiers are SCHEMA.TABLE. The default schema is the configured schema, otherwise the connecting user's schema.
Notes
- Row limiting uses
FETCH FIRST n ROWS ONLY(Oracle has noLIMITclause). - Identifiers are quoted upper-cased (
"ORDERS"), equivalent to unquoted names and safe for reserved words. - Booleans are stored as
NUMBER(1)with values 1/0 (Oracle 19c has no SQL BOOLEAN column type). - Metadata uses
ALL_*dictionary views only — noDBA_*access orSELECT_CATALOG_ROLErequired. - Bulk writes use bound parameters with
executemany(Oracle 19c does not support multi-rowINSERT ... VALUES). - The package exposes
db-oracle-sqlthrough thedatus.skillsentry point. Datus Agent 0.3.9 receives the same SKILL.md body through itssql_generation_notescompatibility hook.
Testing
# Unit tests (no database needed)
cd datus-oracle && python -m pytest tests/unit/ -v
# Start the local integration database. The DATUS_TEST_* pair provisions the
# container and is required; choose values not reused outside this disposable
# environment. ORACLE_PASSWORD is what the tests connect with, so it has to
# match DATUS_TEST_ORACLE_PASSWORD.
export DATUS_TEST_ORACLE_SYS_PASSWORD='<strong-sys-password>'
export DATUS_TEST_ORACLE_PASSWORD='<app-password-starting-with-a-letter>'
export ORACLE_PASSWORD="$DATUS_TEST_ORACLE_PASSWORD"
docker compose up -d
# Integration tests
cd datus-oracle && python -m pytest tests/integration/ -v
The compose environment pins gvenzl/oracle-free:23.26.3-slim by digest and
connects through FREEPDB1. The CI runner keys the preserved data volume by the
full image reference, so an image upgrade initializes a separate database with
matching timezone files. Keep ORACLE_IMAGE overrides pinned to an exact image,
and do not reuse an ORACLE_DATA_VOLUME_KEY across image versions. Direct Compose
runs should likewise select a new volume key when changing images.
Older volumes remain available for diagnosis or rollback; remove them explicitly
once they are no longer needed. DATUS_RECREATE_VOLUMES=1 resets only the selected
CI database volume. The first database creation is slower than restarting an
initialized volume; the CI readiness probe allows up to 20 minutes by default.
Sample schemas
The container also installs Oracle's official HR sample schema (7 tables,
216 rows) from docker/sample-schemas/human_resources/, driven by
docker/init/02_install_hr_schema.sh. tests/integration/test_sample_schema_hr.py
uses it to cover what the TPC-H fixtures cannot: foreign keys, the
employees.manager_id hierarchy (CONNECT BY), a view listed separately from
tables, and column comments.
The installation is idempotent and adds a couple of seconds to the first
container start. Set ORACLE_SKIP_SAMPLE_SCHEMAS=1 to skip it — the HR tests
then skip as well. ORACLE_HR_PASSWORD overrides the HR account password,
which otherwise reuses the app user's.
The sales_history (SH) schema is deliberately not vendored: its data files
total ~91 MB, which does not belong in this repository or in a CI image build.
Metadata
Release files for datus-oracle 0.1.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 | |
|---|---|---|---|---|
| datus_oracle-0.1.1.tar.gz | 48.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datus_oracle-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 69.8 kB
Release files / datus_oracle-0.1.1.tar.gz
| Download URL | datus_oracle-0.1.1.tar.gz |
|---|---|
| Size | 48.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50f001614f34d11829ef4f28deb182f5222e61b4b2c0c712523607c7393da8b8
|
|
BLAKE2b-256 checksum How to use checksums |
0fbfec5259ff9025f42276599a9110da2e02f351ace2b869b7f85450cfb0296c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / datus_oracle-0.1.1-py3-none-any.whl
| Download URL | datus_oracle-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52afc8f81cf439ca21516310956fdcf2a6d5568f47547342d0b6c217076e41b4
|
|
BLAKE2b-256 checksum How to use checksums |
7bb7a05ccd4dcea88db22f49b94d05fc932c7daa50ff02bce75d95dbfbd089cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for datus-oracle 0.1.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.