Skip to main content

dag_generator.results.pg_result

PgResult Objects

class PgResult(BaseResult)

The result stored in the Postgres database

get_table_name

def get_table_name(context)

Return the full name of the table with work

write_df

def write_df(obj: DataFrame, context: dict) -> None

Write DataFrame to the database

Arguments:

  • obj: Dataset for writing
  • context: context

write

def write(obj: Any, context: dict) -> None

Write DataFrame to the database. Sends a call to write_df

Arguments:

  • obj: Dataset for writing
  • context: context

Raises:

  • TypeError: If the input dataset type is not DataFrame

read_df

def read_df(context: dict) -> DataFrame

Read DataFrame from teh database. Sends a call to work.read_df

Arguments:

  • context: context

Returns:

DataFrame

read

def read(context: dict) -> DataFrame

Read DataFrame from the database. Sends a call to work.read_df

Arguments:

  • context: context

Returns:

DataFrame