Comparing importData results with direct SDC HTTP requests

62 views
Skip to first unread message

David Thomas

unread,
Mar 1, 2012, 9:07:50 AM3/1/12
to googl...@googlegroups.com
For the past several days, importData calls to URLs inside our SDC are returning "error: The data could not be retrieved. Please check the URL." While hitting the URL directly returns correct results. 

In other words, when I go to "http://mysdc.me.com/contacts.csv" I get the results correctly in the browser. When I add =importData(" http://mysdc.me.com/contacts.csv ") to a Google spreadsheet within my Apps domain, I get the error. I have previously seen this work, which makes this feel a bit flaky. Does anyone have experience figuring the difference between successful HTTP requests into SDC versus those that go through Google Spreadsheets? 

On a related note, I'm surprised how quiet it is in this group. I had expected that people would be quite active using SDC considering the potential.  

Thanks,
Dave


Brandon Nutter

unread,
Mar 1, 2012, 9:22:28 PM3/1/12
to googl...@googlegroups.com
Google Spreadsheets does heavy caching on calls made by it's importData command.  This includes caching of errors.  Depending on the URL you are hitting, you may be able to defeat this caching by modifying a dummy URL param.  E.g.
http://mysdc.me.com/contacts.csv?cacheBuster=7238

If Spreadsheets happens to catch and cache an error for your server, you can simply increment the number in the param until the cache clears.

-Brandon



--
You received this message because you are subscribed to the Google Groups "enterprise-data-questions" group.
To post to this group, send email to enterprise-d...@google.com.
To unsubscribe from this group, send email to enterprise-data-qu...@google.com.
For more options, visit this group at http://groups.google.com/a/google.com/group/enterprise-data-questions/?hl=en.

David Thomas

unread,
Mar 1, 2012, 9:41:29 PM3/1/12
to googl...@googlegroups.com
Brandon, 
Thanks for responding. Yes, I am using André (ahab)'s recommended approach to refresh the cache. For reference, I append this to my url (within the importData call in the GDocs sheet):
&gdocscacheworkaround="&INT(NOW()/TIME(0;10;0)) 
Also, since this has been going on for several days now, I hope we can safely assume it's not the cache.

Still working on it...

Dave
Reply all
Reply to author
Forward
0 new messages