def test_get_target_path(self): bq_target = bigquery.BigQueryTarget("p", "d", "t", client="fake_client") self.assertEqual(SimpleTestTask.get_target_path(bq_target), "p:d.t") gcs_target = gcs.GCSTarget("gs://foo/bar.txt", client="fake_client") self.assertEqual(SimpleTestTask.get_target_path(gcs_target), "gs://foo/bar.txt") with self.assertRaises(ValueError): SimpleTestTask.get_target_path("not_a_target")
def output(self): return bigquery.BigQueryTarget(PROJECT_ID, DATASET_ID, self.table, client=self.client)
def output(self): return bigquery.BigQueryTarget(PROJECT_ID, self.dataset, self.table, location=self.location)
def output(_): return bigquery.BigQueryTarget(PROJECT_ID, DATASET_ID, self.table_id)
def output(_): return bigquery.BigQueryTarget(PROJECT_ID, DATASET_ID, self.table_id, location=EU_LOCATION)
def output(self): return bigquery.BigQueryTarget(project_id, dataset_id, 'rich_fines')
def output(self): return bigquery.BigQueryTarget(self.project, self.dataset, self.table, client=self.client)