GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs(samples): add query external bigtable using temp table by pmakani · Pull Request #763 · googleapis/java-bigquery

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@pmakani

@pmakani pmakani commented Sep 30, 2020

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Praful Makani
docs(samples): add query external bigtable using temp table
0e269f4
@pmakani
pmakani requested a review from stephaniewang526 September 30, 2020 11:55
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 30, 2020
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 30, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 30, 2020
@stephaniewang526

stephaniewang526 commented Sep 30, 2020

Copy link
Copy Markdown
Contributor

Hi @billyjacobson -- PTAL as well! Thank you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephaniewang526
stephaniewang526 marked this pull request as ready for review September 30, 2020 15:54
@stephaniewang526
stephaniewang526 requested a review from a team September 30, 2020 15:54
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 30, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 30, 2020
stephaniewang526
stephaniewang526 approved these changes Sep 30, 2020
View reviewed changes
@codecov

codecov Bot commented Sep 30, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #763 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #763      +/-   ##
============================================
- Coverage     80.40%   80.39%   -0.01%     
- Complexity     1263     1265       +2     
============================================
  Files            79       79              
  Lines          6517     6525       +8     
  Branches        740      743       +3     
============================================
+ Hits           5240     5246       +6     
- Misses          888      889       +1     
- Partials        389      390       +1     
Impacted Files Coverage Δ Complexity Δ
...main/java/com/google/cloud/bigquery/FieldList.java 100.00% <0.00%> (ø) 11.00% <0.00%> (ø%)
...google/cloud/bigquery/ExternalTableDefinition.java 58.55% <0.00%> (+0.46%) 21.00% <0.00%> (+2.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c5bdad...691519b. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

billyjacobson
billyjacobson reviewed Sep 30, 2020
View reviewed changes
Comment thread samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java
queryExternalBigtableTemp(tableName, sourceUri, query);
}

public static void queryExternalBigtableTemp(String tableName, String sourceUri, String query) {

@billyjacobson billyjacobson Sep 30, 2020

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

we have a sample schema for bigtable we've been using that would be good to include here so it feels a little more realistic. I'll send you a doc with the schema

table name: mobile-time-series
column families: stats_summary
columns: os_build (STRING), os_name (STRING)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@stephaniewang526 stephaniewang526 Oct 2, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

https://github.com/googleapis/java-bigtable/blob/master/samples/snippets/src/test/java/com/example/bigtable/ReadsTest.java
Let's stick to the existing table schema as shown above instead of using our own schema and stream in data in the beforeClass() method. We can keep the table name as bigquery-samples-test

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java Outdated
.setType("STRING")
.setEncoding("TEXT")
.build();
BigtableColumnFamily usStates =

@billyjacobson billyjacobson Sep 30, 2020

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Could you define the column family first and then add the columns and build after? It will make more sense for someone from Bigtable following since column families are the higher level grouping

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@pmakani pmakani Oct 1, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@billyjacobson It's not possible to main order, because first we need to create an object of BigtableColumn then we can set those columns in BigtableColumnFamily.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@stephaniewang526 stephaniewang526 Oct 2, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

we could first instantiate an empty BigtableColumnFamily object and then add columns to it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/test/java/com/example/bigquery/QueryExternalBigtableTempIT.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@billyjacobson billyjacobson mentioned this pull request Sep 30, 2020
docs(samples): add query external bigtable using permanent table #764
Merged
Praful Makani
docs(samples): address feedback
8d5e151
@product-auto-label product-auto-label Bot added api: bigquery Issues related to the googleapis/java-bigquery API. samples Issues that are directly related to samples. labels Oct 1, 2020
stephaniewang526
stephaniewang526 reviewed Oct 2, 2020
View reviewed changes
Comment thread samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@stephaniewang526
nit
0dd2386
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 2, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 2, 2020
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 2, 2020
Praful Makani
docs(samples): address comments
ed68887
@pmakani
pmakani requested review from a team October 5, 2020 11:23
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2020
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2020
@stephaniewang526

stephaniewang526 commented Oct 5, 2020

Copy link
Copy Markdown
Contributor

LGTM -- @billyjacobson PTAL

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2020
stephaniewang526
stephaniewang526 reviewed Oct 6, 2020
View reviewed changes
Comment thread samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java
String bigqueryTableName = "MY_TABLE_NAME";
String sourceUri =
String.format(
"https://googleapis.com/bigtable/projects/%s/instances/%s/tables/%s",

@stephaniewang526 stephaniewang526 Oct 6, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This seems to be causing issue:

com.google.api.gax.rpc.NotFoundException: io.grpc.StatusRuntimeException: NOT_FOUND: Failed to read: projects/{779844219229}/instances/bigquery-samples-instance
Caused by: io.grpc.StatusRuntimeException: NOT_FOUND: Failed to read: projects/{779844219229}/instances/bigquery-samples-instance ```

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
stephaniewang526
stephaniewang526 reviewed Oct 6, 2020
View reviewed changes
Comment thread samples/snippets/src/test/java/com/example/bigquery/QueryExternalBigtableTempIT.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

billyjacobson
billyjacobson approved these changes Oct 6, 2020
View reviewed changes
@stephaniewang526
update projectId
691519b
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 6, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 6, 2020
@stephaniewang526 stephaniewang526 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 6, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 6, 2020
@stephaniewang526
stephaniewang526 merged commit fed28c7 into googleapis:master Oct 6, 2020
@pmakani
pmakani deleted the query-external-bigtable-temp branch October 7, 2020 05:28
gcf-merge-on-green Bot pushed a commit that referenced this pull request Oct 9, 2020
@release-please
chore: release 1.122.2 (#784)
8469d31
🤖 I have created a release \*beep\* \*boop\* 
---
### [1.122.2](https://www.github.com/googleapis/java-bigquery/compare/v1.122.1...v1.122.2) (2020-10-08)


### Bug Fixes

* bigquery exception get reason and message ([#788](https://www.github.com/googleapis/java-bigquery/issues/788)) ([d783c3a](https://www.github.com/googleapis/java-bigquery/commit/d783c3a2baf80da2aa48c6be555904bd3c33bb1a))


### Documentation

* **samples:** add query external bigtable using permanent table ([#764](https://www.github.com/googleapis/java-bigquery/issues/764)) ([257edfc](https://www.github.com/googleapis/java-bigquery/commit/257edfc14ef09efc4474eb5aba08ccf4d7c199c0))
* **samples:** add query external bigtable using temp table ([#763](https://www.github.com/googleapis/java-bigquery/issues/763)) ([fed28c7](https://www.github.com/googleapis/java-bigquery/commit/fed28c78ca4b70569d5148e67522b0f39321b306))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@stephaniewang526 stephaniewang526 stephaniewang526 approved these changes
@billyjacobson billyjacobson billyjacobson approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: bigquery Issues related to the googleapis/java-bigquery API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@pmakani @stephaniewang526 @billyjacobson @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.