32
32
*/
33
33
public class AuthSnippets {
34
34
35
- // [START default_credentials ]
35
+ // [START bigquery_client_default_credentials ]
36
36
public static void implicit () {
37
37
// Instantiate a client. If you don't specify credentials when constructing a client, the
38
38
// client library will look for credentials in the environment, such as the
@@ -45,9 +45,9 @@ public static void implicit() {
45
45
System .out .printf ("%s%n" , dataset .getDatasetId ().getDataset ());
46
46
}
47
47
}
48
- // [END default_credentials ]
48
+ // [END bigquery_client_default_credentials ]
49
49
50
- // [START explicit_service_account ]
50
+ // [START bigquery_client_json_credentials ]
51
51
public static void explicit () throws IOException {
52
52
// Load credentials from JSON key file. If you can't set the GOOGLE_APPLICATION_CREDENTIALS
53
53
// environment variable, you can explicitly load the credentials file to construct the
@@ -68,7 +68,7 @@ public static void explicit() throws IOException {
68
68
System .out .printf ("%s%n" , dataset .getDatasetId ().getDataset ());
69
69
}
70
70
}
71
- // [END explicit_service_account ]
71
+ // [END bigquery_client_json_credentials ]
72
72
73
73
public static void main (String ... args ) throws IOException {
74
74
boolean validArgs = args .length == 1 ;
0 commit comments