# SQLite Tasks


# SQLiteQuery

class

prefect.tasks.database.sqlite.SQLiteQuery

(db, query=None, **kwargs)[source]

Task for executing a single query against a sqlite3 database; returns the result (if any) from the query.

Args:

  • db (str): the location of the database (.db) file
  • query (str, optional): the optional default query to execute at runtime; can also be provided as a keyword to run, which takes precedence over this default. Note that a query should consist of a single SQL statement.
  • **kwargs (optional): additional keyword arguments to pass to the standard Task initalization

methods:                                                                                                                                                       

prefect.tasks.database.sqlite.SQLiteQuery.run

(query=None)[source]

Args:

  • query (str, optional): the optional query to execute at runtime; if not provided, self.query will be used instead. Note that a query should consist of a single SQL statement.
Returns:
  • [Any]: the results of the query



# SQLiteScript

class

prefect.tasks.database.sqlite.SQLiteScript

(db, script=None, **kwargs)[source]

Task for executing a SQL script against a sqlite3 database.

Args:

  • db (str): the location of the database (.db) file
  • script (str, optional): the optional default script string to render at runtime; can also be provided as a keyword to run, which takes precedence over this default.
  • **kwargs (optional): additional keyword arguments to pass to the standard Task initialization

methods:                                                                                                                                                       

prefect.tasks.database.sqlite.SQLiteScript.run

(script=None)[source]

Args:

  • script (str, optional): the optional script to execute at runtime; if not provided, self.script will be used instead.



This documentation was auto-generated from commit n/a
on May 14, 2020 at 21:12 UTC