Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Convert the unstructured openDistro Map String as a parameter and converts it into a proper JSON like string.

Usage details

LQL

select *, mapStrToJson(column) as mapToJsonData from tablename

Input parameters:
column: Value of column on which parsing needs to be done.

Output:
Returns back JSON parsed string

Example

Input table: input_table

openDistroMapData

List(Map(name -> login_success, type -> login, parameters -> List(Map(name -> login_type, value -> google_password), Map(name -> login_challenge_method, multiValue -> List(password, password, password, security_key)), Map(name -> is_suspicious, boolValue -> false))))

LQL

select *, mapStrToJson(openDistroMapData) from input_table

Output:

openDistroMapData

convertedJsonData

List(Map(name -> login_success, type -> login, parameters -> List(Map(name -> login_type, value -> google_password), Map(name -> login_challenge_method, multiValue -> List(password, password, password, security_key)), Map(name -> is_suspicious, boolValue -> false))))

[{"name":"login_success","type":"login","parameters":[{"name":"login_type","value":"google_password"},{"name":"login_challenge_method","multiValue":["password","password","password","security_key"]},{"name":"is_suspicious","boolValue":false}]}]

  • No labels