WhaleOps/air2phin

Add more action for rules, like delete, default and so on

Closed this issue · 1 comments

currently, we only support replacing the airflow operator param name and replace the default value of parameter, but some time we may need to remove the parameter not supported by the dolphinscheduler.

So we need some config more general

before

name: DummyOperator
description: The configuration for converting Airflow DummyOperator to DolphinScheduler Shell task.

migration:
  module:
    src: airflow.operators.dummy_operator.DummyOperator
    dest: pydolphinschsduler.tasks.shell.Shell
  parameter:
    - src: task_id
      dest: name
    - src: bash_command
      dest: command
      default: echo 'Airflow DummyOperator'

after

name: DummyOperator
description: The configuration for converting Airflow DummyOperator to DolphinScheduler Shell task.

migration:
  module:
    src: airflow.operators.dummy_operator.DummyOperator
    dest: pydolphinschsduler.tasks.shell.Shell
  parameter:
    - src: task_id
      action: replace
      - name: name
    - src: bash_command
      action: replace
      - name: command
        default: echo 'Airflow DummyOperator'
    - src: addition
      action: delete

fix by #30