Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Jun 23, 2023
1 parent 85a6b8a commit e2f20dd
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigInteger;
Expand Down Expand Up @@ -2868,24 +2867,25 @@ public void testTestIamPermissionsWhenNoPermissionsGranted() {
}

@Test
public void testSumeet() throws Exception{
public void testSumeet() throws Exception {
String projectId = "scio-apps";
String datasetId = "staging";
String tableName = "processed_visits";
FileInputStream stream = new FileInputStream("/Users/sumeet/revefi/creds/bigquery-glean.json");
getBqTable(stream, projectId, datasetId, tableName);
}

private static void getBqTable(FileInputStream stream, String projectId, String datasetId, String tableName) throws Exception{
BigQuery bigquery = BigQueryOptions.
newBuilder()
.setCredentials(ServiceAccountCredentials
.fromStream(stream))
private static void getBqTable(
FileInputStream stream, String projectId, String datasetId, String tableName)
throws Exception {
BigQuery bigquery =
BigQueryOptions.newBuilder()
.setCredentials(ServiceAccountCredentials.fromStream(stream))
.build()
.getService();

Table table = bigquery.getTable(TableId.of(projectId, datasetId, tableName));
// var json = WRITER.writeValueAsString(table);
// var json = WRITER.writeValueAsString(table);
System.out.println(table.getNumTotalLogicalBytes());
}
}

0 comments on commit e2f20dd

Please sign in to comment.