# 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="", user="", password="", 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)user (str, optional, DEPRECATED)
: user name used to authenticate. Deprecated, should be passed at runtime instead.password (str, optional, DEPRECATED)
: password used to authenticate. Deprecated, should be passed at runtime instead.fetch (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="", user="", password="", 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)user (str, optional, DEPRECATED)
: user name used to authenticate. Deprecated, should be passed at runtime instead.password (str, optional, DEPRECATED)
: password used to authenticate. Deprecated, should be passed at runtime instead.query (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="", user="", password="", 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)user (str, optional, DEPRECATED)
: user name used to authenticate. Deprecated, should be passed at runtime instead.password (str, optional, DEPRECATED)
: password used to authenticate. Deprecated, should be passed at runtime instead.target_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="", user="", password="", 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)user (str, optional, DEPRECATED)
: user name used to authenticate. Deprecated, should be passed at runtime instead.password (str, optional, DEPRECATED)
: password used to authenticate. Deprecated, should be passed at runtime instead.destination ([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 n/a
on July 1, 2021 at 18:35 UTC