Skip to content

Conversation

@blowmage
Copy link
Contributor

@blowmage blowmage commented Dec 5, 2016

Add DATETIME, TIME, and BYTES data types.

  • DATETIME
  • TIME
  • BYTES
  • Query Parameter Type Documentation

[closes #1099]

@blowmage blowmage added api: bigquery Issues related to the BigQuery API. release blocking Required feature/issue must be fixed prior to next release. docs labels Dec 5, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 5, 2016
@blowmage blowmage changed the title Bigquery time bytes Add DATETIME, TIME, and BYTES query parameters Dec 6, 2016
@blowmage
Copy link
Contributor Author

blowmage commented Dec 7, 2016

Here are how the BigQuery Query Parameter types map to Ruby types:

BigQuery Query Parameter Ruby Notes
BOOL true/false
INT64 Integer
FLOAT64 Float
STRING STRING
DATETIME DateTime DateTime objects's time zone is not sent, BigQuery DATETIME does not have time zone
DATE Date
TIMESTAMP Time
TIME BigQuery::Time There is a helper method to make creating bq time objects easier (Project#time)
BYTES File/StringIO We informally call these obects "IO-ish"
ARRAY Array Array must contain valid ruby types, but can't be a nested array
STRUCT Hash Hash can have String or Symbol keys, but the values must be valid ruby types. I think STRUCT is used as a JSON representation in BigQuery, but its hard to find docs for using STRUCT values in queries

@quartzmo
Copy link
Member

quartzmo commented Dec 7, 2016

@blowmage I will update this PR with additional documentation as you described above for data types. Thank you!

@quartzmo quartzmo force-pushed the bigquery-time-bytes branch from 1d39cba to fa56fe6 Compare December 7, 2016 21:24
Change Google Cloud BigQuery to Google BigQuery.
Add table for query params data types.

[refs googleapis#1099]
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Dec 8, 2016
@quartzmo quartzmo self-assigned this Dec 8, 2016
@quartzmo
Copy link
Member

quartzmo commented Dec 8, 2016

I am okay with these commits being contributed to Google.

Copy link
Member

@quartzmo quartzmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to find a way to run acceptance tests for data types such as these time values, but let's move ahead with this PR.

@quartzmo quartzmo merged commit 7548d0c into googleapis:master Dec 8, 2016
@blowmage
Copy link
Contributor Author

blowmage commented Dec 8, 2016

Yay!

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

Labels

api: bigquery Issues related to the BigQuery API. cla: no This human has *not* signed the Contributor License Agreement. release blocking Required feature/issue must be fixed prior to next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for DATETIME, TIME, and BYTES query parameters

3 participants