int64
int64(value: bool, numeric, or string) -> int64
Casts the argument to int64. A null input stays null. float64 values are converted by truncating toward zero. Decimal string literals must parse as a signed base-10 integer in 64-bit range or the query fails at parse time. A duration becomes its length in nanoseconds. A timestamp becomes nanoseconds since the Unix epoch, matching how numeric casts treat instants.
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col epoch_ns:int64(event_time)
Shows int64 extracting nanoseconds since the Unix epoch from a timestamp, which matches how numeric casts treat instants.
make_col status_code:int64("200")
Shows int64 parsing a decimal string constant into an integer, which is handy when identifiers arrive as text.
Updated 18 days ago