astro.sql
Subpackages
astro.sql.operatorsastro.sql.operators.appendastro.sql.operators.base_decoratorastro.sql.operators.base_operatorastro.sql.operators.cleanupastro.sql.operators.dataframeastro.sql.operators.dropastro.sql.operators.export_fileastro.sql.operators.load_fileastro.sql.operators.mergeastro.sql.operators.raw_sqlastro.sql.operators.transformastro.sql.operators.upstream_task_mixin
Submodules
Package Contents
Functions
|
Execute a sql statement and return the result. |
- astro.sql.get_value_list(sql, conn_id, **kwargs)
Execute a sql statement and return the result. By default, the response size is less than equal to value of
max_map_lengthconf. You can call a callable handler to alter the response by default it callfetchallon database result set.- Parameters
sql (str) – sql query to execute. If the sql query will return huge number of row then it can overload the XCOM. also, If you are using output of this method to expand a task using dynamic task map then it can create lots of parallel task. So it is advisable to limit your sql query statement.
conn_id (str) – Airflow connection id. This connection id will be used to identify the database client and connect with it at runtime
- Return type
airflow.models.xcom_arg.XComArg