CLI

This section describes all command line interfaces to the Air2phin. You can see quick start if you want to get started quickly.

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

usage: air2phin [-h] [-v] {test,migrate,rule} ...

Named Arguments

-v, --version

Show version of air2phin.

subcommands

subcommand

Possible choices: test, migrate, rule

Subcommand you want to Air2phin to run.

Sub-commands

test

Air2phin playground for migrating with standard input.

air2phin test [-h] [-v] [-r CUSTOM_RULES] [-R] [-d] stdin

Positional Arguments

stdin

The standard input you want to migrate.

Named Arguments

-v, --verbose

Show more verbose output.

Default: False

-r, --custom-rules

The custom rule file path you want to add to Air2phin.

-R, --custom-only

Only use custom rules and ignore all built-in’s, it is helpful for patching theexists migration.

Default: False

-d, --diff

Prints diff of all the changes Air2phin would make.

Default: False

migrate

Migrate Airflow DAGs to DolphinScheduler Python definition.

air2phin migrate [-h] [-v] [-r CUSTOM_RULES] [-R] [-I INCLUDE] [-E EXCLUDE]
                 [-i] [-m MULTIPROCESS]
                 [sources ...]

Positional Arguments

sources

The directories or files paths you want to migrate.

Default: [PosixPath(‘.’)]

Named Arguments

-v, --verbose

Show more verbose output.

Default: False

-r, --custom-rules

The custom rule file path you want to add to Air2phin.

-R, --custom-only

Only use custom rules and ignore all built-in’s, it is helpful for patching theexists migration.

Default: False

-I, --include

Include files based on conditions provided, default ‘*.py’

Default: “*.py”

-E, --exclude

Exclude files based on conditions provided, without default value

-i, --inplace

Migrate python file in place instead of create a new file.

Default: False

-m, --multiprocess

Migrate python files with multiprocess.

rule

Rule of migrating.

air2phin rule [-h] [-s]

Named Arguments

-s, --show

Show all rules for Air2phin migrate.

Default: False