Hoppa till huvudinnehållet

Query Task Geometry Error

Kommentarer

7 kommentarer

  • Permanently deleted user
    What's the error?
    0
  • Andrew Flynn
    The error I get is as follows:

     

    "There was a workflow error running activity: Exception has been thrown by the target of an invocation. Workflow 'MeterExport' failed Unhandled exception: 'One or more errors occurred.' in activity '1.53: QueryTask'. One or more errors occurred. Unable to complete operation."
    0
  • Permanently deleted user
    Hi Andrew,

     

    How big is a "large box"? Is it possible that the query itself is timing out due to there being too many results?
    0
  • Andrew Flynn
    Hi Jordan,

     

    I did some testing and that seems to be the case. I drew a small box that selected many features, which caused an error, and a large box that selected only a few features that ran fine. Do you know of any way to prevent this?

     

    Another monkey wrench that gets thrown in the works is that in a seperate workflow I run a query that selects all of the features in the dataset that runs fine. Why would a query returning all records be ok, and a query that selects many records using an extent cause an error?

     

    Thanks for your help!
    0
  • Permanently deleted user
    You could put the query in a try-catch and, if the request times out, show the user a message suggesting that they try a smaller area, or you could evaluate the size of the area prior to making the query and show the same suggestion to the user based on some cut-off value that you determine. The latter option might be a little more work to implement, but it has the advantage of not hammering the server with giant queries.

     

    As for the discrepancy with the other workflow, my initial hunch is that the queries that are timing out are requesting a lot more data per feature compared to the query where you can successfully request all the features. If one query returns feature geometries while the other does not, for example, you might see a significant difference in the volume of data each query yields.
    0
  • Andrew Flynn
    I tinkered with the workflow with your suggestions in mind, and I found that there was a different issue altogether. As it turned out the "Where" statement I used was built from a loop based on the selection boundary, so when I selected a large amount of records the "Where" statement became really long and was causing the error in the query. I changed the loop to create a list of ObjectID's that was used to limit the query, and I then removed the "Where" statement. This has seemed to fix my issue. Thanks for your help!
    0
  • Permanently deleted user
    Awesome, happy to help!
    0

Du måste logga in om du vill lämna en kommentar.