import click from .tiup.run import TiupSparkTask from .tidb import main as _sync_tidb_logs from .temporary.temp_last_3_days_active import main as _temp_last_3_days_active @click.group() def run(): """Run ETL Task""" pass @run.command() @click.option( '--target_day', required=True, help='input format: 2019-04-17;\n') def tiup_task(target_day): TiupSparkTask(target_day).run() @run.command() @click.option( '--target_time', required=True, help='Sync target path\'s logs to db.\n' 'Example: 2020/05/20-10') def sync_tidb_logs(target_time): _sync_tidb_logs(target_time) @run.command() def temp_last_3_days_active(): _temp_last_3_days_active()