Is it possible to create and run a bigquery temp table locally in memory?

user3509528 :

I'm trying to create a local temp bigquery table in memory for testing purposes. I'm doing this in Java. I'm not finding a ton of info on this, it seems like BigQueryOptions.getDefaultInstance().getService() could do it, but the docs say that it looks for the GOOGLE_APPLICATION_CREDENTIALS environment variable for where to go.

Is there a way to do it locally?

Felipe Hoffa :

If you are working with Java and you are looking for a way to create unit tests with a mock of BigQuery, there's a GitHub project with a class that could do that for you:

BigQueryUtilsTest.java relies on Mockito and it's under an Apache-2.0 license (if you need to modify it for your environment).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=105037&siteId=1