astro.sql
Subpackages
astro.sql.operators
astro.sql.operators.append
astro.sql.operators.base_decorator
astro.sql.operators.base_operator
astro.sql.operators.cleanup
astro.sql.operators.dataframe
astro.sql.operators.drop
astro.sql.operators.export_file
astro.sql.operators.load_file
astro.sql.operators.merge
astro.sql.operators.raw_sql
astro.sql.operators.transform
astro.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_length
conf. You can call a callable handler to alter the response by default it callfetchall
on 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