Skip to main content

The Apache Airflow provider package for TDengine built by SCIA IoT.

Project description

Airflow TDengine Provider

Tests CodeQL Advanced Package

The Airflow Provider for TDengine.

Usage

Build the package locally, and install it on your Airflow environment.

pip install dist/apache_airflow_providers_tdengine-0.0.1-py3-none-any.whl

Or via PyPI:

pip install apache-airflow-providers-tdengine

Add a connection to Airflow via CLI:

airflow connections add 'tdengine_default' \
  --conn-uri 'YOUR_CONN_URI_HERE'

NOTICE: The client driver taosc must be installed since only native connector i.e. tdengine is supported now.

Sample Operator

from sciaiot.airflow.providers.tdengine.operators.tdengine import BaseTDengineOperator


class CustomTDengineOperator(BaseOperator):
  def __init__(self, *, **kwargs) -> None:
    super().__init__(conn_id=conn_id, database=database, **kwargs)

  def execute(self, context: Context) -> None:
    statement = "SELECT server_status()"
    hook = self.get_hook()
    hook.run(statement=statement)
  

Development

IDE

Use devcontainer with VS Code.

Database

Run the tests/DDL.sql in taos CLI to setup a test database.

Code Style

In the root folder of project, run:

# add -v for verbose output
# add --fix for auto fixing
ruff check 

Or with the Ruff extension installed, run commands for any opening python file.

Type Check

In the root folder of project, run:

mypy .

Test

In the root folder of project, run:

pytest .

Build

In the root folder of project, run:

python -m build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apache_airflow_providers_tdengine-0.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apache_airflow_providers_tdengine-0.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file apache_airflow_providers_tdengine-0.1.tar.gz.

File metadata

File hashes

Hashes for apache_airflow_providers_tdengine-0.1.tar.gz
Algorithm Hash digest
SHA256 1dbd831360cecba55c0ba179a15596746e642770a8358e2633a4915c049c5d6a
MD5 89394ef0f00e471559fe1f457d4873cc
BLAKE2b-256 ba651fc52ec530a18d4db2dcb9c66f0de793aa4213b7be8e13224b6b6205b303

See more details on using hashes here.

Provenance

The following attestation bundles were made for apache_airflow_providers_tdengine-0.1.tar.gz:

Publisher: package.yml on scia-iot/airflow-providers-tdengine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file apache_airflow_providers_tdengine-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for apache_airflow_providers_tdengine-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39d7fc5a732b975a4251baffc9f195294e7e7b9dc8cd8801b67ddfd2e679f20a
MD5 a7da9411afc2096a7032258d55169a85
BLAKE2b-256 c450727e8c71346d545626ebe0d0a5ef49944b33258a0aa72f3406a562cf4d15

See more details on using hashes here.

Provenance

The following attestation bundles were made for apache_airflow_providers_tdengine-0.1-py3-none-any.whl:

Publisher: package.yml on scia-iot/airflow-providers-tdengine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page