AnsweredAssumed Answered

using a web service to populate sparse data

Question asked by eric.eagle on Feb 6, 2015
Latest reply on Feb 19, 2015 by xander_bakker

Hi, I am nothing but a wee baby when it comes to python, know some ultra-simple things to make repetitive tasks faster. But I need some help and googling hasn't gotten me any really usable results yet.  Probably I'm just not using the right vocabulary.


I frequently have to go through piles and piles of sparse data and fill in missing values.  Generally this requires querying over the web using a known value or two.  This query service has a REST endpoint and would be a good candidate for automating, I think.


If anyone has any snippets of code that would:


  • Take a value from a particular field in a feature class (say, EVENT ID)
  • Send that value as an argument to a base URL (for example,<EVENT ID value extracted from field>/details)
  • Look through the XML return and find a particular tag (for example, <DATE>2014-01-01T03:00:00</DATE>)
  • update a field with that value (or some parsing thereof)


Does this make sense?  I'd probably want to build in some sort of dependency or pause between calls so that I don't overwhelm the server.


Thanks for any help!