AnsweredAssumed Answered

JSON input from Geoprocessing Service

Question asked by jamesfreddyc Champion on Apr 7, 2020
Latest reply on Apr 9, 2020 by jamesfreddyc

We have existing or in-development Geoprocessing Services that essentially output string JSON that we're simply enriching with location info (x/y or ring values).  Since we're building these with Python I think we can format the output just about any way we want, but is there connectors in GeoEvent that can be configured to just specify the xy attributes of the json we want to use?

 

In the sample output below, all of the attributes in the "result" array would be what we'd like to push to GeoEvent and output as a feature service.

 

 

{
 "results": [
  {
   "paramName": "resultJSON",
   "dataType": "GPString",
   "value": {
    "result":  [
     {
      "phosphorusUnit":  "n/a",
       "samples":  [
      
      ],
       "phosphorus":  "n/a",
       "pointX":  -8938939.6672,
       "pointY":  3079872.605700001,
       "wmFeature":  "STA-1E",
       "phosphorusTimestamp":  "n/a",
       "_7dayFlowVolume":  0,
       "structureName":  "S377"
     },
      {
      "phosphorusUnit":  "mg/L",
       "samples":  [
       {
        "qualityCode":  "P",
         "collectMethod":  "G",
         "collectDate":  1583936160000,
         "sampleId":  "P114457-10",
         "value":  0.086,
         "testName":  "PHOSPHATE, TOTAL AS P",
         "flag":  null,
         "station":  "G311",
         "testNumber":  25,
         "units":  "mg/L"
       },
        {
        "qualityCode":  "P",
         "collectMethod":  "G",
         "collectDate":  1584535260000,
         "sampleId":  "P114450-12",
         "value":  0.065,
         "testName":  "PHOSPHATE, TOTAL AS P",
         "flag":  null,
         "station":  "G311",
         "testNumber":  25,
         "units":  "mg/L"
       },
      {
      "phosphorusUnit":  "n/a",
       "samples":  [
      
      ],
       "phosphorus":  "n/a",
       "pointX":  -8942434.6842,
       "pointY":  3083166.2346,
       "wmFeature":  "STA-1E",
       "phosphorusTimestamp":  "n/a",
       "_7dayFlowVolume":  -99999.0,
       "structureName":  "S375"
     }
    ]
   }
  }
 ],
 "messages": [
 
 ]
}

Outcomes