No project description provided
Project description
GOE
A simple and flexible way to copy data from an Oracle Database to Google BigQuery.
Downloading GOE
At present GOE is a command line tool. Alongside installing the Python package we also require some extra artefacts, everything you need to run the software is provided in a versioned package which can be downloaded from here or alternatively built locally.
Offload Home
In addition to the GOE software we need a supporting directory tree called the Offload Home. This is identified using the OFFLOAD_HOME environment variable. In this directory we keep configuration files, logs and the GOE software if you choose not to run scripts directly out of the cloned repo. Offload Home will also typically contain a Python virtual environment into which the GOE package and dependencies will be installed, you can run these out of the repository directory but, for separation of duties purposes, may choose to keep the source code away from users of the tool.
Installation From a Package
Installing the GOE Python Package
- Copy the package to the target host, this may not be the same host the repository was cloned to.
- Create the Offload Home directory, for example:
OFFLOAD_HOME=/opt/goe/offload
mkdir -p ${OFFLOAD_HOME}
- Extract the package into the new directory (replace
<goe-version>below):
tar --directory=${OFFLOAD_HOME}/../ -xf goe_<goe-version>.tar.gz
- Create and activate a Python virtual environment, for example:
cd $OFFLOAD_HOME
python3 -m venv .venv && . .venv/bin/activate
- Install the GOE Python package:
cd $OFFLOAD_HOME
python3 -m pip install goe-framework==<goe-version>
or use the bundled wheel file:
cd $OFFLOAD_HOME
GOE_WHEEL="goe_framework-<goe-version>-py3-none-any.whl"
python3 -m pip install lib/${GOE_WHEEL}
Configuration File
Create offload.env in the Offload Home. This file contains the necessary configuration specific to your environment:
cp ${OFFLOAD_HOME}/conf/oracle-bigquery-offload.env.template ${OFFLOAD_HOME}/conf/offload.env
vi ${OFFLOAD_HOME}/conf/offload.env
Variables you will want to pay attention to are:
- ORA_CONN
- ORA_ADM_PASS
- ORA_APP_PASS
- BIGQUERY_DATASET_LOCATION
- OFFLOAD_FS_CONTAINER
- OFFLOAD_FS_PREFIX
If using Dataproc to provide Spark:
- GOOGLE_DATAPROC_CLUSTER
- GOOGLE_DATAPROC_SERVICE_ACCOUNT
- GOOGLE_DATAPROC_REGION
If using Dataproc Batches to provide Spark:
- GOOGLE_DATAPROC_BATCHES_VERSION
- GOOGLE_DATAPROC_SERVICE_ACCOUNT
- GOOGLE_DATAPROC_REGION
- GOOGLE_DATAPROC_BATCHES_SUBNET
Install Database Objects
To install supporting database objects you need access to a database admin account that can create users, grant them system privileges and create objects in the schemas created. SYSTEM has been used in the example below but this is not a necessity:
cd ${OFFLOAD_HOME}/setup
sqlplus system@yourhost:1521/yoursvc
@install_offload
In a SQL*Plus session change the passwords for the GOE_ADM and GOE_APP users to match the values in the offload.env configuration file:
alter user goe_adm identified by ...;
alter user goe_app identified by ...;
Building a Custom Package
If you want to test with the latest commits that have not yet been included in a GitHub release you can build a custom package from the repository.
Prepare the Host/Cloned Repository
Debian prerequisites:
sudo apt-get -y install make python3-venv
java --version || sudo apt-get -y install default-jre
RHEL variant prerequisites:
sudo dnf -y install make
java --version || sudo dnf -y install java-11-openjdk
Install SBT in order to build the Spark Listener:
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup && rm ./cs
. ~/.bash_profile
Make a GOE Package
To create a package which contains all required artifacts for running GOE commands use the make target below:
make clean && make package
Install for Development
To create a Python virtual environment and install all required dependencies into the repository directory:
make clean && make install-dev
source ./.venv/bin/activate
PYTHONPATH=${PWD}/src
This enables you to develop and/or run tests.
Note only the Python dependencies for Oracle and BigQuery are installed by default. To install all optional dependencies you can run this command:
make install-dev-extras
Supporting Infrastructure
GOE requires access to cloud storage and Spark. For a Google Cloud installation this is described here: Google Cloud Platform Setup for a BigQuery Target
Running Commands
Activate the GOE Python virtual environment:
source ./.venv/bin/activate
Checking connectivity:
cd bin
./connect
Running an Offload:
cd bin
./offload -t my.table -x
Tests
See Tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goe_framework-1.0.8.dev0.tar.gz.
File metadata
- Download URL: goe_framework-1.0.8.dev0.tar.gz
- Upload date:
- Size: 641.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe1a9f589ad5fff9689adce7e83b324e4b549b1e25d066144ef802fad1f56f8e
|
|
| MD5 |
6b723d55b681607b44cd085f2665dd0b
|
|
| BLAKE2b-256 |
74f0da65c94fe761f033dd246ef516c229c47c580769339670de5c4398a76c40
|
Provenance
The following attestation bundles were made for goe_framework-1.0.8.dev0.tar.gz:
Publisher:
release.yml on gluent/goe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
goe_framework-1.0.8.dev0.tar.gz -
Subject digest:
fe1a9f589ad5fff9689adce7e83b324e4b549b1e25d066144ef802fad1f56f8e - Sigstore transparency entry: 241451396
- Sigstore integration time:
-
Permalink:
gluent/goe@edb7630428db6dd6127d7ee6d541aef8b9c882f8 -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/gluent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@edb7630428db6dd6127d7ee6d541aef8b9c882f8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file goe_framework-1.0.8.dev0-py3-none-any.whl.
File metadata
- Download URL: goe_framework-1.0.8.dev0-py3-none-any.whl
- Upload date:
- Size: 794.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e4a7b769e93d7367f1f61403e48f25a38b58f3b21f0719634e69fc4998a5490
|
|
| MD5 |
f22c81650a4b6776139b67adb285ccfc
|
|
| BLAKE2b-256 |
580ae05b6d532e5ca08d7e2f728cce2f85ae9fece3796b3c2c8cac4992b1f206
|
Provenance
The following attestation bundles were made for goe_framework-1.0.8.dev0-py3-none-any.whl:
Publisher:
release.yml on gluent/goe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
goe_framework-1.0.8.dev0-py3-none-any.whl -
Subject digest:
8e4a7b769e93d7367f1f61403e48f25a38b58f3b21f0719634e69fc4998a5490 - Sigstore transparency entry: 241451404
- Sigstore integration time:
-
Permalink:
gluent/goe@edb7630428db6dd6127d7ee6d541aef8b9c882f8 -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/gluent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@edb7630428db6dd6127d7ee6d541aef8b9c882f8 -
Trigger Event:
release
-
Statement type: