Touch NoSQL with Python using the Oracle NoSQL Database Cloud Simulator

Background of this post

Oracle Cloud also has NoSQL (Oracle NoSQL Database Cloud) For NoSQL, how do you execute DDL and DML in Python? I wanted to investigate.

There is an Oracle NoSQL Database Cloud simulator, You can try it on your local PC, so I've summarized the steps to use the Oracle NoSQL Database Cloud Simulator and how to run DDL and DML in Python.

In this post It will be the contents to touch the Oracle NoSQL Database Cloud simulator from Python in the Windows 10 environment.

The prerequisite is the procedure from the state where Anaconda-Python 3.7 version is installed in the Windows 10 environment.

What is the Oracle NoSQL Database Cloud Simulator?

https://docs.cloud.oracle.com/ja-jp/iaas/nosql-database/doc/developing-oracle-nosql-database-cloud-simulator.html

The Oracle NoSQL Database Cloud Simulator simulates cloud services and You can write and test your application locally without accessing the Oracle NoSQL Database Cloud Service. The Oracle NoSQL Database Java SDK contains some samples for developers to use.

Before starting with Oracle NoSQL Database Cloud Service Develop applications with Oracle NoSQL Database Cloud Simulator to understand basic examples.

⇒ The Oracle NoSQL Database Cloud Simulator prepares an environment where you can try apps (Python, Java, Node.js, Go) in a local environment (notebook PC) without connecting to Oracle Cloud.

Environmental preparation

Prepare the following two environmental preparations ** 1. Download Oracle NoSQL Database Cloud Simulator ** ** 2. Install Oracle NoSQL Database Python SDK **

The prerequisite is the procedure from the state where Anaconda-Python 3.7 version is installed in the Windows 10 environment. To install Anaconda, go to here

1. Download Oracle NoSQL Database Cloud Simulator

Access https://docs.cloud.oracle.com/ja-jp/iaas/nosql-database/doc/downloading-oracle-nosql-cloud-simulator.html#GUID-3E11C056-B144-4EEA-8224-37F4C3CB83F6

   

Download oracle-nosql-cloud-simulator-1.2.0.zip to any folder and unzip it.

Requirements for running the Oracle NoSQL Database Cloud Simulator

**-Java JDK version 10 or higher must be installed on your machine. ** ** ** · 5 GB or more of available disk space to install the Oracle NoSQL Database Cloud Simulator. ** **

If Java JDK version 10 or higher is not installed

https://www.oracle.com/java/technologies/javase-downloads.html Click [JDK Download] here to download the Windows x64 Installer.

  1. Double-click the downloaded jdk-14.0.1_windows-x64_bin.exe.
  2. Install Java SDK by following the steps below      

2. Install Oracle NoSQL Database Python SDK

Launch Anaconda prompt

At the Anaconda prompt

pip install borneo

And press [Enter]

Launch the Oracle NoSQL Database Cloud Simulator

  1. Start command prompt Command prompt is started

  2. Put the Java JDK path in the environment variable (PATH) The path of the Java JDK installed this time is C: \ Program Files \ Java \ jdk-14.0.1 \ bin Set the Java JDK path in the environment variable PATH with set PATH = C: \ Program Files \ Java \ jdk-14.0.1 \ bin;% PATH% Check the Java JDK version by typing Java -version ⇒ Confirm that the Java JDK 14 installed this time is used. At the command prompt Move to the directory where you unzipped oracle-nosql-cloud-simulator-1.2.0 Use the cd command to move to the directory where you unzipped oracle-nosql-cloud-simulator-1.2.0

Enter the following command at the command prompt

java -Djava.util.logging.config.file=logging.properties -jar cloudsim/lib/cloudsim.jar -root . 

It will be in the state of being started with "Oracle NoSQL Cloud Simulator is ready"

How to Stop Oracle NoSQL Database Cloud Simulator

Press [Ctrl] + C to stop.

Try running the sample script

Download the python sample script (nosql-python-sdk-5.2.0.zip) from GitHub.  https://github.com/oracle/nosql-python-sdk/releases

Unzip nosql-python-sdk-5.2.0.zip to any folder. Sample scripts are stored in the [examples] folder.

