To configure a data source using the example files, you will need to create a data source definition. The content required to create a data source definition is divided into three sections.
First, you will need to import the DataSource class. For example:
Next, you will need to set the values and define the data source. For example, the following definition contains the minimum properties required for a connection:
GoogleBigQueryDataSource mds = new GoogleBigQueryDataSource();
mds.setDescription("My Google BigQuery Datasource");
mds.setProject("myproject");
mds.setDataset("mydataset");
mds.setAccessToken("abcdefghi12345678");
mds.setRefreshToken("wxyz123456789");
mds.setClientID("123abc.apps.googleusercontent.com");
mds.setClientSecret("ab123xy");
Optionally, configure the example application to print out the data source attributes. Note that this code is specific to the driver and should only be used in the example application. For example, you would add the following section for a binary connection using only the minimum properties: