Air2phin
air2phin is a tool for migrating Airflow DAGs to DolphinScheduler Python API.
Installation
For now, it just for test and without publish to pypi but will be adding in the future. You could still install locally by yourself.
python -m pip install --upgrade air2phin
Quick Start
Here will give a quick example to show how to migrate base on standard input.
# Quick test the migrate rule for standard input
# Can also add option `--diff` to see the diff detail of this migrate
air2phin test "from airflow.operators.bash import BashOperator
test = BashOperator(
task_id='test',
bash_command='echo 1',
)
"
And you will see the migrated result in the standard output. air2phin can only migrate standard input, it can also migrate file, directory and even can use in your python code. For more detail, please see our usage.
Documentation
The documentation host on read the doc and is available at https://air2phin.readthedocs.io.
Support Statement
For now, we support following statement from Airflow's DAG files
DAG
| Before Migration | After Migration |
|---|---|
from airflow import DAG |
from pydolphinscheduler.core.process_definition import ProcessDefinition |
with DAG(...) as dag: pass |
with ProcessDefinition(...) as dag: pass |
Operators
Dummy Operator
| Before Migration | After Migration |
|---|---|
from airflow.operators.dummy_operator import DummyOperator |
from pydolphinscheduler.tasks.shell import Shell |
from airflow.operators.dummy import DummyOperator |
from pydolphinscheduler.tasks.shell import Shell |
dummy = DummyOperator(...) |
dummy = Shell(..., command="echo 'airflow dummy operator'") |
Shell Operator
| Before Migration | After Migration |
|---|---|
from airflow.operators.bash import BashOperator |
from pydolphinscheduler.tasks.shell import Shell |
bash = BashOperator(...) |
bash = Shell(...) |
Spark Sql Operator
| Before Migration | After Migration |
|---|---|
from airflow.operators.spark_sql_operator import SparkSqlOperator |
from pydolphinscheduler.tasks.sql import Sql |
spark = SparkSqlOperator(...) |
spark = Sql(...) |
Python Operator
| Before Migration | After Migration |
|---|---|
from airflow.operators.python_operator import PythonOperator |
from pydolphinscheduler.tasks.python import Python |
python = PythonOperator(...) |
python = Python(...) |
Metadata
Release files for air2phin 0.0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| air2phin-0.0.21.tar.gz | 22.6 kB | Without provenance | Details for air2phin-0.0.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| air2phin-0.0.21-py3-none-any.whl | Python 3 | none | any | Details for air2phin-0.0.21-py3-none-any.whl |
Total release size: 53.8 kB
Release files / air2phin-0.0.21.tar.gz
| Download URL | air2phin-0.0.21.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0eda9cbdf2dbc47b82113a93bfeeceeb595e15d16d32c49ddbfeed898cb31570
|
|
BLAKE2b-256 checksum How to use checksums |
8bdbff7b00310354763c3bbee636a3e5ec838a97f635759db7962d9bb415fa4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / air2phin-0.0.21-py3-none-any.whl
| Download URL | air2phin-0.0.21-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9eef39b078e53623669d6f5593d4445e161732748dc9a4ae4b4f7028871dfd6
|
|
BLAKE2b-256 checksum How to use checksums |
2672d6b4b964df4cfd52f70b3b58abd346b3ffb69ba33fd33566acbf4e217c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for air2phin 0.0.21
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.