Exemplo n.º 1
0
 def setup(self, project, credentials, random_dataset_id):
     # - PER-TEST FIXTURES -
     # put here any instruction you want to be run *BEFORE* *EVERY* test is
     # executed.
     self.credentials = credentials
     self.gbq_connector = gbq.GbqConnector(project, credentials=credentials)
     self.bqclient = self.gbq_connector.client
     self.table = gbq._Table(project,
                             random_dataset_id,
                             credentials=credentials)
     self.destination_table = "{}.{}".format(random_dataset_id, TABLE_ID)
Exemplo n.º 2
0
def _make_connector(project_id="some-project", **kwargs):
    return gbq.GbqConnector(project_id, **kwargs)
Exemplo n.º 3
0
 def setup(self, project, credentials):
     # - PER-TEST FIXTURES -
     # put here any instruction you want to be run *BEFORE* *EVERY* test is
     # executed.
     self.gbq_connector = gbq.GbqConnector(project, credentials=credentials)
     self.credentials = credentials
Exemplo n.º 4
0
def gbq_connector(project, credentials):
    from pandas_gbq import gbq

    return gbq.GbqConnector(project, credentials=credentials)