X

The Oracle NoSQL Database Blog covers all things Oracle NoSQL Database. On-Prem, Cloud and more.

Develop Oracle NoSQL Database Cloud Service Applications with IntelliJ

Michael Brey
Director of NoSQL Development

Guest post by Anjani Surekha Pothula

Are you a NoSQL developer coding in Java?

Do you use IDEs such as IntelliJ and Eclipse for developing your application code?

If you answered yes to the above questions, I am sure you would have wished to view the NoSQL Database schema and objects such as tables, indexes, and data right from the IDE.

In a typical setup, every time you test your application code, you must access the NoSQL Database objects from either your cloud service account or other tools such as SQL Developer to verify the updates. However, if you can browse the NoSQL Database right from IntelliJ and view the updates as you execute your code side by side, you will save a lot of time and effort. Oracle NoSQL Database team released a new plugin that lets you view the NoSQL Database alongside your java code within IntelliJ !

This is the first out of two blogs where I will walk you through the steps to connect to your Oracle NoSQL Database schema from IntelliJ. In this article, I will demonstrate how to use the Oracle NoSQL Database Connector plugin to connect and view the NoSQL Database objects from IntelliJ. After going through this, you will notice that the entire process does not take more than 10 minutes!

Install the Plugin in IntelliJ

Oracle NoSQL Database Connector is available for download from the JetBrains plug-in repository and the Oracle NoSQL Database Downloads page.

  •     Download the zip file and save it on your disk.
  •     Open the IntelliJ Settings from the File menu, and select the Plugins setting.
  •     Click the Settings icon (flower icon), and select Install Plugin from Disk…
  •     Browse to the downloaded zip file and click OK.

That’s it ! You installed the plugin into your IntelliJ IDE. Just restart the IDE to activate the newly installed plugin.

Connect to your Oracle NoSQL Database Cloud Service

This is the crux of the entire process because you must provide all the required parameters accurately to make a successful connection with the NoSQL Database on your cloud service account.

What do you need?

Parameter

Description

Sample Value

Endpoint

Regional network access point to the Oracle NoSQL Database Cloud Service.

https://nosql.us-ashburn-1.oci.oraclecloud.com (for the Ashburn Oracle NoSQL Database Cloud Service region identifier in the North America region). See Data Regions and Associated Service Endpoints for a list of service endpoints.

SDK Path

Complete path to the directory where you extracted the Oracle NoSQL Database Java SDK. You can download the latest Java SDK from the Oracle NoSQL Database Downloads page.

D:\oracle-nosql-java-sdk-<latest version#>

You must configure the SDK Path to the top level directory for the SDK that contains the doc, examples, and lib directories.

Tenant ID

Tenancy's OCID for your Oracle NoSQL Database Cloud Service.

See Where to get the Tenancy's OCID and User's OCID in Oracle Cloud Infrastructure Documentation.

User ID

User's OCID for your Oracle NoSQL Database Cloud Service.

Fingerprint

The fingerprint and passphrase of the signing key created while generating and uploading the API Signing Key.

See the following resources in Oracle Cloud Infrastructure Documentation:

Private Key

Fully qualified path to the private key file.

For the application user, an API signing key must be generated and uploaded. See How to Generate an API Signing Key to generate the signing key with an optional passphrase.

Compartment (Optional)

The compartment name for your NoSQL database tables.

To know more about compartments, and locate the compartment for your NoSQL tables, see Understanding Compartments.

If no value is specified, it defaults to the Root compartment.

 

How do you connect?

  • As you’ve installed the plugin in the previous step, you can see a window called Schema Explorer in your IDE. If you don’t see it, select Schema Explorer from the View menu under the Tool Windows option.
  •  As you’ve not made a connection yet with your cloud service account, you will not see your NoSQL Database tables in the Schema Explorer window.
  • To make a connection:
  • Open the IntelliJ Settings from the File menu.
  • Click Connections under Oracle NoSQL in the Tools section.
  • Under Tools > Oracle NoSQL > Connections, select Cloud from the drop-down menu for the connection type.
  • Enter the values for the connection parameters that you have for your Oracle NoSQL Database Cloud Service account, and click OK. For descriptions of connection parameters, refer to the above table.

That connects your NoSQL Database to your Intellij IDE!


Access your NoSQL Database from IntelliJ

Refresh the Schema Explorer window and you can see the tables in your Oracle NoSQL Database Cloud Service right here in the IntelliJ IDE. Browse the tables and their data easily from this window.

Execute your code and see the data updates instantly in the Schema Explorer window with just a single refresh!

To know more, refer to our official documentation.

Acknowledgment: A special thanks to Vinaypal Singh from the Engineering team for the technical guidance, and Michael Brey, Dave Rubin, and Suresh Rajan for proofreading this blog and suggesting changes.

 

 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.