API Docs - v1.0.3¶
Env¶
getEnvironmentProperty (Function)¶
This function returns Java environment property corresponding to the key provided
Syntax
<STRING> env:getEnvironmentProperty(<STRING> key, <STRING> default.value)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
key | This specifies Key of the property to be read. | STRING | No | No | |
default.value | This specifies the default Value to be returned if the property value is not available. | null | STRING | Yes | No |
Examples EXAMPLE 1
define stream keyStream (key string); from keyStream env:getEnvironmentProperty(key) as FunctionOutput insert into outputStream;
This query returns Java environment property corresponding to the key from keyStream as FunctionOutput to the outputStream
getSystemProperty (Function)¶
This function returns the system property pointed by the system property key
Syntax
<STRING> env:getSystemProperty(<STRING> key, <STRING> default.value)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
key | This specifies Key of the property to be read. | STRING | No | No | |
default.value | This specifies the default Value to be returned if the property value is not available. | null | STRING | Yes | No |
Examples EXAMPLE 1
define stream keyStream (key string); from keyStream env:getSystemProperty(key) as FunctionOutput insert into outputStream;
This query returns system property corresponding to the key from keyStream as FunctionOutput to the outputStream
getUserAgentProperty (Function)¶
This function returns the value corresponding to a given property name in a given user agent
Syntax
<STRING> env:getUserAgentProperty(<STRING> user.agent, <STRING> property.name)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
user.agent | This specifies the user agent from which property will be extracted. | STRING | No | No | |
property.name | This specifies property name which should be extracted. Supported property names are 'browser' , 'os' and 'device' . |
STRING | No | No |
System Parameters
Name | Description | Default Value | Possible Parameters |
---|---|---|---|
regexFilePath | Location of the yaml file which contains the regex to process the user agent. | Default regexes included in the ua_parser library | N/A |
Examples EXAMPLE 1
define stream UserAgentStream (userAgent string); from UserAgentStream select env:getUserAgentProperty(userAgent, "browser") as functionOutput insert into OutputStream;
This query returns browser name of the userAgent from UserAgentStream as functionOutput
to the OutputStream
getYAMLProperty (Function)¶
This function returns the YAML property requested or the default values specified if such avariable is not available in the deployment.yaml
Syntax
<INT|LONG|DOUBLE|FLOAT|STRING|BOOL> env:getYAMLProperty(<STRING> key, <STRING> data.type, <INT|LONG|DOUBLE|FLOAT|STRING|BOOL> default.value)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
key | This specifies Key of the property to be read. | STRING | No | No | |
data.type | A string constant parameter expressing the data type of the propertyusing one of the following string values: int, long, float, double, string, bool. | string | STRING | No | No |
default.value | This specifies the default Value to be returned if the property value is not available. | null | INT LONG DOUBLE FLOAT STRING BOOL |
Yes | No |
Examples EXAMPLE 1
define stream keyStream (key string); from keyStream env:getYAMLProperty(key) as FunctionOutput insert into outputStream;
This query returns corresponding YAML property for the corresponding key from keyStream as FunctionOutput to the outputStream