Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse timestamps in query parameters using canonical format #3945

Merged
merged 4 commits into from
Sep 15, 2017

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Sep 13, 2017

The timestamp format in query parameters follows the canonical format.

This fixes a system test error which was happening in the bigquery-b2 branch.

/cc @alixhami

@tswast tswast requested review from tseaver and jba September 13, 2017 00:40
@tswast
Copy link
Contributor Author

tswast commented Sep 13, 2017

System tests running in branch at https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3223

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 13, 2017
@tswast
Copy link
Contributor Author

tswast commented Sep 13, 2017

Ugh. Failing in Python 2.7, but I swear I see %z in the datetime docs

@tseaver tseaver changed the title Parse timestamps in query parameters according to BigQuery canonical … Parse timestamps in query parameters using canonical format Sep 13, 2017
@tseaver tseaver added api: bigquery Issues related to the BigQuery API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 13, 2017
# Canonical formats for timestamps in BigQuery
# g.co/cloud/bigquery/docs/reference/standard-sql/data-types#timestamp-type
_BIGQUERY_TIMESTAMP = '%Y-%m-%d %H:%M:%S%z'
_BIGQUERY_TIMESTAMP_MICROS = '%Y-%m-%d %H:%M:%S.%f%z'

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

'%Y-%m-%dT%H:%M:%SZ',
'%Y-%m-%dT%H:%M:%S.%f+00:00',
'%Y-%m-%dT%H:%M:%S.%fZ',
]

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tswast
Copy link
Contributor Author

tswast commented Sep 14, 2017

System tests for latest changes running at https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3260

@tswast
Copy link
Contributor Author

tswast commented Sep 14, 2017

I'm having trouble loading the Circle CI logs for the failure. Probably due to the S3 outage today.

@tswast tswast force-pushed the bq-queryparam branch 2 times, most recently from d86a104 to f299e13 Compare September 15, 2017 17:02
…timestamp format.

The timestamp format in query parameters follows the canonical format
specified at
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp-type

This fixes a system test error which was happening in the bigquery-b2
branch.
Any of these formats may be returned from the BigQuery API.
@tswast tswast merged commit fc5cf8d into googleapis:bigquery-b2 Sep 15, 2017
@tswast tswast deleted the bq-queryparam branch September 15, 2017 19:37
tswast added a commit that referenced this pull request Sep 25, 2017
* Parse timestamps in query parameters according to BigQuery canonical timestamp format.

The timestamp format in query parameters follows the canonical format
specified at
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp-type

This fixes a system test error which was happening in the bigquery-b2
branch.

* Support more possible timestamp formats.

Any of these formats may be returned from the BigQuery API.

* Chop and string-replace timestamps into a canonical format.

* BQ: fix lint errors. Remove references to table.name
tswast added a commit that referenced this pull request Oct 12, 2017
* Parse timestamps in query parameters according to BigQuery canonical timestamp format.

The timestamp format in query parameters follows the canonical format
specified at
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp-type

This fixes a system test error which was happening in the bigquery-b2
branch.

* Support more possible timestamp formats.

Any of these formats may be returned from the BigQuery API.

* Chop and string-replace timestamps into a canonical format.

* BQ: fix lint errors. Remove references to table.name
tswast added a commit that referenced this pull request Oct 16, 2017
* Parse timestamps in query parameters according to BigQuery canonical timestamp format.

The timestamp format in query parameters follows the canonical format
specified at
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp-type

This fixes a system test error which was happening in the bigquery-b2
branch.

* Support more possible timestamp formats.

Any of these formats may be returned from the BigQuery API.

* Chop and string-replace timestamps into a canonical format.

* BQ: fix lint errors. Remove references to table.name
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: yes This human has signed the Contributor License Agreement. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants