GeoEvent Different Type Than Schema of Destination Stream Service

2734
14
10-29-2018 06:19 AM
EllenLester1
New Contributor III

I am trying to pass data from the Poll an External Website for XML input to a stream service but receive the following error: "The GeoEvent received from the GeoEvent Service (GPSDef) is a different type than the schema of the destination Stream Service (stream-out)"

The stream service schema was published from the definition created automatically by the input (and it is not set to learning mode). So why does it think they're different? I tried this with and without field mapping, but get the error either way. I also tried passing the same data to a feature service and it worked, so I know the input is coming in alright. 

We are using GeoEvent 10.6.1

Tags (1)
14 Replies
DanielCota1
Occasional Contributor

Ellen Lester

Do you mind if I ask you to show us what the schema looks like for both the Stream Service and the Feature Service? You can check this by going to the REST endpoint for each service and clicking on the layer ID. 

i.e. layerName(0)

Also, this can very well be a small fluke. Have you already tried republishing the stream service and re-implementing the new service into the Geoevent service?

Thanks,

Daniel

0 Kudos
EllenLester1
New Contributor III

Daniel,

The feature services just has a subset of the stream service fields (see below.) After looking into this, I noticed that the GeoEvent service does have some extra fields due to nested JSON. I tried just mapping a few fields that I know exist in both the stream service and the input data, and although it shows records going "out" to the stream service (under the Monitor page), I'm still getting the original error and no points are displayed when I load the stream service

I republished the stream service and recreated the GeoEvent service multiple times.

Feature service:

Fields:

  • OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID , editable: false , nullable: false )
  • RecID ( type: esriFieldTypeString , alias: RecID , editable: true , nullable: true , length: 50 )
  • Latitude ( type: esriFieldTypeString , alias: Latitude , editable: true , nullable: true , length: 50 )
  • Longitude ( type: esriFieldTypeString , alias: Longitude , editable: true , nullable: true , length: 50 )
  • UtcTimeTag ( type: esriFieldTypeDate , alias: UtcTimeTag , editable: true , nullable: true , length: 8 )

Stream service:

Fields:

  • RecId ( type: esriFieldTypeString , alias: RecId , nullable: true )
  • City ( type: esriFieldTypeString , alias: City , nullable: true )
  • Country ( type: esriFieldTypeString , alias: Country , nullable: true )
  • County ( type: esriFieldTypeString , alias: County , nullable: true )
  • State ( type: esriFieldTypeString , alias: State , nullable: true )
  • Street ( type: esriFieldTypeString , alias: Street , nullable: true )
  • ZipCode ( type: esriFieldTypeString , alias: ZipCode , nullable: true )
  • CurrentOdometer ( type: esriFieldTypeString , alias: CurrentOdometer , nullable: true )
  • Heading ( type: esriFieldTypeString , alias: Heading , nullable: true )
  • Latitude ( type: esriFieldTypeString , alias: Latitude , nullable: true )
  • Longitude ( type: esriFieldTypeString , alias: Longitude , nullable: true )
  • SpeedMph ( type: esriFieldTypeString , alias: SpeedMph , nullable: true )
  • SpeedLimitMph ( type: esriFieldTypeString , alias: SpeedLimitMph , nullable: true )
  • Status ( type: esriFieldTypeString , alias: Status , nullable: true )
  • StatusDuration ( type: esriFieldTypeString , alias: StatusDuration , nullable: true )
  • PrimaryLandmarkName ( type: esriFieldTypeString , alias: PrimaryLandmarkName , nullable: true )
  • CurrentHardmountEvent ( type: esriFieldTypeString , alias: CurrentHardmountEvent , nullable: true )
  • UtcTimeTag ( type: esriFieldTypeDate , alias: UtcTimeTag , nullable: true )
  • UserTimeTag ( type: esriFieldTypeDate , alias: UserTimeTag , nullable: true )
  • UserInfo ( type: esriFieldTypeString , alias: UserInfo , nullable: true )
  • GroupNames ( type: esriFieldTypeString , alias: GroupNames , nullable: true )
  • VIN ( type: esriFieldTypeString , alias: VIN , nullable: true )

Thanks,

Ellen

0 Kudos
MikeLee
New Contributor

Hi Ellen,

Did you get a resolution?  If so what was that as we are encountering the same on one deployment of 10.6.1

0 Kudos
EllenLester1
New Contributor III

Hi Mike,

No, we haven't figured it out yet. If you find a solution for your deployment, we'd love to hear how to fix this.

0 Kudos
EarlMedina
Esri Regular Contributor

Hi Ellen,

You may not have this issue anymore, but I thought I'd comment all the same in case someone chances upon this post.

Typically, I'd recommend working with a flattened schema. Also, I note that the Stream Service schema Latitude/Longitude fields are esriFieldTypeString and you have no Geometry field. Therefore, it would seem that there's no information that could be used to draw points in the output.

I don't mean to further complicate your issue, but in order to have points draw I think you'll want to convert your Latitude/Longitude values to double and use those values then to calculate Geometry.

0 Kudos
KillianPaenen
New Contributor II

Hi,

That's the thing. Since 10.6.1 it automatically filters out the geometry field.
Our streaming service broke since the update and we noticed that the input and output works the same way as before and we get a throughput including a geometry column. But the moment it gets published as a service the field disappears, subscribing gives nothing, and the same error comes up as the one Ellen has. 

0 Kudos
EarlMedina
Esri Regular Contributor

I see. And the same thing happens when you create a new GeoEvent Definition with the geometry field explicitly created?

I'm thinking:

  • Let the input generate the initial definition
  • Create a new definition for the output that includes new fields for Latitude (Double), Longitude (Double), Geometry (Geometry)

For your service:

  • Map the input fields to the output fields
  • Throw in 3 field calculators that:
    • Convert the Latitude (String) to Latitude (Double) using the new field we created
    • Convert the Longitude (String) to Longitude (Double) using the new field we created
    • Use the converted Lat/Long values to calculate Geometry into the Stream Service defition
  • Output to the Stream Service
0 Kudos
EllenLester1
New Contributor III

Thank you for your suggestions. I've tried several different versions of this, but with no luck. I used the field calculator expressions from this post. Is this the same general idea that you are suggesting or is there a better way to convert the strings to doubles and back to geometry? 

I also noticed that while my earlier list of fields didn't include geometry, it is listed elsewhere in the stream service. I just didn't copy enough info in my earlier reply.

Geometry Type: esriGeometryPoint 

Geometry Field: geometry 

Spatial Reference: 4326  (4326) 

0 Kudos
CassidyKillian
Occasional Contributor II

Ellen, Were you ever able to resolve this issue?  I am experiencing the same thing after a geoevent update. 

0 Kudos