[ 
https://issues.apache.org/jira/browse/BEAM-6014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16679156#comment-16679156
 ] 

Valentyn Tymofieiev commented on BEAM-6014:
-------------------------------------------

I checked the output with
{noformat}
bq show $PROJECT:$BQ_DATASET.$TABLE_NAME{noformat}
However, BigQuery console shows that that streaming buffer is not empty:
{noformat}
Streaming buffer statistics
Estimated size   48 B
Estimated rows   12
{noformat}
And we can indeed get the data if we run:
{noformat}
bq query "select * from $BQ_DATASET.$TABLE_NAME"
Waiting on bqjob_r282d5c07653cf8ac_00000166f0f84ff3_1 ... (0s) Current status: 
DONE
+-------+---------------+
| month | tornado_count |
+-------+---------------+
|     7 |             8 |
|     4 |             5 |
|     5 |             6 |
|    11 |             9 |
|     9 |             7 |
|     2 |             7 |
|    12 |            10 |
|     1 |            16 |
|     6 |             5 |
|     3 |             6 |
|     8 |             4 |
|    10 |            10 |
+-------+---------------+
{noformat}

> bigquery_tornadoes example does not work on Python Direct Runner
> ----------------------------------------------------------------
>
>                 Key: BEAM-6014
>                 URL: https://issues.apache.org/jira/browse/BEAM-6014
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Ahmet Altay
>            Priority: Major
>
> Steps to reproduce:
>  
> {noformat}
> <Make new virtual env, install apache-beam[gcp] >
>  
> PROJECT=$(gcloud config get-value project)
> BQ_DATASET=${USER}_bq_dataset
> TABLE_NAME=out
> bq rm -rf --project=$PROJECT $BQ_DATASET
> bq mk --project=$PROJECT $BQ_DATASET
> python -m apache_beam.examples.cookbook.bigquery_tornadoes --output 
> $BQ_DATASET.$TABLE_NAME --project=$PROJECT
> bq show $PROJECT:$BQ_DATASET.$TABLE_NAME
> {noformat}
> {noformat}
>  Last modified Schema Total Rows Total Bytes Expiration Time Partitioning 
> Labels 
>  ----------------- --------------------------- ------------ ------------- 
> ------------ ------------------- -------- 
>  07 Nov 14:45:23 |- month: integer 0 0 
>  |- tornado_count: integer
> {noformat}
>  
> The resulting Database is empty, however it has several rows if we run the 
> example with Dataflow runner.
> Older versions of SDK also seem to have this problem.
> cc: [~chamikara], [~charleschen].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to