Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit bb46a02

Browse files
committed
feat: Partial Projection of Table Metadata
1 parent d178593 commit bb46a02

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/BigQueryRpc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ enum Option {
5656
START_INDEX("startIndex"),
5757
STATE_FILTER("stateFilter"),
5858
TIMEOUT("timeoutMs"),
59-
REQUESTED_POLICY_VERSION("requestedPolicyVersion");
59+
REQUESTED_POLICY_VERSION("requestedPolicyVersion"),
60+
TABLE_METADATA_VIEW("view");
6061

6162
private final String value;
6263

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,11 @@ public void testCreateAndGetTable() {
15151515
assertNotNull(createdTable);
15161516
assertEquals(DATASET, createdTable.getTableId().getDataset());
15171517
assertEquals(tableName, createdTable.getTableId().getTable());
1518-
Table remoteTable = bigquery.getTable(DATASET, tableName);
1518+
// TableOption tableOption = new TableOption(TableField.VIEW, "FULL");
1519+
BigQuery.TableOption TABLE_OPTION_FIELDS = BigQuery.TableOption.fields(TableField.VIEW);
1520+
Table remoteTable = bigquery.getTable(DATASET, tableName, TABLE_OPTION_FIELDS);
1521+
System.out.println("Penguins");
1522+
System.out.println(remoteTable);
15191523
assertNotNull(remoteTable);
15201524
assertTrue(remoteTable.getDefinition() instanceof StandardTableDefinition);
15211525
assertEquals(createdTable.getTableId(), remoteTable.getTableId());

0 commit comments

Comments
 (0)