Java – Connect to Azure Cosmos DB (SQL API) No.11

In this blog, how to connect to Cosmos DB SQL API by Java is shown. Contents ▼1. Connect to Azure Cosmos DB▼2. Prerequisites2-1. Prepare for a trial free Azure Cosmos DB Account, not necessary for a subscription2-2. Enable Maven auto-import in IntelliJ IDEA2-3. Update Pom.xml▼3. Connect to Cosmos DB by Java3-1. Develop a Java code for the connection to Azure Cosmos DB3-2. Results of running this code.▼4. Preference▼1. Connect to Azure Cosmos DB Azure Cosmos DB is NoSQL Database. it is not Relational Database. we don’t need to set schema and table beforehand. we need to set partition key for a collection of a container to distribute data into the … Continue reading “Java – Connect to Azure Cosmos DB (SQL API) No.11”

Java -Retrieve data on Azure Cosmos DB (SQL API) No.15

In this blog, how to retrieve data on Azure Cosmos DB is shown. Contents ▼1. Retrieve Data on Azure Cosmos DB (SQL API) ▼2. Prerequisites2-1. Free trial Cosmos DB account is available without subscription.2-2. Enabling Maven auto-import in IntelliJ IDEA on Ubuntu2-3. Creating sample data▼3. Java code to retrieve data on Cosmos DB (SQL API)3-1. Creating Java code to find item3-2. The result of executing the query▼4. Reference▼1. Retrieve Data on Azure Cosmos DB (SQL API)  Using steam() and iterableByPage() in CosmosPagedIterable<T> class of com.azure.cosmos.util library, We can retrieve data on Cosmos DB. ▼2. Prerequisites 2-1. Free trial Cosmos DB account is available without subscription. https://azure.microsoft.com/ja-jp/try/cosmosdb/ 2-2. Enabling Maven auto-import in IntelliJ IDEA on … Continue reading “Java -Retrieve data on Azure Cosmos DB (SQL API) No.15”

Java – Create Database on Azure Cosmos DB (SQL API) No.14

In this blog, how to create database on Azure Cosmos DB (SQL API) using Java is shown. Contents ▼1. Some kinds of Azure Cosmos DB▼2. Prerequisites2-1. Free trial Cosmos DB account is available without subscription.2-2. Enable Maven auto-import in IntelliJ IDEA on Ubuntu▼3. Creating Database , Container and Data on Cosmos DB (SQL API) の Database, Container by Java3-1. Java Coding3-2. A part of Results3-3. Azure Portal of Cosmos DB shows data▼4. Preference▼1. Some kinds of Azure Cosmos DB Azure Cosmos DB is NoSQL Database. there are some kinds of API below. Choose an API in Azure Cosmos DB ▼2. Prerequisites 2-1. Free trial Cosmos DB account is available without … Continue reading “Java – Create Database on Azure Cosmos DB (SQL API) No.14”

Java – Delete Data on Azure Cosmos DB (SQL API) No.18

How to delete data on Azure Cosmos DB SQL API is written in this blog. Contents ▼1. Delete data on Azure Cosmos DB (SQL API)▼2. Prerequisites2-1. Free trial Cosmos DB account is available without subscription.2-2. Enable Maven auto-import in IntelliJ IDEA on Ubuntu2-3.  Using Azure Cosmos DB Java SDK v4 4.8.02-4. Creating Database and container2-5. Creating data▼3. Delete items on Cosmos DB (SQL API)3-1. Deleting data using Java3-2. A part of output of executing the code▼4. Reference▼1. Delete data on Azure Cosmos DB (SQL API) Multiple Items in container on Azure Cosmos DB (SQL API) will be deleted using CosmosContainer.<T>deleteItem of Java. ▼2. Prerequisites 2-1. Free trial Cosmos DB account … Continue reading “Java – Delete Data on Azure Cosmos DB (SQL API) No.18”

Java – Save the results of select on Azure Cosmos DB SQL API into Azure Blob Storage No.74

I will show Java code that save results of select query as a JSON file into Azure Blob Storage. In the previous blog, I shared how to save results of select query on Cosmos DB as a JSON file into the local path. in this blog, I will save results into Azure Blob Storage. Contents ▼1. Migration data from Cosmos DB to Azure Blob Storage▼2. Prerequisites2-1. Free trial Azure Cosmos DB Account2-2. Install Visual Studio Code2-3. Install Maven2-4. Create a sample data▼3. Save the results of select on Azure Cosmos DB SQL API as JSON file into Azure Blob Storage using Java Code3-1. Make a directory3-2. Deploy an Apache Maven project3-3. Remove … Continue reading “Java – Save the results of select on Azure Cosmos DB SQL API into Azure Blob Storage No.74”

Java – Azure Cosmos DB (SQL) : Save results of select into a JSON file No.73

I will show Java code that save results of select query into a JSON file. In the previous blog, I shared how to save results of select query on Cosmos DB into a text file. in this blog, I will save results into a JSON file. Contents ▼1. What is a JSON format?▼2. Prerequisites2-1. Free trial Azure Cosmos DB Account2-2. Installing Visual Studio Code2-3. Installing Maven2-4. Creating a sample data▼3. Java code for saving results of select query on Cosmos DB into a JSON file3-1. Making a directory3-2. Deploying an Apache Maven project3-3. Removing the existing App.java and AppTest.java3-4. Starting Visual Studio Code3-5. Adding Cosmos DB library into pom.xml and save it … Continue reading “Java – Azure Cosmos DB (SQL) : Save results of select into a JSON file No.73”

Java – Azure Cosmos DB (SQL) : Save results of select into a text file No.72

I will show Java code that save results of select query into a text file. Contents ▼1. Prerequisites1-1. Free Azure Cosmos DB Account1-2. Installing Visual Studio Code1-3. Installing Maven1-4. Creating sample data▼2. Java code for saving results of select query on Cosmos DB into a text file2-1. Making a directory2-2. Deploying Apache Maven project2-3. Removing the existing App.java and AppTest.java2-4. Starting Visual Studio Code2-5. Adding Cosmos DB library into pom.xml and save it (Ctrl+S)2-6. Coding for saving results of select query on Cosmos DB into a text file2-7. Checking output of text file▼3. Reference▼1. Prerequisites 1-1. Free Azure Cosmos DB Account You can use trial free Cosmos DB Accounthttps://azure.microsoft.com/ja-jp/try/cosmosdb/ 1-2. … Continue reading “Java – Azure Cosmos DB (SQL) : Save results of select into a text file No.72”