Input parameters can be used to get resource data slice. Partial data loading reduces timeout on data request from data source. To specify input parameters in data source resource requests, specify values of parameters available after resource import. When values of parameters are specified, only the data corresponding to the specified data request conditions is selected from the resource.
Table resource input parameters are divided into two types: scalar and table.
NOTE. Setup of default values is available only for scalar values of parameters. An empty table is a default value for table values of parameters.
Resource's input parameters can be added via requests from a mobile device or in administrator console.
IMPORTANT. To integrate with table data sources, input parameters must satisfy the conditions.
Determine a method for adding input parameters using mobile application status in the drop-down list of the Mobile Application State column:
Available. Parameter value can be edited on a mobile device, after which this value is sent to a mobile platform server.
NOTE. Parameter value is set only on data request. The request must contains parameter value to avoid errors.
Unavailable. Parameter value cannot be edited on a mobile device. Set the value in administrator console that will be used as a default value on data request:
If the checkbox is selected in the Null column, parameter value for data filtering will not be set.
If the checkbox is deselected in the Null column, set parameter value in the Value column, by which data is filtered in the resource.
Variable. Variable value as: <%credential/username/client_ip>. Start entering variable value. When the user enters characters, the system automatically searches for possible variable values depending on data source resource. Parameter value is automatically calculated by a mobile platform server based on mobile device request data.
Function. Function name as: <%sign>. Set parameter value to work with digital signature.
NOTE. Parameter data type in the mobile platform database, source data type in the data source, and parameter name cannot be changed.
Set up caching if required and click the Save button. The resource is added to the list of data source resources.
When editing JSON data source resource, set input parameters manually:
To add a set of parameters:
Enter parameter name in the box in the Parameter Name column.
Select mobile application status in the drop-down list of the Mobile Application Status column.
Set the parameter value in the box in the Value column depending on the selected mobile application status.
NOTE. The box is available if the Unavailable, Variable, or Function mobile application status is set.
If required, click the Add button to add the next parameter or repeat the previous steps.
Click the Save button.
After executing the operations the set of parameters is added.
To edit the parameter, change contents of table fields and click the Save button.
To delete the parameter from the table, click the Delete button next to the parameter.
When data of Foresight data source resource are cached, the set of resource input parameters depends on object type:
Cube:
Parameter. Enter parameter name if there are parameters in a cube. If the parameter is not specified, an empty cube is obtained from server of Foresight Analytics Platform.
Groups of elements. Enter name of group of elements as strings with group identifier for each dictionary, on which a cube is based. If groups ate not specified, filtering by groups of elements is not executed.
Dimension elements selection. Enter name of elements selection for each dictionary, on which a cube is based. To filter data, send a keys list to appropriate dimension. If empty value is sent, filtering is not executed, all values are returned.
NOTE. Parameters are set from administrator console. The group of elements and dimension elements selection are set via a mobile device using API request.
Dictionary:
Parameter. Enter parameter name if there are parameters in the dictionary. If the parameter is not specified, empty dictionary is obtained from server of Foresight Analytics Platform.
Groups of elements. Enter name of group of elements as strings with dictionary group identifier. If the group is not specified, filtering by group of elements is not executed.
Attributes. Enter dictionary attribute name. To sample data, specify value of the attribute, by which data filtering is executed. If value for filtering is not set, filtering is not executed, all values are returned.
NOTE. Parameter and groups of elements are set from administrator console. Attributes are set via a mobile device using API request.
Table:
Parameter. Enter parameter name if there are parameters in table. The parameter affects values of the attributes, to which the parameter is linked but does not affect the number of returned elements.
See also: