Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I format a getter chain split rule in the data collector?

Symptoms

Use this split rule if you have an arraylist <String>, and you need to fetch the value of pincode in the data collector so that anyone can use that data collector in analytics to retrieve results.

java.util.ArrayList<String> customerList = new java.util.ArrayList<String>();
customerList.add("name=foo");
customerList.add("pincode=67869");
customerList.add("country=null");
customerList.add("state=LA");

 

Diagnosis

You create a Java split rule and it's formatted as follows:

getcustomerList.get(1).split("=")[1];

 

However, you try this split rule in the data collector and it doesn't work.

 

Solution

In your Java split rule, format it as follows:

getcustomerList.get(int/1).split(=).[1]

 

See also: Using Getter Chains - Java

 

 

Version history
Revision #:
5 of 5
Last update:
‎12-22-2018 12:07 PM
Updated by:
 
Labels (1)


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
0 Kudos
Comments

Just a small clarification, should this be "int/1" instead of "int/0" in below line?

getcustomerList.get(int/0).split(=).[1]

 

@Rajendra.Nautiyal? Correction needed?

yes please correct :

 

getcustomerList.get(int/0).split(=).[1]

to 

getcustomerList.get(int/1).split(=).[1]