src/dirbs/reports/stats_generator.py
def _store_report_data_metadata(conn, month, year, class_run_id):
    """Store new metadata about this data generation run and return the data_id for stats storage."""
    with conn.cursor() as cursor:
        cursor.execute("""INSERT INTO report_data_metadata(data_date, report_year, report_month,
                                                           data_schema_version, class_run_id)
                                      VALUES(%s, %s, %s, %s, %s)
                            RETURNING data_id""",
                       [datetime.date.today(), year, month, report_schema_version, class_run_id])
        return cursor.fetchone()[0]
Store new metadata about this data generation run and return the data_id for stats storage.
Store new metadata about this data generation run and return the data_id for stats storage.
Store new metadata about this data generation run and return the data_id for stats storage .
def _store_report_data_metadata(conn, month, year, class_run_id):
    with conn.cursor() as cursor:
        cursor.execute("""INSERT INTO report_data_metadata(data_date, report_year, report_month,
                                                           data_schema_version, class_run_id)
                                      VALUES(%s, %s, %s, %s, %s)
                            RETURNING data_id""",
                       [datetime.date.today(), year, month, report_schema_version, class_run_id])
        return cursor.fetchone()[0]
def _store_report_data_metadata ( conn , month , year , class_run_id ) : with conn . cursor ( ) as cursor : cursor . execute ( """INSERT INTO report_data_metadata(data_date, report_year, report_month,
                                                           data_schema_version, class_run_id)
                                      VALUES(%s, %s, %s, %s, %s)
                            RETURNING data_id""" , [ datetime . date . today ( ) , year , month , report_schema_version , class_run_id ] ) return cursor . fetchone ( ) [ 0 ]
Store new metadata about this data generation run and return the data_id for stats storage.
Store new metadata about this data generation run and return the data_id for stats storage .
"""Store new metadata about this data generation run and return the data_id for stats storage."""
conn
month
year
class_run_id