Skip to content

Support both seconds from epoch and timestamp string #1382

@dhermes

Description

@dhermes

If someone already has a timestamp string, we shouldn't force them to convert it to datetime.datetime so that we can in turn convert that into seconds. (Inspired by #1381.)

From the docs

TIMESTAMP data types can be described in two ways: UNIX timestamps or calendar datetimes. BigQuery stores TIMESTAMP data internally as a UNIX timestamp with microsecond precision.

so we could allow the user to just pass a string and we "take their word for it" that it's a valid datetime. Since Table.insert_data returns a list of errors anyhow, we wouldn't have to do much/anything to enforce this.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions