jeudi 24 mai 2018

How to use BigQuery Java API against local fake BigQuery server?

Suppose I am writing an application that works against BigQuery using BigQuery Java API.

I would like to use a "fake" BigQuery server running locally to test the application instead of working against a test project in Google Cloud.

Suppose I am running such a server and it's base URL is http://localhost:9001. Now I am creating an instance of BigQuery like this:

val bq = BigQueryOptions.newBuilder()
           .setCredentials(credentials)
           .build()
           .getService

How should I change that code to work against my fake server ?

Aucun commentaire:

Enregistrer un commentaire