airflow-provider-sap-hana


Nameairflow-provider-sap-hana JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryAn Airflow provider to connect to SAP HANA
upload_time2025-01-23 19:51:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseApache License 2.0
keywords airflow hana sap hana sap-hana
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Airflow SAP HANA Provider
This packages enables Airflow to connect to SAP HANA using the official SAP Database cursor [hdbcli](https://pypi.org/project/hdbcli/).
This allows you to use the built-in Airflow operators and database hook methods, including methods that interact with
SQLAlchemy, via [sqlalchemy-hana](https://github.com/SAP/sqlalchemy-hana).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Installing airflow-provider-sap-hana](#installing-airflow-provider-sap-hana)
- [Setting Up the Airflow/HANA Express Environment](#setting-up-the-airflowhana-express-environment)
  - [Initializing Airflow](#initializing-airflow)
  - [Starting HANA Express](#starting-hana-express)
  - [Start the Remaining Services](#start-the-remaining-services)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installing airflow-provider-sap-hana
~~~
pip install airflow-provider-sap-hana
~~~
## Setting Up the Airflow/HANA Express Environment

This repository includes a `docker-compose` file designed to quickly set up an environment with everything needed to run
the example DAG. The `docker-compose` file is based on the file provided in the Airflow quick-start guide but with several
key modifications.

* An additional service `hana-express` - This creates a SAP HANA Express instance, a tenant database named HXE,
and a schema named 'AIRFLOW'

* Additional environment variable `AIRFLOW_CONN_HANA_DEFAULT` which contains the URI needed to connect to the HANA express instance.
* A custom `Dockerfile` to extend Airflow to include airflow-provider-sap-hana and Faker, to generate the mock data for the DAG.

The Airflow quick-start guide and the original `docker-compose` file can be found here  [Running Airflow in Docker](https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html)
### Initializing Airflow
The following directories and environment files need to be created before you initialize Airflow.
~~~
mkdir -p ./dags ./logs ./plugins ./config
echo -e "AIRFLOW_UID=$(id -u)" > .env
~~~
To initialize Airflow, run.
~~~
docker compose up airflow-init
~~~
After initialization is complete, you should see a message like this:
~~~
airflow-init_1       | Upgrades done
airflow-init_1       | Admin user airflow created
airflow-init_1       | 2.10.4
start_airflow-init_1 exited with code 0
~~~

### Starting HANA Express
Before you start HANA Express, you need to create a directory to persist data outside the container and grant
it the proper permissions.

~~~
mkdir -p ./hana
sudo chown 12000:79 ./hana
~~~
To start hana-express, run.
~~~
docker compose up hana-express -d
~~~
If you want to have visibility to the start-up process, run.
~~~
docker compose up hana-express -d && docker logs -f hana-express
~~~
This should take several minutes.

### Start the Remaining Services

To start the remaining Airflow services, run.
~~~
docker compose up -d
~~~

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "airflow-provider-sap-hana",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "airflow, hana, sap hana, sap-hana",
    "author": null,
    "author_email": "Jonathan Takish <jonathan.takish@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bd/9a/525bee2464d42b7b46a43e62a02a71911ad63c47571464bc47142e16bc6f/airflow_provider_sap_hana-1.0.2.tar.gz",
    "platform": null,
    "description": "# Airflow SAP HANA Provider\nThis packages enables Airflow to connect to SAP HANA using the official SAP Database cursor [hdbcli](https://pypi.org/project/hdbcli/).\nThis allows you to use the built-in Airflow operators and database hook methods, including methods that interact with\nSQLAlchemy, via [sqlalchemy-hana](https://github.com/SAP/sqlalchemy-hana).\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Installing airflow-provider-sap-hana](#installing-airflow-provider-sap-hana)\n- [Setting Up the Airflow/HANA Express Environment](#setting-up-the-airflowhana-express-environment)\n  - [Initializing Airflow](#initializing-airflow)\n  - [Starting HANA Express](#starting-hana-express)\n  - [Start the Remaining Services](#start-the-remaining-services)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installing airflow-provider-sap-hana\n~~~\npip install airflow-provider-sap-hana\n~~~\n## Setting Up the Airflow/HANA Express Environment\n\nThis repository includes a `docker-compose` file designed to quickly set up an environment with everything needed to run\nthe example DAG. The `docker-compose` file is based on the file provided in the Airflow quick-start guide but with several\nkey modifications.\n\n* An additional service `hana-express` - This creates a SAP HANA Express instance, a tenant database named HXE,\nand a schema named 'AIRFLOW'\n\n* Additional environment variable `AIRFLOW_CONN_HANA_DEFAULT` which contains the URI needed to connect to the HANA express instance.\n* A custom `Dockerfile` to extend Airflow to include airflow-provider-sap-hana and Faker, to generate the mock data for the DAG.\n\nThe Airflow quick-start guide and the original `docker-compose` file can be found here  [Running Airflow in Docker](https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html)\n### Initializing Airflow\nThe following directories and environment files need to be created before you initialize Airflow.\n~~~\nmkdir -p ./dags ./logs ./plugins ./config\necho -e \"AIRFLOW_UID=$(id -u)\" > .env\n~~~\nTo initialize Airflow, run.\n~~~\ndocker compose up airflow-init\n~~~\nAfter initialization is complete, you should see a message like this:\n~~~\nairflow-init_1       | Upgrades done\nairflow-init_1       | Admin user airflow created\nairflow-init_1       | 2.10.4\nstart_airflow-init_1 exited with code 0\n~~~\n\n### Starting HANA Express\nBefore you start HANA Express, you need to create a directory to persist data outside the container and grant\nit the proper permissions.\n\n~~~\nmkdir -p ./hana\nsudo chown 12000:79 ./hana\n~~~\nTo start hana-express, run.\n~~~\ndocker compose up hana-express -d\n~~~\nIf you want to have visibility to the start-up process, run.\n~~~\ndocker compose up hana-express -d && docker logs -f hana-express\n~~~\nThis should take several minutes.\n\n### Start the Remaining Services\n\nTo start the remaining Airflow services, run.\n~~~\ndocker compose up -d\n~~~\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "An Airflow provider to connect to SAP HANA",
    "version": "1.0.2",
    "project_urls": {
        "Source": "https://github.com/j6takish/airflow-provider-sap-hana"
    },
    "split_keywords": [
        "airflow",
        " hana",
        " sap hana",
        " sap-hana"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "47c1382aa4d0c3d2ba27c435a3266622f7b75c060304bb79f69c138f0eb35b55",
                "md5": "1a631b29c8cdd03f2c298a7732fd1d2d",
                "sha256": "b55d8f212ea112edca0e5d77e77f408e68d1d7255c98f2fce11a3b012e3499d5"
            },
            "downloads": -1,
            "filename": "airflow_provider_sap_hana-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a631b29c8cdd03f2c298a7732fd1d2d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 10014,
            "upload_time": "2025-01-23T19:51:24",
            "upload_time_iso_8601": "2025-01-23T19:51:24.705865Z",
            "url": "https://files.pythonhosted.org/packages/47/c1/382aa4d0c3d2ba27c435a3266622f7b75c060304bb79f69c138f0eb35b55/airflow_provider_sap_hana-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bd9a525bee2464d42b7b46a43e62a02a71911ad63c47571464bc47142e16bc6f",
                "md5": "e6d3cf4db7ab1f356c351e21957fb7f0",
                "sha256": "ed6638b90df6bf86610575d85a5184529d12d3448ad83ccfe903cd61db22c862"
            },
            "downloads": -1,
            "filename": "airflow_provider_sap_hana-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e6d3cf4db7ab1f356c351e21957fb7f0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 12269,
            "upload_time": "2025-01-23T19:51:26",
            "upload_time_iso_8601": "2025-01-23T19:51:26.292718Z",
            "url": "https://files.pythonhosted.org/packages/bd/9a/525bee2464d42b7b46a43e62a02a71911ad63c47571464bc47142e16bc6f/airflow_provider_sap_hana-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-23 19:51:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "j6takish",
    "github_project": "airflow-provider-sap-hana",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "airflow-provider-sap-hana"
}
        
Elapsed time: 0.54548s