You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This quickstart shows how to use Java and the Azure Cosmos DB [Cassandra API](cassandra-introduction.md) to build a profile app by cloning an example from GitHub. This quickstart also shows you how to use the web-based Azure portal to create an Azure Cosmos DB account.
24
-
25
-
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, table, key-value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
23
+
In this quickstart, you create an Azure Cosmos DB Cassandra API account, and use a Cassandra Java app cloned from GitHub to create a Cassandra database and container. Azure Cosmos DB is a multi-model database service that lets you quickly create and query document, table, key-value, and graph databases with global distribution and horizontal scale capabilities.
26
24
27
25
## Prerequisites
28
26
29
-
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)] Alternatively, you can [Try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments.
30
-
31
-
In addition, you need:
32
-
33
-
*[Java Development Kit (JDK) version 8](https://aka.ms/azure-jdks)
34
-
* Be sure to set the JAVA_HOME environment variable to point to the folder where the JDK is installed.
35
-
*[Download](https://maven.apache.org/download.cgi) and [install](https://maven.apache.org/install.html) a [Maven](https://maven.apache.org/) binary archive
36
-
* On Ubuntu, you can run `apt-get install maven` to install Maven.
37
-
*[Git](https://www.git-scm.com/)
38
-
* On Ubuntu, you can run `sudo apt-get install git` to install Git.
27
+
- An Azure account with an active subscription. [Create one for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio). Or [try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription.
28
+
-[Java Development Kit (JDK) 8](https://www.azul.com/downloads/azure-only/zulu/?&version=java-8-lts&architecture=x86-64-bit&package=jdk). Point your `JAVA_HOME` environment variable to the folder where the JDK is installed.
29
+
- A [Maven binary archive](https://maven.apache.org/download.cgi). On Ubuntu, run `apt-get install maven` to install Maven.
30
+
-[Git](https://www.git-scm.com/downloads). On Ubuntu, run `sudo apt-get install git` to install Git.
39
31
40
32
## Create a database account
41
33
@@ -145,37 +137,37 @@ The following snippets are from the *src/main/java/com/azure/cosmosdb/cassandra/
145
137
146
138
Now go back to the Azure portal to get your connection string information and copy it into the app. The connection string details enable your app to communicate with your hosted database.
147
139
148
-
1. In the [Azure portal](https://portal.azure.com/), select**Connection String**.
140
+
1. In your Azure Cosmos DB account inthe [Azure portal](https://portal.azure.com/), select**Connection String**.
149
141
150
142

151
143
152
144
2. Use the  button on the right side of the screen to copy the CONTACT POINT value.
153
145
154
-
3. Open the `config.properties` file from `C:\git-samples\azure-cosmosdb-cassandra-java-getting-started\java-examples\src\main\resources` folder.
146
+
3. Open the *config.properties* file from the *C:\git-samples\azure-cosmosdb-cassandra-java-getting-started\java-examples\src\main\resources* folder.
155
147
156
148
3. Paste the CONTACT POINT value from the portal over `<Cassandra endpoint host>` on line 2.
157
149
158
-
Line 2 of config.properties should now look similar to
150
+
Line 2 of *config.properties* should now look similar to
3. Go back to portal and copy the USERNAME value. Past the USERNAME value from the portal over `<cassandra endpoint username>` on line 4.
154
+
3. Go back to the portal and copy the USERNAME value. Past the USERNAME value from the portal over `<cassandra endpoint username>` on line 4.
163
155
164
-
Line 4 of config.properties should now look similar to
156
+
Line 4 of *config.properties* should now look similar to
165
157
166
158
`cassandra_username=cosmos-db-quickstart`
167
159
168
-
4. Go back to portal and copy the PASSWORD value. Paste the PASSWORD value from the portal over `<cassandra endpoint password>` on line 5.
160
+
4. Go back to the portal and copy the PASSWORD value. Paste the PASSWORD value from the portal over `<cassandra endpoint password>` on line 5.
169
161
170
-
Line 5 of config.properties should now look similar to
162
+
Line 5 of *config.properties* should now look similar to
171
163
172
164
`cassandra_password=2Ggkr662ifxz2Mg...==`
173
165
174
166
5. On line 6, if you want to use a specific SSL certificate, then replace `<SSL key store file location>` with the location of the SSL certificate. If a value is not provided, the JDK certificate installed at <JAVA_HOME>/jre/lib/security/cacerts is used.
175
167
176
168
6. If you changed line 6 to use a specific SSL certificate, update line 7 to use the password for that certificate.
177
169
178
-
7. Save the `config.properties` file.
170
+
7. Save the *config.properties* file.
179
171
180
172
## Run the Java app
181
173
@@ -199,7 +191,7 @@ Now go back to the Azure portal to get your connection string information and co
199
191
200
192
The terminal window displays notifications that the keyspace and table are created. It then selects and returns all users in the table and displays the output, and then selects a row by ID and displays the value.
201
193
202
-
Select **CTRL + C** to stop execution of the program and close the console window.
194
+
Press Ctrl+C to stop execution of the program and close the console window.
203
195
204
196
4. In the Azure portal, open **Data Explorer** to query, modify, and work with this new data.
205
197
@@ -215,7 +207,7 @@ Now go back to the Azure portal to get your connection string information and co
215
207
216
208
## Next steps
217
209
218
-
In this quickstart, you've learned how to create an Azure Cosmos DB account, Cassandra database, and container using the Data Explorer, and run an app to do the same thing programmatically. You can now import additional data into your Azure Cosmos container.
210
+
In this quickstart, you learned how to create an Azure Cosmos DB account with Cassandra API, and run a Cassandra Java app that creates a Cassandra database and container. You can now import additional data into your Azure Cosmos DB account.
219
211
220
212
> [!div class="nextstepaction"]
221
213
> [Import Cassandra data into Azure Cosmos DB](cassandra-import-data.md)
Copy file name to clipboardExpand all lines: articles/cosmos-db/create-cassandra-nodejs.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,13 @@ ms.date: 09/24/2018
18
18
> *[Python](create-cassandra-python.md)
19
19
>
20
20
21
-
This quickstart shows how to use Node.js and the Azure Cosmos DB [Cassandra API](cassandra-introduction.md) to build a profile app by cloning an example from GitHub. This quickstart also shows you how to use the web-based Azure portal to create an Azure Cosmos DB account.
22
-
23
-
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, table, key-value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
21
+
In this quickstart, you create an Azure Cosmos DB Cassandra API account, and use a Cassandra Node.js app cloned from GitHub to create a Cassandra database and container. Azure Cosmos DB is a multi-model database service that lets you quickly create and query document, table, key-value, and graph databases with global distribution and horizontal scale capabilities.
24
22
25
23
## Prerequisites
26
24
27
-
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)] Alternatively, you can [Try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments.
28
-
29
-
In addition, you need:
30
-
*[Node.js](https://nodejs.org/en/) version v0.10.29 or higher
31
-
*[Git](https://git-scm.com/)
25
+
- An Azure account with an active subscription. [Create one for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio). Or [try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription.
26
+
-[Node.js 0.10.29+](https://nodejs.org/).
27
+
-[Git](https://www.git-scm.com/downloads).
32
28
33
29
## Create a database account
34
30
@@ -150,7 +146,7 @@ This step is optional. If you're interested to learn how the code creates the da
150
146
151
147
Now go back to the Azure portal to get your connection string information and copy it into the app. The connection string enables your app to communicate with your hosted database.
152
148
153
-
1. In the [Azure portal](https://portal.azure.com/), select**Connection String**.
149
+
1. In your Azure Cosmos DB account inthe [Azure portal](https://portal.azure.com/), select**Connection String**.
154
150
155
151
Use the  button on the right side of the screen to copy the top value, the CONTACT POINT.
156
152
@@ -198,7 +194,7 @@ Now go back to the Azure portal to get your connection string information and co
198
194
199
195

200
196
201
-
Press CTRL + C to stop execution of the program and close the console window.
197
+
Press CTRL+C to stop execution of the program and close the console window.
202
198
203
199
4. In the Azure portal, open **Data Explorer** to query, modify, and work with this new data.
204
200
@@ -214,7 +210,7 @@ Now go back to the Azure portal to get your connection string information and co
214
210
215
211
## Next steps
216
212
217
-
In this quickstart, you've learned how to create an Azure Cosmos DB account, create a container using the Data Explorer, and run an app. You can now import additional data to your Cosmos DB account.
213
+
In this quickstart, you learned how to create an Azure Cosmos DB account with Cassandra API, and run a Cassandra Node.js app that creates a Cassandra database and container. You can now import additional data into your Azure Cosmos DB account.
218
214
219
215
> [!div class="nextstepaction"]
220
216
> [Import Cassandra data into Azure Cosmos DB](cassandra-import-data.md)
Copy file name to clipboardExpand all lines: articles/cosmos-db/create-cassandra-python.md
+15-19Lines changed: 15 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,14 @@ ms.date: 09/24/2018
18
18
> *[Python](create-cassandra-python.md)
19
19
>
20
20
21
-
This quickstart shows how to use Python and the Azure Cosmos DB [Cassandra API](cassandra-introduction.md) to build a profile app by cloning an example from GitHub. This quickstart also shows you how to use the web-based Azure portal to create an Azure Cosmos DB account.
22
-
23
-
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, table, key-value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
21
+
In this quickstart, you create an Azure Cosmos DB Cassandra API account, and use a Cassandra Python app cloned from GitHub to create a Cassandra database and container. Azure Cosmos DB is a multi-model database service that lets you quickly create and query document, table, key-value, and graph databases with global distribution and horizontal scale capabilities.
24
22
25
23
## Prerequisites
26
24
27
-
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)] Alternatively, you can [Try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments.
28
-
29
-
In addition, you need:
30
-
*[Python](https://www.python.org/downloads/) version v2.7.14
31
-
*[Git](https://git-scm.com/)
32
-
*[Python Driver for Apache Cassandra](https://github.com/datastax/python-driver)
25
+
- An Azure account with an active subscription. [Create one for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio). Or [try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription.
26
+
-[Python 2.7.14+ or 3.4+](https://www.python.org/downloads/).
27
+
-[Git](https://git-scm.com/downloads).
28
+
-[Python Driver for Apache Cassandra](https://github.com/datastax/python-driver).
33
29
34
30
## Create a database account
35
31
@@ -61,7 +57,7 @@ Now let's clone a Cassandra API app from GitHub, set the connection string, and
61
57
62
58
## Review the code
63
59
64
-
This step is optional. If you're interested to learn how the code creates the database resources, you can review the following snippets. The snippets are all taken from the pyquickstart.py file. Otherwise, you can skip ahead to [Update your connection string](#update-your-connection-string).
60
+
This step is optional. If you're interested to learn how the code creates the database resources, you can review the following snippets. The snippets are all taken from the *pyquickstart.py* file. Otherwise, you can skip ahead to [Update your connection string](#update-your-connection-string).
65
61
66
62
* The username and password values were set using the connection string page in the Azure portal. The `path\to\cert` provides a path to an X509 certificate.
67
63
@@ -130,13 +126,13 @@ This step is optional. If you're interested to learn how the code creates the da
130
126
131
127
Now go back to the Azure portal to get your connection string information and copy it into the app. The connection string enables your app to communicate with your hosted database.
132
128
133
-
1. In the [Azure portal](https://portal.azure.com/), select **Connection String**.
129
+
1. In your Azure Cosmos DB account in the [Azure portal](https://portal.azure.com/), select **Connection String**.
134
130
135
131
Use the  button on the right side of the screen to copy the top value, the CONTACT POINT.
136
132
137
133

138
134
139
-
2. Open the `config.py` file.
135
+
2. Open the *config.py* file.
140
136
141
137
3. Paste the CONTACT POINT value from the portal over `<FILLME>` on line 10.
142
138
@@ -156,17 +152,17 @@ Now go back to the Azure portal to get your connection string information and co
156
152
157
153
`'password' = '2Ggkr662ifxz2Mg==`';`
158
154
159
-
6. Save the config.py file.
155
+
6. Save the *config.py* file.
160
156
161
157
## Use the X509 certificate
162
158
163
-
1. Download the Baltimore CyberTrust Root certificate locally from [https://cacert.omniroot.com/bc2025.crt](https://cacert.omniroot.com/bc2025.crt). Rename the file using the file extension `.cer`.
159
+
1. Download the Baltimore CyberTrust Root certificate locally from [https://cacert.omniroot.com/bc2025.crt](https://cacert.omniroot.com/bc2025.crt). Rename the file using the file extension *.cer*.
164
160
165
161
The certificate has serial number `02:00:00:b9` and SHA1 fingerprint `d4🇩🇪20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74`.
166
162
167
-
2. Open `pyquickstart.py` and change the `path\to\cert` to point to your new certificate.
163
+
2. Open *pyquickstart.py* and change the `path\to\cert` to point to your new certificate.
168
164
169
-
3. Save `pyquickstart.py`.
165
+
3. Save *pyquickstart.py*.
170
166
171
167
## Run the Python app
172
168
@@ -181,15 +177,15 @@ Now go back to the Azure portal to get your connection string information and co
181
177
python -m pip install pyopenssl
182
178
```
183
179
184
-
2. Run the following command to start your node application:
180
+
2. Run the following command to start your Python application:
185
181
186
182
```
187
183
python pyquickstart.py
188
184
```
189
185
190
186
3. Verify the results as expected from the command line.
191
187
192
-
Press CTRL + C to stop execution of the program and close the console window.
188
+
Press CTRL+C to stop execution of the program and close the console window.
193
189
194
190

195
191
@@ -207,7 +203,7 @@ Now go back to the Azure portal to get your connection string information and co
207
203
208
204
## Next steps
209
205
210
-
In this quickstart, you've learned how to create an Azure Cosmos DB account, create a container using the Data Explorer, and run an app. You can now import additional data to your Cosmos DB account.
206
+
In this quickstart, you learned how to create an Azure Cosmos DB account with Cassandra API, and run a Cassandra Python app that creates a Cassandra database and container. You can now import additional data into your Azure Cosmos DB account.
211
207
212
208
> [!div class="nextstepaction"]
213
209
> [Import Cassandra data into Azure Cosmos DB](cassandra-import-data.md)
3.In the **Create Azure Cosmos DB Account** page, enter the settings for the new Azure Cosmos DB account.
22
+
23
+
3.On the **Create Azure Cosmos DB Account** page, enter the settings for the new Azure Cosmos DB account.
20
24
21
25
Setting|Value|Description
22
26
---|---|---
23
27
Subscription|Your subscription|Select the Azure subscription that you want to use for this Azure Cosmos DB account.
24
-
Resource Group|Create new<br><br>Then enter the same unique name as provided in ID|Select **Create new**. Then enter a new resource-group name for your account. For simplicity, use the same name as your ID.
25
-
Account Name|Enter a unique name|Enter a unique name to identify your Azure Cosmos DB account. Because *documents.azure.com*is appended to the ID that you provide to create your URI, use a unique ID.<br><br>The ID can use only lowercase letters, numbers, and the hyphen (-) character. It must be between 3 and 31 characters in length.
26
-
API|Cassandra|The API determines the type of account to create. Azure Cosmos DB provides five APIs: Core(SQL) for document databases, Gremlin for graph databases, MongoDB for document databases, Azure Table, and Cassandra. Currently, you must create a separate account for each API. <br><br>Select **Cassandra** because in this quickstart you are creating a table that works with the Cassandra API. <br><br>[Learn more about the Cassandra API](../articles/cosmos-db/cassandra-introduction.md).|
28
+
Resource Group|Create new<br><br>Then enter the same name as Account Name|Select **Create new**. Then enter a new resourcegroup name for your account. For simplicity, use the same name as your Azure Cosmos account name.
29
+
Account Name|Enter a unique name|Enter a unique name to identify your Azure Cosmos DB account. Your account URI will be *cassandra.cosmos.azure.com* appended to your unique account name.<br><br>The account name can use only lowercase letters, numbers, and hyphens (-), and must be between 3 and 31 characters long.
30
+
API|Cassandra|The API determines the type of account to create. Azure Cosmos DB provides five APIs: Core(SQL) for document databases, Gremlin for graph databases, MongoDB for document databases, Azure Table, and Cassandra. You must create a separate account for each API. <br><br>Select **Cassandra**, because in this quickstart you are creating a table that works with the Cassandra API. <br><br>[Learn more about the Cassandra API](../articles/cosmos-db/cassandra-introduction.md).|
27
31
Location|Select the region closest to your users|Select a geographic location to host your Azure Cosmos DB account. Use the location that's closest to your users to give them the fastest access to the data.
28
32
29
33
Select **Review+Create**. You can skip the **Network** and **Tags** section.
0 commit comments