Skip to content

About

Execute a query on an Oracle database using Docker, Python and Pandas

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

docker-python-oracle

This repository provides a reference for connecting to an Oracle database with Python/Pandas using Docker. Docker is used to avoid local dependencies on required Oracle drivers.

Usage

Prepare query and credentials

  • Rename .env.example to .env and set the required environment variables.
  • Rename query.sql.example to query.sql and enter a valid query.

Build image

docker build -t python-oracle .

Run image

Run query/query.sql.

PowerShell/Ubuntu:

docker run --env-file=.env -v ${PWD}:/script python-oracle run.py query/query.sql

Windows Command Line (cmd):

docker run --env-file=.env -v %cd%:/script python-oracle run.py query/query.sql

Remarks

The directory oracle-instantclient contains zip files with the Oracle drivers. These drivers can also be downloaded from the Oracle website.

About

Execute a query on an Oracle database using Docker, Python and Pandas

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages