15
Apr
09

Query Tool for Amazon SimpleDB

Although these projects are never really finished, I can say I’ve completed version 1 of the Amazon SimpleDB Query Tool. This is built on top of a new SimpleDB API that will be part of an upcoming typica release. The code currently resides in a branch, but will hopefully get merges into trunk in the next few weeks.

OK, more about the tool. It was built to provide a convenient way to test queries. That’s it. Towards that end, there is a list of features I included that really met a need for me.

  • flexible query workspace (scratch pad)
  • run query on the line where the cursor is
  • allow domain selection via the UI
  • display domain metadata
  • show results from several queries at once
  • show box usage and other stats

Now, the moment you’ve all been waiting for, a screenshot!

querytool

Right now, the code is still in SVN, so if you’d like to run it, you’ll need to check out the branch and build it.  If you get that far, to run it, you can use this command, “ant test.main -Dclass=QueryTool -Dargs=”<access id> <secret key>”

For an official release, I’ll make an executable jar, so you’d run “java -jar QueryTool.jar <access id> <secret key>”

About these ads

22 Responses to “Query Tool for Amazon SimpleDB”


  1. 1 dkavanagh
    April 15, 2009 at 2:28 pm

    OK, I’ve built an executable jar and put it in the typica downloads area. It is featured on the main typica page; http://code.google.com/p/typica/

  2. April 29, 2009 at 8:00 pm

    Great guys! I am glad there are more tools to manage Amazon SimpleDB!

    Thanks
    Andy

  3. May 13, 2009 at 4:04 am

    This is great. Probably the best free SimpleDB query tool currently. Thanks. My only feature request at this time would be to be able to copy individual cells to the clipboard. Thanks for a great tool.

  4. May 21, 2009 at 9:56 am

    Any chance of adding M/DB support? See http://www.mgateway.com/mdb.html. Should require little more than allowing use of a different URL. Otherwise M/DB behaves just like SimpleDB

    • 6 dkavanagh
      May 21, 2009 at 10:44 am

      It looks like the support a much older version of the SImpleDB API (2007-11-07), which I think means no Select support. Certainly you could take the query tool source code and modify it to work with something like M/DB without too much trouble.

  5. May 21, 2009 at 10:55 am

    Actually the latest build of M/DB (26) which you’ll find on our web site now supports the Select API, so shouldn’t be a problem.

    Rob

    • 8 dkavanagh
      May 21, 2009 at 11:04 am

      In that case, does typica work with it? Can you just plug in a different endpoint host name? if I added some better command line arg parsing, it would be pretty trivial to support a host name.

  6. May 21, 2009 at 11:18 am

    I’ve not tried typica. However you are correct – the only difference is a different endpoint host name, typically of the form http://xxxx/mdb/request.mgwsi. Otherwise the behaviour is identical to SimpleDB. Build 26 provides full SignatureVersion=2 support with SignatureMethod=HmacSHA1 or HmacSHA256. M/DB uses the REST interface, not the SOAP/WSDL interface, but I would guess you’d be using the REST interface anyway.

  7. 10 nic
    May 29, 2009 at 6:52 pm

    Very cool, I found this to be one of the nicer ways to access simpledb.

    Would be nice if it included wrappers around some of the other calls, letting you ‘drop’ and ‘create’ domains as well as rows themselves. Then it would be perfect. :)

    • 11 dkavanagh
      May 29, 2009 at 10:10 pm

      Thanks! I was trying to avoid going down the slippery slope of supporting put operations. I think domain create/delete make sense (though, create is a bit of a “put”).

      • 12 nic
        May 30, 2009 at 6:20 pm

        So I pulled from the branch and after figuring out it was pointing to the wrong simple db service (at least for my testing) I got it up and running off of built code. But it looks like there are still some other issues as I’m not getting results back.

        I’m going to keep digging a bit, but is the branch in a known ‘unstable’ state. Are you interested in receiving patches for create/drop/delete functionality?

  8. 13 nic
    May 30, 2009 at 8:00 pm

    Hi again,

    Figured out what my problem was, queries fail on the first go unless you set the domain via the drop down. I’ve fixed that along with a few other issues (better error reporting) and changed the input layout a bit. It now has a single text field for the query with up/down history support and then a scrollable log/history above it. This makes communication of errors / status messages a bit more natural IMO.

    I’d be happy to submit it back, just drop me an email and I’ll get it to you.

    -Nic

    • 14 dkavanagh
      June 1, 2009 at 4:53 pm

      Hi Nic,
      Yes, e-mail me the patches and I’ll integrate them. I’m about to check-in the new/delete domain features. I’ll wait a bit before pushing a release out (for your changes). you can find my e-mail via the typica home page.

      David

      • 15 nic
        June 1, 2009 at 8:47 pm

        I couldn’t find a reference to your email on the typica page, but took a guess. If you didn’t receive it, echo me back at nicpottier at the gmail.

        -Nic

  9. 18 PC
    January 15, 2010 at 8:39 am

    Cool tool. I got some basic stuff working. However, I’m trying to use it with some domains autocreated by SimpleJPA and they have the name format “MyDB-Users”;

    i’ve tried

    select * from MyDB-Users
    select * from `MyDB-Users`

    and single/double quotes. None of them work. I’m guessing the dash is the problem (which is automatically inserted by simplejpa) but the backtick should still work. I’m guessing this isn’t built it. Or maybe this is just a serious case of user error.

  10. 19 PC
    January 15, 2010 at 8:43 am

    Funny how after you post, you find the solution to your problem.

    So it was user error partially.

    Backticks are required around the domain name.

    The reason why my queries weren’t executing was because I had them ending in a semi-colon (habit from years of demarcating sql this way). The ending semi-colon caused it not to run correctly.

  11. 20 jsd
    January 5, 2012 at 10:58 pm

    Where would I get the source code for querytool and what would i have to change to make it use us-west-1 instead of us-east? How do I recompile it?

    • 21 dkavanagh
      January 19, 2012 at 2:56 am

      The source is in svn. Look at code.google.com/p/typica and grab the source. It’s in the test directory. There’s an ant target in the build.xml which builds the jar file for the tool.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


More frequent updates from me

  • 135,009

The Author


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: