Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Parsing Google Protobuf outputs from Download Tool in Alteryx

dandev91
7 - Meteor

Hi,

 

I've got a project where we are receiving Google Proto file data from a server in the following format:

 

header {
  realtime_version: "1.0"
  incrementality: FULL
  timestamp: 1541727653
}
entity {
  id: "1"
  service {
    key {
      key_id: "3123325346"
      schedule_relationship: SCHED
      route_id: "X2a"
    }
    position {
      latitude: -34.8345
      longitude: 152.1232
    }
    timestamp: 1541718763
    congestion_level: UNKNOWN
    stop_id: "Balcombe"
    vehicle {
      id: "6456547876"
      label: "Black to Red"
    }
  }
}
entity {
  id: "2"
  service {
    key {
      key_id: "10432423"
      schedule_relationship: SCHED
      route_id: "X2"
    }
    position {
      latitude: -35.432423
      longitude: 153.23432
    }
    timestamp: 1541718769
    congestion_level: UNKNOWN
    stop_id: "Balcombe 2"
    vehicle {
      id: "123"
      label: "Orange to Blue"
    }
  }
}

 

UPDATE: The API uses Google Protobuf to encode the data, where a .proto file (that describes the data output) is required to decode the data.  The data above is the plaintext output from the API.  How can Alteryx be used to decode this data?

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus
This looks like a json response to me. Have you tried the json parse tool?

If it isn't, then you may have to build out your own tool to do this type of parsing.

Ben
dandev91
7 - Meteor

It isn't a JSON file, but a de-serialised proto message.

 

I had to use the Python tool to build a parser.  This worked in the end but was a lot more time consuming that I had hoped for.

Labels