ploomber.products.GenericSQLRelation

class ploomber.products.GenericSQLRelation(identifier, client=None)

A GenericProduct whose identifier is a SQL relation, uses SQLite as metadata backend

Parameters
  • identifier (tuple of length 3) – A tuple with (schema, name, kind) where kind must be either ‘table’ or ‘view’

  • client (ploomber.clients.DBAPIClient or SQLAlchemyClient, optional) – The client used to store metadata for this product. Only required if no dag-level client has been declared using dag.clients[class]

See also

ploomber.products.SQRelation

SQL relation (table or view) with no metadata.

Methods

delete([force])

Deletes the product

download()

exists()

This method returns True if the product exists, it is not part of the metadata, so there is no cached status

fetch_metadata()

render(params, **kwargs)

Render Product - this will render contents of Templates used as identifier for this Product, if a regular string was passed, this method has no effect

save_metadata(metadata)

to_json_serializable()

Returns a JSON serializable version of this product

upload()

delete(force=False)

Deletes the product

download()
exists()

This method returns True if the product exists, it is not part of the metadata, so there is no cached status

fetch_metadata()
render(params, **kwargs)

Render Product - this will render contents of Templates used as identifier for this Product, if a regular string was passed, this method has no effect

save_metadata(metadata)
to_json_serializable()

Returns a JSON serializable version of this product

upload()

Attributes

client

kind

name

Used as identifier in the database

schema

task