-
Notifications
You must be signed in to change notification settings - Fork 25
Error in rforcecom.query when querying many records #37
Comments
Not sure how to make an actual reproducible example since our salesforce data is proprietary... |
I've tried a variety of queries which all seem to be working. Anything else unusual about your query or the objects it's referencing? These work for me:
Because every instance is different, you may need to do a little debugging yourself and let us know what you find. It's hard to replicate all possible scenarios. |
I'll go ahead and try to clearly define what queries cause this error, but first wanted to say a huge thank you 🙇 🎈 for responding so quickly and trying to help. Will post again once I've narrowed this down - sounds like its an odd error on my end |
You're not alone... just got this error for the first time on code that used to work. Not sure if it is RForcecom changing something, APIversions, or my instance (objects have been stable). Example code that fails:
Wondering if this failure has something to do with traversing up multiple parents and the listing that may accompany it? |
@jmeb You're probably right that it's an issue with traversing parent hierarchies. I wrote the function
|
@ReportMort Hi! I ran into the same issue and this page is the most helpful result I got from Google, so I went ahead and followed your advice by running the RForcecom code line-by-line. A bit of context: I am working on refactoring a script to use the latest version of RForcecom. The person who wrote the script had decided to keep version 0.7 mostly because of this very issue, but now we need to finally move to the latest version, for various reasons. I'm still rather new to R, but I'll do my best to provide helpful details. Let me know if I'm doing anything wrong. From the poking around that I did, it seems that the issue (at least in my case) is that the XML from the query result is improperly parsed. Only about the last 1/4 of the data remains, and I'm guessing the My best guess is that the switch from I tested this theory by running Unfortunately this is a work project and I can't disclose the data. However, I can provide the query itself:
The resulting data.frame is 487 observations of 2 variables (so, nothing monstruous). I glanced at the raw XML before the parsing issue and did not notice anything strange about it around the "cutoff point," so I wouldn't blame the XML returned by Salesforce. Again, I'm still new so I'm not sure what other info I can provide. Let me know if I can do anything else to help troubleshoot. |
Update: While working on another script where I was having the same issue, I just discovered that if the query returns at least four columns, everything works fine. When the query returns fewer than four columns, I get the "Argument is not a matrix" error. Pulling additional columns of data until I had at least four fixed the issue in both scripts... So, for now, I just have to pull four or more columns and drop them in R. Go figure... |
This saved me @vicnett !! |
This bug is (possibly) related to issue #23 and the fix in PR #31.
I was able to reproduce the error in issue #23 when trying to query all opportunities from salesforce.
I noticed that there was a PR with a fix, installed the latest version from github, and then saw a new error when trying to query all opportunities.
The text was updated successfully, but these errors were encountered: