ahmedabu98 commented on code in PR #39597:
URL: https://github.com/apache/beam/pull/39597#discussion_r3816218829


##########
sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/BigQueryManagedTableCrossEngineIT.java:
##########
@@ -136,24 +137,47 @@ public void testManagedIcebergReadByThreePartName() 
throws IOException {
             .put(
                 "catalog_properties",
                 ImmutableMap.<String, String>builder()
-                    .put("gcp_project", PROJECT)
-                    .put("gcp_location", connectionLocation())
-                    .put("warehouse", STORAGE_URI_ROOT)
-                    .put("catalog-impl", 
"org.apache.iceberg.gcp.bigquery.BigQueryMetastoreCatalog")
+                    .put("type", "rest")
+                    .put("uri", 
"https://biglake.googleapis.com/iceberg/v1/restcatalog";)
+                    .put(
+                        "warehouse",
+                        String.format(
+                            "bq://projects/%s/locations/%s", PROJECT, 
connectionLocation()))
+                    .put("header.x-goog-user-project", PROJECT)
+                    .put("rest-metrics-reporting-enabled", "false")
                     .put("io-impl", "org.apache.iceberg.gcp.gcs.GCSFileIO")
+                    .put("rest.auth.type", 
"org.apache.iceberg.gcp.auth.GoogleAuthManager")
                     .build())
             .build();
 
+    List<String> expected =
+        LongStream.range(0, 10).mapToObj(i -> i + "|row_" + 
i).collect(Collectors.toList());
+
     Pipeline p = Pipeline.create(TestPipeline.testingPipelineOptions());
-    PCollection<String> rows =
-        p.apply(Managed.read(Managed.ICEBERG).withConfig(config))
+    PCollection<String> icebergRead =
+        p.apply("Iceberg read", 
Managed.read(Managed.ICEBERG).withConfig(config))
             .getSinglePCollection()
             .apply(
+                "canonicalize iceberg",
                 MapElements.into(TypeDescriptors.strings())
                     .via(row -> row.getInt64("id") + "|" + 
row.getString("name")));
-    PAssert.that(rows)
-        .containsInAnyOrder(
-            LongStream.range(0, 10).mapToObj(i -> i + "|row_" + 
i).collect(Collectors.toList()));
+    PAssert.that(icebergRead).containsInAnyOrder(expected);
+
+    // The same table read through the BigQuery lens, addressed 
project.dataset.table.
+    PCollection<String> bigQueryRead =
+        p.apply(
+                "BigQuery read",
+                Managed.read(Managed.BIGQUERY)
+                    .withConfig(
+                        ImmutableMap.of(
+                            "table", String.format("%s.%s.%s", PROJECT, 
DATASET_ID, table))))

Review Comment:
   PCNT is only for Lakehouse IRC so we can ignore it here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to