Launch Anaconda prompt

Run the sample script (try running single_data_ops.py) Drag the sample script and press the [Enter] key. * Oracle NoSQL Database Cloud Simulator must be running

Execution result of single_data_ops.py

For more information, see Oracle NoSQL Database Python SDK (Japanese), [SQL Reference for Oracle NoSQL Database](SELECT Expression)](https://docs.oracle.com/en/database/other-databases/nosql-database/19.5/sqlreferencefornosql/select-expression.html ) Was also helpful.

multi_data_ops.py and table_ops.py can also be executed as sample scripts.

reference

-Oracle NoSQL Database Python SDK   https://docs.oracle.com/cd/E83857_01/paas/nosql-cloud/sdk/index.html

-SQL Reference for Oracle NoSQL Database (SELECT Expression) https://docs.oracle.com/en/database/other-databases/nosql-database/19.5/sqlreferencefornosql/select-expression.html

· NoSQL database manual   https://docs.cloud.oracle.com/ja-jp/iaas/nosql-database/index.html

-NoSQL Database Manual (Development with Oracle NoSQL Database Cloud Simulator)   https://docs.cloud.oracle.com/ja-jp/iaas/nosql-database/doc/developing-oracle-nosql-database-cloud-simulator.html

Recommended Posts

Touch NoSQL with Python using the Oracle NoSQL Database Cloud Simulator
Behind the flyer: Using Docker with Python
Try using Python with Google Cloud Functions
Working with OpenStack using the Python SDK
Change the time zone with Docker in Oracle Database
I tried to touch the CSV file with Python
Control smart light "Yeelight" from Python without using the cloud
[S3] CRUD with S3 using Python [Python]
Using Quaternion with Python ~ numpy-quaternion ~
[Python] Using OpenCV with Python (Basic)
[Python] LASSO regression with equation constraints using the multiplier method
Let's touch the API of Netatmo Weather Station with Python. #Python #Netatmo
The true value of Terraform automation starting with Oracle Cloud
Using OpenCV with Python @Mac
Send using Python with Gmail
Control the motor with a motor driver using python on Raspberry Pi 3!
[In-Database Python Analysis Tutorial with SQL Server 2017] Step 6: Using the model
Visualize the frequency of word occurrences in sentences with Word Cloud. [Python]
Try using FireBase Cloud Firestore in Python for the time being
Complement python with emacs using company-jedi
Harmonic mean with Python Harmonic mean (using SciPy)
[Package cloud] Manage python packages with package cloud
[Python] Using OpenCV with Python (Image Filtering)
ROS Lecture 108 Using Database (mongo) with ROS
[Python] Using OpenCV with Python (Image transformation)
[Python] Using OpenCV with Python (Edge Detection)
Get the weather with Python requests
Get the weather with Python requests 2
Run XGBoost with Cloud Dataflow (Python)
Hit the Etherpad-lite API with Python
Install the Python plugin with Netbeans 8.0.2
Using cgo with the go command
Extract the targz file using python
Notes on using rstrip with python.
Master the type with Python [Python 3.9 compatible]
Try using the Python Cmd module
When using MeCab with virtualenv python
Precautions when using six with Python 2.5
Connect your SQL Server database to Alibaba Cloud Function Compute using Python
I tried using "Streamlit" which can do the Web only with Python
Create a record with attachments in KINTONE using the Python requests module
Get and estimate the shape of the head using Dlib and OpenCV with python
Make the Python console covered with UNKO
[AWS] Using ini files with Lambda [Python]
Run the IDCF cloud CLI with Docker
Try mathematical formulas using Σ with python
Try using the Kraken API in Python
Using Python and MeCab with Azure Databricks
Check the existence of the file with python
Try using the camera with Python's OpenCV
Socket communication using socketserver with python now
[Python] Get the variable name with str
Tweet using the Twitter API in Python
Search the maze with the python A * algorithm
Check stock prices with slackbot using python
Tips for using python + caffe with TSUBAME
Download files on the web with Python
[GCP] Operate Google Cloud Storage with Python
Reboot the router using Python, Selenium, PhantomJS
Touch virtual robots with Pepper's Python SDK
Text mining with Python ② Visualization with Word Cloud