Appearance
ybload Time Formats
This section describes the time
formats supported by ybload
operations.
A valid time value expresses the time of day without a date or a time zone. The value consists of hours, minutes, and seconds of the form HH:MM:SS.ssssss
, where ssssss
refers to a maximum of six digits for fractional seconds. Time values must fall in the range of 00:00:00
to 24:00:00
.
Time values may also include the am
or pm
designation. For example:
02:02:45.6789 am
The space character before the am
or pm
label is optional.
In --time-field-options
, you can specify timeformats
with one of the following style
entries. (The same style choices can be applied with --timestamp-field-options
and --timestamptz-field-options
.)
Time Format | Examples |
---|---|
HMSs | 00:05:30.000001 23:59:59.999 |
HMS | 00:05:30 23:59:59 |
HM | 00:05 23:59 |
For example, your ybload
command could specify the following syntax:
--time-field-options '{"timeformats":[{"style":"HMSs"}]}'
This example specifies that all TIME
columns in the table you are loading will accept time values only if they contain fractional seconds. Therefore, a row that contains 00:05:30.000001
in a TIME
column would be loaded, but a row that contains 00:05:30
would be rejected.
Parent topic:ybload Command