Bobcares

AWS DynamoDB NoSQL Workbench: Explained

by | Sep 23, 2022

Let us take a closer look at the AWS DynamoDB NoSQL workbench and the configurations and how to use it with the support of our AWS support services at Bobcares.

 What is NoSQL Workbench for DynamoDB?

AWS DynamoDB NoSQL Workbench

Amazon NoSQL Workbench DynamoDB is a client-side GUI program for modern database development and operations that is cross-platform and available for Windows, macOS, and Linux.

NoSQL Workbench is a single visual IDE tool that includes capabilities for data modeling, data visualization, and query creation to assist in designing, creating, querying, and managing DynamoDB tables.

The Key features are as follows:

  1. Data Modeling: Workbench provides us with the ability to create new data models from scratch or to reuse current data models. We can design various patterns that can be combined to get data on the dataset.
  2. Data Visualization: As the name implies, it is the act of creating queries and obtaining data from its medium rather than coding it bit by bit.
  3. Operation Building: Workbench is a solid and dependable platform for developing applications. It features an excellent graphical user interface, which facilitates communication between the database and the user.

Using DynamoDB on the local with NoSQL Workbench

Let us set up a DynamoDB for local development and use the provided UI to explore the data we work with by going through the whole process.

Getting started

Firstly, we have to make a new project directory in which to work. Type in the following code to configure up the new project:

1# Make project directory2
mkdir hello-dynamodb-local3cd
hello-dynamodb-local4
# Add some simple files to work with
mkdir src
touch src/index.js
# Create new npm package to work with
npm init -y

Go to the AWS documentation website and copy a DynamoDB version into the project directory. Note that here we will download the Oregon zip file.

Make certain that the folder is unzipped into the project directory. We must copy the DynamoDBLocal lib and DynamoDBLocal.jar files into the project directory root.

Now execute java -Djava.library.path=./DynamoDBLocal lib -jar DynamoDBLocal.jar -sharedDb to start the database.

In this section, we will include that line as a script in the package. json document:

{
"scripts": {
"start:db": "java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb"
}
}

First, look after running DynamoDB

Now that our script is in package.json, we can execute npm run start:db to get it running:

$ npm run start:db
> hello-dynamodb-local@1.0.0 start:db /[REDACTED]/hello-dynamodb-local
> java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
Initializing DynamoDB Local with the following configuration: Port: 8000
InMemory: false
DbPath: null
SharedDb: true
shouldDelayTransientStatuses: false
CorsParams: *
2020-12-24 09:08:30.030:INFO::main: Logging initialized @1270ms to org.eclipse.jetty.util.log.StdErrLog

When it is up and running, we can use the AWS CLI to interact with our table locally.

Executing aws dynamodb list-tables --endpoint-url http://localhost:8000 we will get the following:

{
"TableNames": []
}

Despite the fact that we presently have no tables, we are having success setting them up.

Setting up NoSQL Workbench

AWS also provides a NoSQL Workbench program that can serve as a graphical user interface for us to use.

We can try it out by going to the NoSQL Workbench installation page and download the system program.

Adding a Table via the NoSQL Workbench

If we go to Amazon DynamoDB on the left-hand side panel after opening the workbench, we will see several sample models that we can hover over and import.

Now, we can use the command aws dynamodb list-tables —endpoint-url http://localhost:8000. We’ll notice that the data has been imported into the local database:

1{2 "TableNames": ["Forum", "Reply", "Thread"]3}

Running queries with the NoSQL Workbench

Select the Operation builder on the left-hand side panel to perform queries locally.

Once there, select Add Connection, then pick the DynamoDB local tab and confirm that the details for the localhost port are accurate before adding the connection.

Return to the Amazon DynamoDB tab and open the AWS Discussion Forum Data Model by hovering over it. This brings us to the Data modeler. Select Visualize data model to open the Visualizer from this menu. Finally, choose Commit to Amazon DynamoDB, and from the Saved connections menu, choose the localhost instance to which we want to commit the tables.

Now we can choose the Forum table in the operation builder and open the connection. Exploring the table’s data offers us an idea of some simple queries we can run.

We may then enter a value such as Amazon MQ into the needed Partition key value by selecting the Expand operation, GetItem from the data plane operations menu, and Forum from the table dropdown.

In addition, if we choose to Generate code, NoSQL Workbench will generate some code in Python, JavaScript, and Java for us to utilize or be inspired by.

We can now plan out our tables and run CRUD operations to test them from the NoSQL Workbench and our local DynamoDB instance.

[Need assistance with similar queries? We are here to help]

Conclusion

To conclude, we learned more about the AWS DynamoDB NoSQL workbench, built up a simple way to run DynamoDB locally from a simple project, investigated the NoSQL Workbench, and performed a basic GetItem request to demonstrate how we can connect with the local DynamoDB with the support of our AWS support services at Bobcares.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF