Skip to content

IMPLICIT - DATA SOURCE

Description

The IMPLICIT data source is designed to retrieve data directly from a predefined payload within the application's configuration. This method is particularly useful for accessing and processing data that is statically defined within the application, without the need for external data sources or services. The IMPLICIT data source supports specifying the payload directly in the data feed configuration, allowing for easy integration of static data into the application's data processing workflow.


Config

REQUIRED


Config Parameters

Name Description
payload The predefined data payload to be used as the data source. This is a required parameter.
mimeType The MIME type of the data payload. This is an optional parameter.

Config Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="UTF-8"?>
<apiroConf version="1" xmlns="http://apiro.com/apiro/v1/root">
    <loadOrder>30</loadOrder>
    <localRefs>
        <localRef>
            <name>PAYLOAD</name>
            <value>
                <![CDATA[
                    bac, fname, sname, a1, a2
                    37465534, Fred, Jones, dsgfasfa, 5654
                    85756453, Petros, Petrou, ertwretwe, fdsgfdgrqw
                    57333425, James, Smith, qeqweqwe, gfdsghgfdd
    ]]>
            </value>
            <jsonEscape>true</jsonEscape>
        </localRef>
    </localRefs>
    <dataFeeds>
        <dataFeed definition="EXPR_CSV_FEED2" name="CUSTOMER_CSV_TEST">
            <execPriority>10</execPriority>
            <enabled>true</enabled>
            <push>false</push>
            <pull>true</pull>
            <schema>CUSTOMERS</schema>
            <config><![CDATA[
{
  "dataSource": {
    "entity": "IMPLICIT",
    "config": {
      "payload": "${LOCAL:PAYLOAD}",
      "mimeType": "text/plain"
    }
  },
  "titleAtLine": 1,
  "dataAtLine": 2,
  "explicitMappings": [
    {
      "dictionary": "BAC",
      "value": "#GRV{PAYLOAD.resolve('bac')}"
    },
    {
      "dictionary": "FIRSTNAME",
      "value": "#GRV{PAYLOAD.resolve('fname')}"
    },
    {
      "dictionary": "SURNAME",
      "value": "#GRV{PAYLOAD.resolve('sname')}"
    },
    {
      "dictionary": "ADDRESSL1",
      "value": "#GRV{PAYLOAD.resolve('a1')}"
    },
    {
      "dictionary": "ADDRESSL2",
      "value": "#GRV{PAYLOAD.resolve('a2')}"
    }
  ]
}]]></config>
        </dataFeed>
    </dataFeeds>
</apiroConf>

Common Mistakes

  • Incorrect Payload Format: Ensure that the payload parameter is correctly formatted according to the expected data structure and MIME type.
  • MIME Type Mismatch: Verify that the mimeType parameter matches the actual format of the data payload.
  • Local Reference Issues: If you encounter issues with accessing the payload, ensure that the local reference (${LOCAL:PAYLOAD}) is correctly defined and accessible within the application's configuration.