The Apache Airflow provider package for TDengine built by SCIA IoT.
Project description
Airflow TDengine Provider
The Airflow Provider for TDengine.
Usage
Build the package locally, and install it on your Airflow environment.
pip install dist/sciaiot_airflow_providers_tdengine-0.1.2-py3-none-any.whl
Or via PyPI:
pip install sciaiot-airflow-providers-tdengine
Add a connection to Airflow via CLI:
airflow connections add 'tdengine_default' --conn-uri 'tdengine://root:taosdata@tdengine:6030'
Test it:
airflow connections test tdengine_default
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 .
Install
In the root folder of project, run:
pip install -e .
Test
In the root folder of project, run:
pytest .
Build
Add build package:
pip install 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
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 sciaiot_airflow_providers_tdengine-0.1.3.tar.gz.
File metadata
- Download URL: sciaiot_airflow_providers_tdengine-0.1.3.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f008da7f384b86af19e706a6c0e7e5da1194d35334fc9fc856cc38fd4f968017
|
|
| MD5 |
c4a2f2c0ea766fb899e19e51ff2e9b3c
|
|
| BLAKE2b-256 |
f5ebfd8643204a443e97630f89d3df1f145e51e5024111c2f35671d0a55f31a9
|
Provenance
The following attestation bundles were made for sciaiot_airflow_providers_tdengine-0.1.3.tar.gz:
Publisher:
package.yml on scia-iot/airflow-providers-tdengine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sciaiot_airflow_providers_tdengine-0.1.3.tar.gz -
Subject digest:
f008da7f384b86af19e706a6c0e7e5da1194d35334fc9fc856cc38fd4f968017 - Sigstore transparency entry: 411848573
- Sigstore integration time:
-
Permalink:
scia-iot/airflow-providers-tdengine@a903e4c1f8fb4e60b70aeb930f163a72a37a0ae2 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/scia-iot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@a903e4c1f8fb4e60b70aeb930f163a72a37a0ae2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sciaiot_airflow_providers_tdengine-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sciaiot_airflow_providers_tdengine-0.1.3-py3-none-any.whl
- Upload date:
- Size: 11.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 |
a8a87fb3466673fef62dd0b8e044bcfb80e8c02b8b19e623a5ea40f9e865d727
|
|
| MD5 |
d60aacdd492e18a1bea17f69ac00bc61
|
|
| BLAKE2b-256 |
172365f4d503c4bc71f425dc2d04bd3fe4b5e9974a7efea4fc753bae8a68d9d6
|
Provenance
The following attestation bundles were made for sciaiot_airflow_providers_tdengine-0.1.3-py3-none-any.whl:
Publisher:
package.yml on scia-iot/airflow-providers-tdengine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sciaiot_airflow_providers_tdengine-0.1.3-py3-none-any.whl -
Subject digest:
a8a87fb3466673fef62dd0b8e044bcfb80e8c02b8b19e623a5ea40f9e865d727 - Sigstore transparency entry: 411848582
- Sigstore integration time:
-
Permalink:
scia-iot/airflow-providers-tdengine@a903e4c1f8fb4e60b70aeb930f163a72a37a0ae2 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/scia-iot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@a903e4c1f8fb4e60b70aeb930f163a72a37a0ae2 -
Trigger Event:
release
-
Statement type: