Esempio n. 1
0
def store_upload_dataframe_in_db(data_frame, pk):
    """
    Given a dataframe and the primary key of a workflow, it dumps its content on
    a table that is rewritten every time.

    :param data_frame: Pandas data frame containing the data
    :param pk: The unique key for the workflow
    :return: If temporary = True, then return a list with three lists:
             - column names
             - column types
             - column is unique
             If temporary = False, return None. All this infor is stored in
             the workflow
    """
    return store_table_in_db(data_frame, pk, create_upload_table_name(pk),
                             True)
Esempio n. 2
0
def load_upload_from_db(pk):
    return load_table(create_upload_table_name(pk))
Esempio n. 3
0
def workflow_has_upload_table(workflow_item):
    return is_table_in_db(create_upload_table_name(workflow_item.id))