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 — insertRowsAsStream not showing full error log · Issue #399 · GoogleCloudPlatform/nodejs-docs-samples

insertRowsAsStream not showing full error log #399

New issue
Copy link
New issue
Copy link
Closed
Closed
insertRowsAsStream not showing full error log#399
Copy link
Labels
🚨This issue needs some love.triage meI really want to be triaged.

Description

@luna-ci
luna-ci
opened on Jun 1, 2017
Issue body actions

I have tried created a table using the api successfully with 2 fields as nullable.
However I was unable to insertRowsAsStream as using code below

const params = {
        datasetId: "Event",
        tableId: "navigation9",
        projectId: "xxxx-9a8cd",
        rows: [
          { Name: "test0", Age: 0 },
          { Name: "test2", Age: 1 },
          { Name: "test3", Age: 2 },
          { Name: "test4", Age: 3 },
          { Name: "test5", Age: 0 }
        ]
      }

insertRowsAsStream(params)

const insertRowsAsStream = ({ datasetId, tableId, rows, projectId }) => new Promise((resolve, reject) => {
  const BigQuery = require('@google-cloud/bigquery');

  // Instantiates a client
  const bigquery = BigQuery({
    projectId: projectId
  });

  console.log('insertRowAsStream rows = ', JSON.stringify(rows, null, 2))

  // Inserts data into a table
  bigquery
    .dataset(datasetId)
    .table(tableId)
    .insert(rows)
    .then((insertErrors) => {
      console.log('Inserted:');
      rows.forEach((row) => console.log(row));

      if (insertErrors && insertErrors.length > 0) {
        console.log('Insert errors:');

        insertErrors.forEach((err) => console.error(err));
        reject('ERROR: ' + JSON.stringify(insertErrors, null, 2));
      } else {
        resolve('Sucessfully Inserted')
      }
    })
    .catch((err) => {

      console.error('ERROR:', err);
      reject('ERROR:' + err);

    });
  // [END bigquery_insert_stream]
});

The log result i got is not very helpful


Inserted: 
{ Name: 'test0', Age: 0 }
{ Name: 'test2', Age: 1 }
{ Name: 'test3', Age: 2 }
{ Name: 'test4', Age: 3 }
{ Name: 'test5', Age: 0 }
Insert errors:
{ kind: 'bigquery#tableDataInsertAllResponse' }

Here is do not know what causing the error

Activity

  1. jmdobry
    added
    bug
    on Jun 1, 2017
  2. yrjsg commented on Jun 6, 2017

    @yrjsg
    yrjsg
    on Jun 6, 2017
    More actions

    I've the same issue when run this code in Cloud Function. No errors are returned but no rows are in Bigquery

  3. ace-n commented on Jul 11, 2017

    @ace-n
    ace-n
    on Jul 11, 2017
    Contributor
    More actions

    @digithunz @frankyaorenjie thanks for reporting this! As of #421, this has been fixed.

  4. ace-n
    closed this as completedon Jul 11, 2017
  5. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  6. ahrarmonsur
    added 5 commits that reference this issue on Nov 16, 2022

    chore: release 3.8.0 (#399)

    ce5de5a

    chore: release 3.8.0 (#399)

    08e2318

    chore: release 3.8.0 (#399)

    7333967

    chore: release 3.8.0 (#399)

    5b23fab

    chore: release 3.8.0 (#399)

    dccfd21
  7. telpirion
    added a commit that references this issue on Nov 16, 2022

    fix(deps): update dependency mathjs to v6 (#399)

    09938aa
  8. grayside
    added a commit that references this issue on Nov 16, 2022

    chore: release 2.1.2 (#399)

    5ebc25c
  9. ace-n
    added 2 commits that reference this issue on Nov 17, 2022

    chore: release 2.1.2 (#399)

    a0f6fac

    chore: release 5.1.1 (#399)

    3b3e351
  10. grayside
    added a commit that references this issue on Nov 17, 2022

    chore: release 2.1.2 (#399)

    ca88602
  11. ace-n
    added 2 commits that reference this issue on Nov 17, 2022

    chore: release 5.1.1 (#399)

    89fcd4f

    chore: release 3.8.0 (#399)

    bfc1d57
  12. ahrarmonsur
    added a commit that references this issue on Nov 17, 2022

    chore: release 2.1.2 (#399)

    1e1242c
  13. ace-n
    added 3 commits that reference this issue on Nov 17, 2022

    chore: release 5.1.1 (#399)

    b0f9c04

    chore: release 5.1.1 (#399)

    35ef999

    chore: release 5.1.1 (#399)

    1c5c5a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.