Boolean literals are the keywords TRUE and FALSE. They are case sensitive.


Numbers are typed and are either a float64 or an int64. If the number contains a decimal it is considered to be a float64 otherwise it is an int64. All float64 numbers are considered to be in base 10. If an integer is prefixed with a 0 then it is considered a base 8 (octal) number, otherwise it is considered base 10.

Valid number literals:

  • 1 – int64
  • 1.2 – float64
  • 5 – int64
  • 5.0 – float64
  • 0.42 – float64
  • 0400 – octal int64


There are two ways to write string literals:

  1. Single quoted strings with backslash escaped single quotes.

    This string 'single \' quoted' becomes the literal single ' quoted.

  2. Triple single quoted strings with no escaping.

    This string '''triple \' quoted''' becomes the literal triple \' quoted.


TICKscript supports durations literals. They are of the form of InfluxQL duration literals. See https://docs.influxdata.com/influxdb/v1.3/query_language/spec/#literals

Duration literals specify a length of time. An integer literal followed immediately (with no spaces) by a duration unit listed below is interpreted as a duration literal.

Duration unit definitions

Units Meaning
u or µ microseconds (1 millionth of a second)
ms milliseconds (1 thousandth of a second)
s second
m minute
h hour
d day
w week


A statement begins with an identifier and any number of chaining function calls. The result of a statement can be assigned to a variable using the var keyword and assignment operator =.


var errors = stream
var requests = stream
// Join the errors and requests stream
        .as('errors', 'requests')
    |eval(lambda: "errors.value" / "requests.value")



Whitespace is ignored and can be used to format the code as you like.

Typically property methods are indented in from their calling node. This way methods along the left edge are chaining methods.

For example:

    |eval(lambda: "views" + "errors")
        .as('total_views') // Increase indent for property method.
    |httpOut('example') // Decrease indent for chaining method.


Basic // style single line comments are supported.

© 2015 InfluxData, Inc.
Licensed under the MIT license.