GithubHelp home page GithubHelp logo

Comments (14)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
The number of rows in the table currently seems to be 51384 (both using sql as 
well as from API).  Could you please provide a bit more information on the API 
call that you are performing that shows 57672 rows?

Original comment by [email protected] on 13 Apr 2016 at 5:00

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
[deleted comment]

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
[deleted comment]

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
[deleted comment]

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
> The number of rows in the table currently seems to be 51384 (both using sql 
as well as from API)

My colleague retried to load, and removed the old table since correct data was 
required for data analysis. That should be why.
I asked him to  copy and keep a bad table next time (we encounter this 
phenomenon about 3 times per day)

> Could you please provide a bit more information on the API call that you are 
performing that shows 57672 rows?

The body of load job api is like this 
https://github.com/embulk/embulk-output-bigquery/blob/7698ef320a78dd93ec79a512d5
18daec8865d3bc/lib/embulk/output/bigquery/bigquery_client.rb#L152-L170

       body = {
          configuration: {
            load: {
              destination_table: {
                project_id: @project,
                dataset_id: @dataset,
                table_id: table,
              },
              schema: {
                fields: fields,
              },
              write_disposition: 'WRITE_APPEND',
              source_format:         'NEWLINE_DELIMITED_JSON',
              max_bad_records:       0,
              field_delimiter:       nil,
              encoding:              'UTF-8',
              ignore_unknown_values: false,
              allow_quoted_newlines: false,
            }
        }
        opts = {
          upload_source: path,
          content_type: "application/octet-stream",
        }

and issue this load job in parallel to one temporary table.


Original comment by [email protected] on 13 Apr 2016 at 5:58

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
get_table API is just like this > 
https://github.com/embulk/embulk-output-bigquery/blob/7698ef320a78dd93ec79a512d5
18daec8865d3bc/lib/embulk/output/bigquery/bigquery_client.rb#L380. Nothing is 
special.

Original comment by [email protected] on 13 Apr 2016 at 6:01

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
I found some information from the history of the table. I will provide an 
update with more details 04/13 morning PDT.


Original comment by [email protected] on 13 Apr 2016 at 6:41

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
[deleted comment]

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
Occured again. In this case, the number of rows was correctly 3, but it became 
6.

Load job IDs:
job_nbtQdZBoT0PzW9cW46NVohP40H0 (only 1 job because number of inputs was small)

Copy job ID:
job_gg2CvFl9fEH7XrMhJ3fZPp7cl4E

Response.statistics for Load Job IDs

[job_nbtQdZBoT0PzW9cW46NVohP40H0] 
response.statistics:{:creation_time=>"1460535126422", 
:start_time=>"1460535144895", :load=>{:output_bytes=>"838", :output_rows=>"3", 
:input_files=>"1", :input_file_bytes=>"412"}, :end_time=>"1460535155398"}

Report from embulk-output-bigquery:

{"num_input_rows":3,"num_response_rows":3,"num_output_rows":6,"num_rejected_rows
":-3}

Original comment by [email protected] on 13 Apr 2016 at 8:41

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024

Original comment by [email protected] on 13 Apr 2016 at 3:40

  • Changed state: Accepted

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
Looking at the first example (with 9 load jobs):
The job corresponding to loading 6288 rows (job_Quhqjcf1DuBQTYYXhWgfPXKjrek) 
was submitted twice (possibly due to a retry?). The two job ids are:
job_EWDq-z0DQ9Ho5FpkeSvbm3_Iz0Q
job_Quhqjcf1DuBQTYYXhWgfPXKjrek
If you would like loads to be idempotent, you can supply a job_id to the load 
job.

Original comment by [email protected] on 13 Apr 2016 at 5:46

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
Detailed advice about managing job retry can be found here:
https://cloud.google.com/bigquery/docs/managing_jobs_datasets_projects#managingj
obs

Original comment by [email protected] on 13 Apr 2016 at 5:57

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
Hmm, as looking DEBUG log of google-api-ruby-client, I could not find 
job_EWDq-z0DQ9Ho5FpkeSvbm3_Iz0Q.
But, thank you for your information, and I will try generating and supply a 
job_id by myself. 

Original comment by [email protected] on 13 Apr 2016 at 6:33

from google-bigquery.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024

Original comment by [email protected] on 13 Apr 2016 at 7:15

  • Changed state: Done

from google-bigquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.