X

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

Oracle NoSQL Database - Access your NoSQL tables and data within IntelliJ

Michael Brey
Director of NoSQL Development

Guest post by Anjani Surekha Pothula

This blog is part two of the series on Accessing NoSQL tables and data within Intellij. In the first blog, we learned how to connect to Oracle NoSQL Database on the cloud from IntelliJ. We also noticed that the entire process does not take more than 10 minutes, provided IntelliJ is installed on your system already. In this blog, I will walk you through the steps to connect to your Oracle NoSQL Database from IntelliJ. I will demonstrate how to use the Oracle NoSQL Database Connector plugin to connect and view the NoSQL Database objects from IntelliJ.

What is Oracle NoSQL IntelliJ Plugin? How does it help a NoSQL Java developer?

If this is the first blog that you are reading in this series and you are looking for an overview of the Oracle NoSQL IntelliJ Plugin, see Develop Oracle Nosql Database Cloud Service Applications with Intellij.  You can use the NoSQL IntelliJ Plugin with your Oracle NoSQL Database On-Premise KVStore and view the table updates directly from IntelliJ every time you execute your Java code. You can accomplish this in three simple steps as depicted below:

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. All the examples shown in this blog use Oracle NoSQL Database IntelliJ Plugin Version 1.2.2. The latest version of the plugin might be different from this.

  • 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 KVStore

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 KVStore.

What do you need?

  • Ensure that:
    • The KVStore is deployed and running.
    • The Oracle NoSQL Database Proxy is started. See Configuring the Proxy. Starting with the release 19.5, the proxy is bundled along with the Oracle NoSQL Database download package.
  • Identify the values for the following parameters.

 

Parameter

Description

Proxy URL

http://<proxy_host>:<proxy_http_port>   or 

https://<proxy_host>:<proxy_http_port> where:

  • http or https indicates the store security. For a secure KVStore, the proxy URL begins with https.
  • proxy_host is the host name of the machine to host the proxy service. This should match the host you configured earlier.

See Configuring the Proxy.

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.

For example, 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.

Security

Select SSL for secure KVStores. In case you are creating connection to a non-secure KVStore, select None.

The default value is SSL. In case of secure KVStores, the proxy URL must begin with https.

Username

User name to connect to the secure store. This value is required only if you select SSL for the Security parameter.

Password Password to connect to the secure store. This value is required only if you select SSL for the Security parameter.
TrustStore

Browse to the location where the certificate trust file is placed. See Using the Proxy in a Secure kvstore.

 

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 SchemaExplorer from the View menu under the Tool Windows option.

  • As you’ve not made a connection yet with your KVStore, 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 Onprem from the drop-down menu for the connection type.

    • Enter the values for the connection parameters that you have for your Oracle NoSQL Database KVStore 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 KVStore 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!

You can even query the NoSQL tables in the Schema Explorer to see their data as shown below.

To know more, refer to our official documentation. Visit NoSQL Database Cloud Service on oracle.com to explore the service features and benefits.

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.