Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

air2phin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

air2phin

Air2phin is a tool for migrating Airflow DAGs to DolphinScheduler Python API.

  • 0.0.21
  • Source
  • PyPI
  • Socket score

Maintainers
1

Air2phin

PyPi Version PyPi Python Versions PyPi License PyPi Status Downloads Coverage Status Code style: black Imports: isort CI Documentation Status

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 MigrationAfter Migration
from airflow import DAGfrom pydolphinscheduler.core.process_definition import ProcessDefinition
with DAG(...) as dag: passwith ProcessDefinition(...) as dag: pass

Operators

Dummy Operator
Before MigrationAfter Migration
from airflow.operators.dummy_operator import DummyOperatorfrom pydolphinscheduler.tasks.shell import Shell
from airflow.operators.dummy import DummyOperatorfrom pydolphinscheduler.tasks.shell import Shell
dummy = DummyOperator(...)dummy = Shell(..., command="echo 'airflow dummy operator'")
Shell Operator
Before MigrationAfter Migration
from airflow.operators.bash import BashOperatorfrom pydolphinscheduler.tasks.shell import Shell
bash = BashOperator(...)bash = Shell(...)
Spark Sql Operator
Before MigrationAfter Migration
from airflow.operators.spark_sql_operator import SparkSqlOperatorfrom pydolphinscheduler.tasks.sql import Sql
spark = SparkSqlOperator(...)spark = Sql(...)
Python Operator
Before MigrationAfter Migration
from airflow.operators.python_operator import PythonOperatorfrom pydolphinscheduler.tasks.python import Python
python = PythonOperator(...)python = Python(...)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc