# Exasol Tasks
This module contains a collection of tasks for interacting with Exasol databases via the pyexasol library.
# ExasolFetch
class
prefect.tasks.exasol.exasol.ExasolFetch
(dsn="", dsn_secret="", user_secret="", password_secret="", fetch="one", fetch_size=10, query=None, query_params=None, **kwargs)[source]Task for fetching results of query from Exasol database.
Args:
dsn (str, optional)
: dsn string of the database (server:port)dsn_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol dsn connection string (server:port)user_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol user namepassword_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol passwordfetch (str, optional)
: one of "one" "many" "val" or "all", used to determine how many results to fetch from executed queryfetch_size (int, optional)
: if fetch = 'many', determines the number of results to fetch, defaults to 10query (str, optional)
: query to execute against databasequery_params (dict, optional)
: Values for SQL query placeholders**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.exasol.exasol.ExasolFetch.run (user="", password="", dsn="", fetch="one", fetch_size=10, query=None, query_params=None, **kwargs)[source] |
Task run method. Executes a query against Exasol database and fetches results.
|
# ExasolExecute
class
prefect.tasks.exasol.exasol.ExasolExecute
(dsn="", dsn_secret="", user_secret="", password_secret="", query=None, query_params=None, autocommit=False, commit=True, **kwargs)[source]Task for executing a query against a Exasol database.
Args:
dsn (str, optional)
: dsn string of the database (server:port)dsn_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol dsn connection string (server:port)user_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol user namepassword_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol passwordquery (str, optional)
: query to execute against databasequery_params (dict, optional)
: Values for SQL query placeholdersautocommit (bool, optional)
: turn autocommit on or off (default: False)commit (bool, optional)
: set to True to commit transaction, defaults to True (only necessary if autocommit = False)**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.exasol.exasol.ExasolExecute.run (user="", password="", dsn="", query=None, query_params=None, autocommit=False, commit=True, **kwargs)[source] |
Task run method. Executes a query against Exasol database.
|
# ExasolImportFromIterable
class
prefect.tasks.exasol.exasol.ExasolImportFromIterable
(dsn="", dsn_secret="", user_secret="", password_secret="", target_schema=None, target_table=None, data=None, import_params=None, autocommit=False, commit=True, **kwargs)[source]Task for importing a iterable with data into the Exasol database.
Args:
dsn (str, optional)
: dsn string of the database (server:port)dsn_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol dsn connection string (server:port)user_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol user namepassword_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol passwordtarget_schema (str, optional)
: target schema for importing datatarget_table (str, optional)
: target table for importing datadata (Iterable, optional)
: an iterable which holds the import dataimport_params (dict, optional)
: custom parameters for IMPORT queryautocommit (bool, optional)
: turn autocommit on or off (default: False)commit (bool, optional)
: set to True to commit transaction, defaults to false (only necessary if autocommit = False)**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.exasol.exasol.ExasolImportFromIterable.run (user="", password="", dsn="", target_schema=None, target_table=None, data=None, import_params=None, autocommit=False, commit=True, **kwargs)[source] |
Task run method. Executes a query against Postgres database.
|
# ExasolExportToFile
class
prefect.tasks.exasol.exasol.ExasolExportToFile
(dsn="", dsn_secret="", user_secret="", password_secret="", destination=None, query_or_table=None, query_params=None, export_params=None, **kwargs)[source]Task for exporting data of an Exasol database into a single csv.
Args:
dsn (str, optional)
: dsn string of the database (server:port)dsn_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol dsn connection string (server:port)user_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol user namepassword_secret (str, optional)
: the name of the Prefect Secret that stores the Exasol passworddestination ([str, Path], optional)
: Path to file or file-like objectquery_or_table (str, optional)
: SQL query or table for export could be: 1. SELECT * FROM S.T 2. tablename 3. (schemaname, tablename)query_params (dict, optional)
: Values for SQL query placeholdersexport_params (dict, optional)
: custom parameters for EXPORT query**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.exasol.exasol.ExasolExportToFile.run (user="", password="", dsn="", destination=None, query_or_table=None, query_params=None, export_params=None, **kwargs)[source] |
Task run method. Executes a query against Postgres database.
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC