Forum Discussion

crina's avatar
crina
Occasional Contributor
5 years ago

how i can i interogate dynamodb from soapui

Hi, i am trying create a connection to dynamodb from soapui.

what do i need to create the connection, then how can i write a simple select on the db.

Do i need Access key and secret key of the dynamodb or, there are other ways to connect to it

  • crina : First i think you need to follow below steps:

     

    1. download the supporting jar for dynamodb and place it in soapUI/bin/ext folder

    2. You can use Groovy steps to connect to DB and extracting Data from DB

    3. Else with ReadyAPI/SoapUI Pro, you can use JDBC step to do the same Step-2.

     

  • Hey crina,

    I did a bit of a search using "jdbc jar file download for dynamodb" as my search string and i found a number of pages but a lot of them appear to require payment (for the driver .jar files) (e.g. cdata, Sisense, and other providers) which is a bit weird.

    I did find the following link which appears to provide an open source driver https://jar-download.com/artifact-search/dynamodb which might help.

    Essentially you need to know the dynamodb version you are trying to connect to. You might return better google search results if you include the dynamodb version youre trying to connect to.....i typically would always include this in my query string when trying to find an appropriate jar file for db access.

    Once youve found your .jar files you need to ensure you download the correct jre/jdk version that the .jar files uses to connect.

    Your connection string (doesnt look like its actually a URL for dynamodb) appears to match what ive seen...name/value pairs for accesskey, secretkey, domain and regions.

    It might be easier to get all the detsils you need if there is anyone else at your place of work who has already setup a db connection already via any db interrogatiom tool....it would be a bit weird if no one there had already created a db connection already considering your development project is running on a db....you could grab all the details you need from them perhaps?

    Either way it shouldnt be too much trouble....the important thing is to google the jdbc driver .jars for your specific dybamodb db version number. Considering im guessing your project is cloud hosted AWS, you just need to download the jar for the latest version of dynamodb as cloud hosted equates to always using thr latest version of these software products unlike onpremise hosted apps.

    Nice one

    Rich
  • crina : First i think you need to follow below steps:

     

    1. download the supporting jar for dynamodb and place it in soapUI/bin/ext folder

    2. You can use Groovy steps to connect to DB and extracting Data from DB

    3. Else with ReadyAPI/SoapUI Pro, you can use JDBC step to do the same Step-2.

     

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Awesome job, Community!

       

      crina which suggestion did you follow? Please mark the advice that helped you as a Solution!

      • crina's avatar
        crina
        Occasional Contributor

        Hi thanks for all the answers,

         

        i have the access hey and also secret key.

        My questions now:

        where i can get the correct jar driver?

        and the format for JDBC url i am not sure if this the correct one:

        [jdbc:dynamodb:Access Key=<xxxxx>;Secret Key=<xxxx>;Domain=amazonaws.com; Region=OREGON]

  • nmrao's avatar
    nmrao
    Champion Level 3
    You should be able to connect as long as you have the driver library, placed under ReadyAPI installation/bin/ext directory and restart the tool.
    You may either use jdbc or groovy test step to query the db.
    • richie's avatar
      richie
      Community Hero
      Hi crina,

      Ive never had to connect to a dynmo db before and ive been doing a little research but i found it a little contradictory as ive found one site that said dynamodb doesnt support JDBC and other sites that said it does!

      Anyway, as Rao said....you need to download the correct .jar driver file and stick it in %readyapiHome%/bin/ext

      Then download the version of java that corresponds to the .jar driver file. Remember your java needs to be of the correct 'bit type' as your ReadyAPI! instance....so if ReadyAPI! is 64bit then get the 64bit JDK, else get the x86 (32bit version).

      Im typing this on my phone so i cant check, but if you look in Preferences >> JDBC youll see the default connection strings. If there isn't one for dynamodb you need to add the JDBC connection URL in here.

      I found this link which may help >> https://www.simba.com/products/DynamoDB/doc/JDBC_InstallGuide/content/jdbc/dy/using/connectionurl.htm

      What attributes (secret keys, etc.) that are required in your connection string would be defined by the dynamodb instance setup that you are trying to connect to, so youll have to confirm that at your end of things.

      Cheers,

      Rich