Skip to main content

Airflow-provider-dolphindb

Installing airflow-provider-dolphindb

pip install airflow-provider-dolphindb

Example DAGs

To create a database and a table in it, and then execute an external .dos script file to insert data, follow these steps:

  1. Copy the example_dolphindb.py file to your DAGs folder. If you use the default airflow configuration airflow.cfg, you may need to create the DAGs folder yourself, which is located in AIRFLOW_HOME/dags.

  2. Copy the insert_data.dos file to the same directory as example_dolphindb.py.

  3. Start your DolphinDB server on port 8848.

  4. Start airflow in the development environment:

    cd /your/project/dir/
    # Only absolute paths are accepted
    export AIRFLOW_HOME=/your/project/dir/
    export AIRFLOW_CONN_DOLPHINDB_DEFAULT="dolphindb://admin:123456@127.0.0.1:8848"
    python -m airflow standalone
    

Please refer to the Official documentation for the production environment.

Now, you can find the example_dolphindb DAG on your airflow web page. You can try to trigger it.

Developer Documentation

Installing Apache Airflow

Refer to https://airflow.apache.org/docs/apache-airflow/stable/start.html for further details on this topic.

# It is recommended to use the current project directory as the airflow working directory
cd /your/source/dir/airflow-provider-dolphindb
# Only absolute paths are accepted
export AIRFLOW_HOME=/your/source/dir/airflow-provider-dolphindb

# Install apache-airflow 2.6.3
AIRFLOW_VERSION=2.6.3
PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"

pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"

Additionally, you may need to install Kubernetes to eliminate errors in airflow routines:

pip install kubernetes

Installing airflow-provider-dolphindb for testing

Refer to https://pip.pypa.io/en/stable/cli/pip_install/#install-editable for further details on this topic.

python -m pip install -e .

Testing

Run the following commands to validate the installation procedure above.

cd /your/source/dir/airflow-provider-dolphindb
# Only absolute paths are accepted
export AIRFLOW_HOME=/your/source/dir/airflow-provider-dolphindb
export AIRFLOW_CONN_DOLPHINDB_DEFAULT="dolphindb://admin:123456@127.0.0.1:8848"
pytest

Packaging airflow-provider-dolphindb

Run the following command.

python -m build

Metadata

Release files for airflow-provider-dolphindb 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for airflow-provider-dolphindb 1.1.0
File Interpreter ABI Platform Actions
airflow_provider_dolphindb-1.1.0-py3-none-any.whl Python 3 none any Details for airflow_provider_dolphindb-1.1.0-py3-none-any.whl

Release files / airflow_provider_dolphindb-1.1.0-py3-none-any.whl

Download URL airflow_provider_dolphindb-1.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66e2bfebfdbfbb43754fd86c2ab06bf7b2c658edf713a9af9b4b61e2eb8660bb
BLAKE2b-256 checksum
How to use checksums
5150e813555a179e15cfce2274ca2327bba0a08f91163b9f55f8a33ee79829d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for airflow-provider-dolphindb 1.1.0

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page