docs(samples): add query external bigtable using temp table#763
Conversation
|
Hi @billyjacobson -- PTAL as well! Thank you. |
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
| queryExternalBigtableTemp(tableName, sourceUri, query); | ||
| } | ||
|
|
||
| public static void queryExternalBigtableTemp(String tableName, String sourceUri, String query) { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
| .setType("STRING") | ||
| .setEncoding("TEXT") | ||
| .build(); | ||
| BigtableColumnFamily usStates = |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
we could first instantiate an empty BigtableColumnFamily object and then add columns to it.
samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/bigquery/QueryExternalBigtableTempIT.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigquery/QueryExternalBigtableTemp.java
Outdated
Show resolved
Hide resolved
|
LGTM -- @billyjacobson PTAL |
| String bigqueryTableName = "MY_TABLE_NAME"; | ||
| String sourceUri = | ||
| String.format( | ||
| "https://googleapis.com/bigtable/projects/%s/instances/%s/tables/%s", |
There was a problem hiding this comment.
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 ```
samples/snippets/src/test/java/com/example/bigquery/QueryExternalBigtableTempIT.java
Outdated
Show resolved
Hide resolved
🤖 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).
No description provided.