Пример #1
0
def create_empty_cdm_tables(snapshot_dataset_id):
    """
    Copy the table content from the current dataset to the snapshot dataset
    :param snapshot_dataset_id:
    :return:
    """
    cdm.create_all_tables(snapshot_dataset_id)
    cdm.create_vocabulary_tables(snapshot_dataset_id)
Пример #2
0
def create_empty_cdm_tables(snapshot_dataset_id, hpo_id=None):
    """
    Copy the table content from the current dataset to the snapshot dataset
    :param snapshot_dataset_id:
    :param hpo_id: Identifies the hpo_id of the site table
    :return:
    """
    for table in resources.CDM_TABLES:
        table_id = resources.get_table_id(table, hpo_id)
        table_name = table
        create_standard_table(table_name,
                              table_id,
                              drop_existing=True,
                              dataset_id=snapshot_dataset_id)
    if not hpo_id:
        cdm.create_vocabulary_tables(snapshot_dataset_id)
Пример #3
0
def create_empty_cdm_tables(snapshot_dataset_id, dataset_id):
    """
    Copy the table content from the current dataset to the snapshot dataset
    :param snapshot_dataset_id:
    :param dataset_id
    :return:
    """
    for table in resources.CDM_TABLES:
        if table == PERSON and has_at_birth_column(dataset_id):
            table_id = table
            table_name = 'post_deid_person'
        else:
            table_id = table
            table_name = table
        create_standard_table(table_name,
                              table_id,
                              drop_existing=True,
                              dataset_id=snapshot_dataset_id)
    cdm.create_vocabulary_tables(snapshot_dataset_id)