astro.utils.table

Module Contents

Functions

find_first_table(op_args, op_kwargs, python_callable, ...)

When we create our SQL operation, we run with the assumption that the first table given is the "main table".

astro.utils.table.find_first_table(op_args, op_kwargs, python_callable, parameters, context)

When we create our SQL operation, we run with the assumption that the first table given is the “main table”. This means that a user doesn’t need to define default conn_id, database, etc. in the function unless they want to create default values.

Parameters
  • op_args (tuple) – user-defined operator’s args

  • op_kwargs (dict) – user-defined operator’s kwargs

  • python_callable (Callable) – user-defined operator’s callable

  • parameters (dict) – user-defined parameters to be injected into SQL statement

  • context (astro.utils.typing_compat.Context) – the context to use for resolving XComArgs

Returns

the first table declared as decorator arg or kwarg

Return type

BaseTable | None