Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

fix(samples): bug fix for removing buckets from bq. #548

Merged
merged 14 commits into from
Sep 26, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ public static void main(String[] args) throws IOException, InterruptedException
String branchName =
dfirova marked this conversation as resolved.
Show resolved Hide resolved
String.format(
"projects/%s/locations/global/catalogs/default_catalog/branches/0", projectId);
// TO CHECK ERROR HANDLING PASTE THE INVALID BRANCH NAME HERE:
// branchName = "invalid_branch_name";
String datasetId = "products";
String tableId = "products";
dfirova marked this conversation as resolved.
Show resolved Hide resolved
// TO CHECK ERROR HANDLING USE THE TABLE WITH INVALID PRODUCTS:
// tableId = "products_some_invalid"
// tableId = "products_some_invalid";

importProductsFromBigQuery(projectId, branchName, datasetId, tableId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void main(String[] args) throws IOException {
String validProductsSourceFile =
ProductsCreateBigqueryTable.class.getResource("/products.json").getPath();
String invalidProductsSourceFile =
ProductsCreateBigqueryTable.class.getResource("products_some_invalid.json").getPath();
ProductsCreateBigqueryTable.class.getResource("/products_some_invalid.json").getPath();

BufferedReader bufferedReader = new BufferedReader(new FileReader(productSchemaFilePath));
String jsonToString = bufferedReader.lines().collect(Collectors.joining());
Expand Down