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 — BigQuery return timestamp field as exponential · Issue #990 · googleapis/google-cloud-node

BigQuery return timestamp field as exponential #990

New issue
Copy link
New issue
Copy link
Closed
Closed
BigQuery return timestamp field as exponential#990
Copy link
Assignees
debopamsengupta
Labels
api: bigqueryIssues related to the BigQuery API.

Description

@debopamsengupta
debopamsengupta
opened on Dec 4, 2015
Issue body actions

image
This is the result from the time field in the BigQuery dataset instead of some thing like this

image

Is there something I'm missing ?

Activity

  1. debopamsengupta
    closed this as completedon Dec 4, 2015
  2. stephenplusplus commented on Dec 4, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 4, 2015
    Contributor
    More actions

    @debopamsengupta did you mean to close?

  3. debopamsengupta commented on Dec 4, 2015

    @debopamsengupta
    debopamsengupta
    on Dec 4, 2015
    Author
    More actions

    Well, found a workaround as the exponential can be converted into a Unix timestamp using Number(Number(time).toPrecision(10))
    But it would be good to just receive the string from BigQuery

  4. stephenplusplus commented on Dec 4, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 4, 2015
    Contributor
    More actions

    I agree! Which API call is the time field returned in?

  5. debopamsengupta commented on Dec 4, 2015

    @debopamsengupta
    debopamsengupta
    on Dec 4, 2015
    Author
    More actions

    https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.25.1/bigquery?method=query returns the time field

  6. stephenplusplus commented on Dec 4, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 4, 2015
    Contributor
    More actions

    I can't find that property being returned in the raw API response (https://cloud.google.com/bigquery/docs/reference/v2/jobs/query)

    Is this your own data? It looks like we could convert to a Date object if we see the matching schema type for a returned property is "TIMESTAMP".

  7. stephenplusplus
    reopened this on Dec 4, 2015
  8. debopamsengupta commented on Dec 4, 2015

    @debopamsengupta
    debopamsengupta
    on Dec 4, 2015
    Author
    More actions

    image
    Well this is the schema for the table, and the schema type for the field time is TIMESTAMP

  9. stephenplusplus commented on Dec 4, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 4, 2015
    Contributor
    More actions

    Got it, thanks. Sorry for all the questions, just wanted to make sure I understood. I think we can sniff out when we are returning these types and convert them to the format that makes sense. Thanks for calling this out!

  10. debopamsengupta commented on Dec 4, 2015

    @debopamsengupta
    debopamsengupta
    on Dec 4, 2015
    Author
    More actions

    Thanks, no problem !

  11. stephenplusplus
    added
    enhancement
    api: bigqueryIssues related to the BigQuery API.
    on Dec 4, 2015
  12. callmehiphop
    closed this as completedin #991on Dec 4, 2015
  13. jgeewax commented on Dec 8, 2015

    @jgeewax
    jgeewax
    on Dec 8, 2015
    Contributor
    More actions

    Hey guys, any chance we can continue the old behavior by passing a special parameter? That is, what if I really just want the raw data? Can I ask for raw (un-schema-parsed) results? /cc @callmehiphop

  14. stephenplusplus commented on Dec 8, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 8, 2015
    Contributor
    More actions

    The raw data will still come through in the apiResponse parameter:

    table.query('SELECT * FROM ...', function(err, rows, nextQuery, apiResponse) {
      // apiResponse:
      {
        "schema": {
          "fields": [
            {
              "name": "url",
              "type": "STRING",
              "mode": "NULLABLE"
            }
          ]
        },
        "rows": [
          {
            "f": [
              {
                "v": "https://github.com/jfeaver/hireme"
              }
            ]
          }
        ]
      }
    });
    
  15. jgeewax commented on Dec 8, 2015

    @jgeewax
    jgeewax
    on Dec 8, 2015 via email
    Contributor
    More actions
    OK cool :) Where do we document the full apiResponse object? Do we link back to the BigQuery page that defines the schema of that object?
  16. stephenplusplus commented on Dec 8, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 8, 2015
    Contributor
    More actions

    It's a bit of a click-hunt, but if you get to the bigQuery#query docs, the last link on the page ("Jobs: query API Documentation" under the "More information" section) takes you to https://cloud.google.com/bigquery/docs/reference/v2/jobs/query which shows the response body.

    I'll open a new issue for making the apiResponse callback parameter linkable directly to the response body. For now, I made a small note in the release notes about the raw response.

  17. jgeewax commented on Dec 8, 2015

    @jgeewax
    jgeewax
    on Dec 8, 2015 via email
    Contributor
    More actions
    Oh that's a great idea. Maybe all our apiResponse parameters could point to the API page on cloud.google.com?
  18. stephenplusplus commented on Dec 8, 2015

    @stephenplusplus
    stephenplusplus
    on Dec 8, 2015
    Contributor
    More actions

    Yeah, I think that'd be awesome! Issue opened: #1007

  19. JustinBeckwith
    assigned
    debopamsengupta
    on Feb 1, 2021
  20. sofisl
    added a commit that references this issue on Jan 17, 2023

    docs(samples): include metadata file, add exclusions for samples to h…

    dbb4fa3
  21. miguelvelezsa
    added a commit that references this issue on Jul 23, 2025

    fix(deps): update dependency @grpc/grpc-js to ~1.3.0 (#990)

    8cd24a2
  22. sofisl
    added a commit that references this issue on Feb 3, 2026

    docs(samples): update test to run auth-user-sample test (#990)

    5ab3ecb
  23. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    docs: clarify close behavior (#990)

    dacb832

    docs: clarify close behavior (#990)

    ae96c1d
  24. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    docs: clarify close behavior (#990)

    b7e853a
  25. thiyaguk09
    added a commit that references this issue on May 5, 2026

    docs: clarify close behavior (googleapis#990)

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

Metadata

Metadata

Assignees

  • @debopamsengupta
    debopamsengupta

Labels

api: bigqueryIssues related to the BigQuery API.

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.