# Firebolt Tasks


This module contains a collection of tasks for interacting with Firebolt databases via the firebolt-python-sdk library.

# FireboltQuery

class

prefect.tasks.firebolt.firebolt.FireboltQuery

(database=None, username=None, password=None, engine_name=None, query=None, **kwargs)[source]

Task for executing a query against a Firebolt database.

Args:

  • database (str): name of the database to use.
  • username (str): username used to authenticate.
  • password (str): password used to authenticate.
  • engine_name (str): name of the engine to use.
  • query (str): query to execute against database.
  • **kwargs (dict, optional): additional keyword arguments to pass to the Task constructor.

methods:                                                                                                                                                       

prefect.tasks.firebolt.firebolt.FireboltQuery.run

(database=None, username=None, password=None, engine_name=None, query=None)[source]

Task run method. Executes a query against Firebolt database.

Args:

  • database (str): name of the database to use.
  • username (str): username used to authenticate.
  • password (str): password used to authenticate.
  • engine_name (str): name of the engine to use.
  • query (str): query to execute against database.
Returns:
  • List[List]: output of 'cursor.fetchall()' if 'cursor.execute(query)' > 0, else an empty list
Raises:
  • ValueError: if a required parameter is not supplied.
  • DatabaseError: if exception occurs when executing the query.



This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC