Online SOQL Tester Up & Running
One of the most essential items for any sforce developers’ tookit is a query tester – like the countless SQL query builders used by database developers everyday, a SOQL tester allows developers to navigate the data model, and build and test queries without the standard re-code/re-compile cycle. A quick perusal of the message board shows that a good chunk of the questions can be quickly resolved with the help of such a tool.
The good news is that there is now an online SOQL tester available at https://sandbox.sforce.com/soqltest/.
For some interesting implementation details, read on.
We’ve actually had the SOQL tester available in our back pocket for a while, but didn’t not want to deploy it until we had a SSL capable server to use, as asking for passwords in the clear is generally a Bad Idea. With the new sandbox environment, we have a place to deploy in the environment we need. Of course, this means setting up all the moving pieces, which is non-trivial to say the least.
There are a few moving parts in this enviroment’s mix; Apache 2.0, which is the front end web server, Tomcat 5.0.25, which is the app server, and mod_jk, which allows apache to front and tomcat, and transparently pipe requests to the app server. With a bit of patience and a few google searches, all of those components can be strung together without too much work.
The challenge comes in putting SSL in the mix. Getting apache setup with mod_ssl isn’t too bad, thanks to a some good HOW TOs available via google. In this configuration, apache is going to take the SSL requests, and then forward them via mod_jk to tomcat – this model allows all the sites/technologies (PHP, JSP, perl, etc) to share a common certificate, eliminating the need to install a separate cert on tomcat.
From a programmers point of view on the tomcat side, things can get interesting. For example, how does tomcat know what protocol to use in prefixing URLs (ie http or https?) Turns out that while the port information (443 for SSL) is based to tomcat appropriately, there is no way (that I could find) to the protocol programatically, forcing me to hard code the value based on the port number. This is of course bad form, and I’m sure there is a better way – any one have ideas?
The good news is that there is now an online SOQL tester available at https://sandbox.sforce.com/soqltest/.
For some interesting implementation details, read on.
We’ve actually had the SOQL tester available in our back pocket for a while, but didn’t not want to deploy it until we had a SSL capable server to use, as asking for passwords in the clear is generally a Bad Idea. With the new sandbox environment, we have a place to deploy in the environment we need. Of course, this means setting up all the moving pieces, which is non-trivial to say the least.
There are a few moving parts in this enviroment’s mix; Apache 2.0, which is the front end web server, Tomcat 5.0.25, which is the app server, and mod_jk, which allows apache to front and tomcat, and transparently pipe requests to the app server. With a bit of patience and a few google searches, all of those components can be strung together without too much work.
The challenge comes in putting SSL in the mix. Getting apache setup with mod_ssl isn’t too bad, thanks to a some good HOW TOs available via google. In this configuration, apache is going to take the SSL requests, and then forward them via mod_jk to tomcat – this model allows all the sites/technologies (PHP, JSP, perl, etc) to share a common certificate, eliminating the need to install a separate cert on tomcat.
From a programmers point of view on the tomcat side, things can get interesting. For example, how does tomcat know what protocol to use in prefixing URLs (ie http or https?) Turns out that while the port information (443 for SSL) is based to tomcat appropriately, there is no way (that I could find) to the protocol programatically, forcing me to hard code the value based on the port number. This is of course bad form, and I’m sure there is a better way – any one have ideas?

3 Comments:
Two quick notes:
- you will get a nasty error if you have a bad login; if that happens just try again
- there is a bug where if you select just ID for an object, the query will fail
By sforce, at 2:41 PM
Hello,
Great tool. I noticed that when I run a query that returns alot of data then the data returned starts dropping columns. For example:
select name, phone from account where name like 'a%'
The query above shows name and phone for a couple of accounts. The query below only shows the name, most likely because of the amount of data returned.
select name, phone from account
Thanks for a great tool!
Pat
By Anonymous, at 10:51 AM
I think it has been down for a few days now.
By Carmit, at 10:22 PM
Post a Comment
<< Home