Skip to main content

An Oracle DBT Adapater

Project description

Oracle DBT

Tested with dbt==0.19.1

for dbt 0.18.0 and below, use dbt-oracle version 0.3.2


You need the oracle database client installed in your system in order for this to work, here ( you can find the cx_oracle python driver installation instructions.

This ( gist is also a useful resource for installing the client in Ubuntu. It’s an old link for Ubuntu 12 but it still works at least for ubuntu 18.


pip install dbt-oracle=0.4.0

Configure your profile

   target: dev
         type: oracle
         host: localhost
         user: system
         pass: oracle
         port: 1521
         dbname: xe
         schema: system
         threads: 4

Supported Features


  • table: OK
  • view: OK
  • incremental: OK
  • ephemeral: not OK





Custom schemas

Not tested


Not tested

Testing & documentation

  • Schema tests OK
  • Relationship tests Not OK
  • SQL Tests OK
  • Docs generate Not OK




There is a dummy dbt project called dbt_test_project for testing some things that the official dbt integration tests do not cover. For both dbt_test_project and dbt oficial adpter tests we are using a database user ‘dbt_test’ with password ‘dbt_test’ You have to either create this user os change the credentias at tests/oracle.dbtspec and dbt_test_project/profiles.yml

For running it first start an oracle database instance:

docker run \
--name dbt-oracle-db \
-d \
-p 1521:1521 \

Install the project locally

python install

then run dbt seed and run (theres is a profile file compatible with oracle 11g docker defaults at the test dir)

cd dbt_test_project
dbt seed --profiles-dir ./
dbt run --profiles-dir ./
dbt test --profiles-dir ./

you can also run

make test

for running both dbt adapter tests and the dbt_test_project included in this repo

The following dbt adapter tests are passing:


Known failing tests:

FAILED tests/oracle.dbtspec::test_dbt_data_test
FAILED tests/oracle.dbtspec::test_dbt_ephemeral_data_tests

The dbt adapter tests for data tests fails due to how the test_dbt_data_test sequence is implemented. You can use data tests with this adapter, there is an example at the test project in this repo.

Final Notes

This is a new project and any contribuitions are welcome.


0.1.0 (2020-06-02)

  • First release on PyPI.

0.2.0 (2020-06-02)

  • Added full macro implementation. Thanks Fabrice Etanchaud

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dbt-oracle, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size dbt_oracle-0.4.0-py2.py3-none-any.whl (21.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size dbt-oracle-0.4.0.tar.gz (15.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page