Exemplo n.º 1
0
def upload_ccgs_and_practices():
    """Upload CCGs and Practices to BQ."""

    table = Client("hscic").get_table("ccgs")
    table.insert_rows_from_pg(PCT,
                              schemas.CCG_SCHEMA,
                              transformer=schemas.ccgs_transform)
    table = Client("hscic").get_table("practices")
    table.insert_rows_from_pg(Practice, schemas.PRACTICE_SCHEMA)
def upload_ccgs_and_practices():
    '''Upload CCGs and Practices to BQ.'''

    table = Client('hscic').get_table('ccgs')
    columns = [field.name for field in schemas.CCG_SCHEMA]
    table.insert_rows_from_pg(PCT, columns, schemas.ccgs_transform)
    table = Client('hscic').get_table('practices')
    columns = [field.name for field in schemas.PRACTICE_SCHEMA]
    table.insert_rows_from_pg(Practice, columns)