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

docs(samples): add omni query on external table aws#830

Closed
pmakani wants to merge 4 commits into
googleapis:masterfrom
pmakani:QueryExternalTableAws
Closed

docs(samples): add omni query on external table aws#830
pmakani wants to merge 4 commits into
googleapis:masterfrom
pmakani:QueryExternalTableAws

Conversation

@pmakani

@pmakani pmakani commented Oct 20, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@pmakani pmakani requested review from a team and stephaniewang526 October 20, 2020 13:30
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 20, 2020
String datasetName = "MY_DATASET_NAME";
String tableName = "MY_TABLE_NAME";
// Create a aws connection
// projects/{project_id}/locations/{location_id}/connections/{connection_id}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really an AWS connection string?

@lesv lesv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few Q's, please answer / consider, otherwise LGTM

.forEach(row -> row.forEach(val -> System.out.printf("%s,", val.toString())));

System.out.println("Query on aws external permanent table performed successfully.");
} catch (BigQueryException | InterruptedException e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that your showing BigQueryException | InterruptedException here, but should we just propagate them, rather than catching and printing stuff?

Comment on lines +50 to +52
String query =
String.format(
"SELECT * FROM s%:%s.%s WHERE name LIKE 'W%%'", projectId, datasetName, tableName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you mention that this is searching for things starting w/ "W" here?

@stephaniewang526

Copy link
Copy Markdown
Contributor

Fixing all the issues in #835 835

@pmakani pmakani deleted the QueryExternalTableAws branch October 21, 2020 07:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

3 participants