astro.sql.operators.drop

Module Contents

Classes

DropTableOperator

Airflow Operator for dropping SQL tables.

Functions

drop_table(table, **kwargs)

Drops a table.

class astro.sql.operators.drop.DropTableOperator(table, task_id='', **kwargs)

Bases: astro.sql.operators.base_operator.AstroSQLBaseOperator

Airflow Operator for dropping SQL tables.

Parameters:
  • table (astro.table.BaseTable) –

  • task_id (str) –

template_fields = ('table',)
execute(context)

Method run when the Airflow runner calls the operator.

Parameters:

context (astro.utils.compat.typing.Context) –

Return type:

astro.table.BaseTable

astro.sql.operators.drop.drop_table(table, **kwargs)

Drops a table.

Parameters:
  • table (astro.table.BaseTable) – Table to be dropped

  • kwargs (Any) – Any keyword arguments supported by the BaseOperator is supported (e.g queue, owner)

Return type:

airflow.models.xcom_arg.XComArg