A package to simplify connecting to the couchbase nosql database from Apache Airflow
Project description
airflow-providers-couchbase
The airflow-providers-couchbase
enables interactions with Couchbase clusters within Apache Airflow workflows. It provides custom Couchbase Hook that allow users to seamlessly interact with Couchbase databases, execute queries, manage documents, and more.
Installation
To install the airflow-providers-couchbase
package, run:
pip install airflow-providers-couchbase
Running a DAG Example Inside an Airflow Docker Container
This section demonstrates how to run the example DAG inside an Airflow Docker container. A docker
folder is provided in the repository, containing a Dockerfile
and docker-compose.yaml
file for setting up the Couchbase provider and running Airflow. Additionally, a sample DAG file airflow_test_cb_cluster.py
is available in the docker/dags
folder, which interacts with a Couchbase cluster.
Prerequisites
- Docker and Docker Compose installed on your machine.
- A running Couchbase cluster accessible from your Docker container. If you don’t have one, download and install Couchbase Server from the official website.
- The travel-sample bucket should be available in your Couchbase cluster. If not, you can import it from Couchbase sample buckets.
Steps to Run the Example DAG
-
Navigate to the Docker Directory:
cd docker
-
Build and Run the Docker Containers:
docker compose up airflow-init docker-compose up --build
-
Access the Airflow Web UI: Open your web browser and navigate to http://localhost:8080 to access the Airflow web UI.
-
Configure a Couchbase Connection: Navigate to Airflow Connections and configure the Couchbase connection with the following details:
- Connection Id: couchbase_default
- Connection Type: Couchbase
- Connection: couchbase://your_couchbase_host
- Username: Your Couchbase username
- Password: Your Couchbase password
-
Trigger the DAG: Trigger the couchbase_cluster_test DAG from the Airflow UI and inspect the logs.
-
Inspect the Logs: Click on each task and check the logs to verify the execution of Couchbase queries.
Clean Up
To stop and remove the Docker containers and volumes, run:
docker-compose down -v
Additional Resources
- Airflow Installation Guide
- Apache Airflow Documentation
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
File details
Details for the file airflow_providers_couchbase-1.0.0.tar.gz
.
File metadata
- Download URL: airflow_providers_couchbase-1.0.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2049ac8d36d2c97ad1de939f3cdcdf9c6a64cf6ebf91a1623d4c833243103729 |
|
MD5 | 1d1d98ec7eb813f9cbd41307d6da6cbd |
|
BLAKE2b-256 | 9d57cf8d87cfce9073aeeceaf7071e9d563083e217c98e0032a046ffafa0c4b5 |
File details
Details for the file airflow_providers_couchbase-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: airflow_providers_couchbase-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 282e84ab33b8e08bde7432cd6b2e6d5fc1a462f1956674900af85ef11f851f3e |
|
MD5 | b0cc4eebfb3dd5bb8d035c80231bab9f |
|
BLAKE2b-256 | e7996fb388d58931e8cec641a3a9ebf554c946d74ecd9f51770a493f885732dc |