Skip to content

Commit f26683a

Browse files
committed
Fixing cell type of commands
1 parent a0308c7 commit f26683a

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

articles/cosmos-db/use-csharp-notebook-features-and commands.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ See [.NET SDK samples](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/mast
5353
> The built-in Azure Cosmos DB .NET SDK is only supported for SQL (Core) API accounts. For other APIs, you will need to [install the relevant .NET driver](#install-a-new-nuget-package) that corresponds to the API.
5454
5555
## Set custom options using ```CosmosClientOptions```
56-
For more flexibility, you can set custom [``CosmosClientOptions``](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions). You can use this to:
56+
For more flexibility, you can set custom ``CosmosClientOptions`` to pass in your ``CosmosClient`` instance. You can use this to:
5757

5858
- Set an application name in the user-agent suffix to include in every request
5959
- Set the preferred region to be used to operations against the service
@@ -120,7 +120,7 @@ You can use the built-in dictionary viewer to view a variable. In a cell, put th
120120
## Upload JSON items to a container
121121
You can use the ``%%upload`` magic command to upload data from a JSON file to a specified Azure Cosmos container. Use the following command to upload the items:
122122

123-
```bash
123+
```csharp
124124
%%upload --databaseName {database_id} --containerName {container_id} --url {url_location_of_file}
125125
```
126126

@@ -129,11 +129,11 @@ You can use the ``%%upload`` magic command to upload data from a JSON file to a
129129

130130
For example:
131131

132-
```bash
132+
```csharp
133133
%%upload --database databaseName --container containerName --url
134134
https://contoso.com/path/to/data.json
135135
```
136-
```bash
136+
```
137137
Documents successfully uploaded to ContainerName
138138
Total number of documents imported : 2654
139139
Total time taken : 00:00:38.1228087 hours
@@ -144,7 +144,7 @@ With the output statistics, you can calculate the effective RU/s used to upload
144144
## Run another notebook in current notebook
145145
You can use the ``%%run`` magic command to run another notebook in your workspace from your current notebook. Use the syntax:
146146

147-
```bash
147+
```csharp
148148
%%run ./path/to/{notebookName}.ipynb
149149
```
150150
Replace ``{notebookName}`` with the name of the notebook you want to run. The notebook must be in your current 'My Notebooks' workspace.

articles/cosmos-db/use-python-notebook-features-and-commands.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This package will be available to use from any notebook in the Azure Cosmos acco
3030

3131
You can use the ``%%sql`` magic command to run a [SQL query](sql-query-getting-started.md) against any container in your account. Use the syntax:
3232

33-
```bash
33+
```python
3434
%%sql --database {database_id} --container {container_id}
3535
{Query text}
3636
```
@@ -40,7 +40,7 @@ You can use the ``%%sql`` magic command to run a [SQL query](sql-query-getting-s
4040
The query text must be on a new line.
4141

4242
For example:
43-
```bash
43+
```python
4444
%%sql --database RetailDemo --container WebsiteData
4545
SELECT c.Action, c.Price as ItemRevenue, c.Country, c.Item FROM c
4646
```
@@ -50,7 +50,7 @@ Run ```%%sql?``` in a cell to see the help documentation for the sql magic comma
5050

5151
You can output the results of a ``%%sql`` query into a [Pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/getting_started/dsintro.html#dataframe). Use the syntax:
5252

53-
```bash
53+
```python
5454
%%sql --database {database_id} --container {container_id} --output {outputDataFrameVar}
5555
{Query text}
5656
```
@@ -61,11 +61,11 @@ The query text must be on a new line.
6161

6262
For example:
6363

64-
```bash
64+
```python
6565
%%sql --database RetailDemo --container WebsiteData --output df_cosmos
6666
SELECT c.Action, c.Price as ItemRevenue, c.Country, c.Item FROM c
6767
```
68-
```bash
68+
```python
6969
df_cosmos.head(10)
7070

7171
Action ItemRevenue Country Item
@@ -83,23 +83,23 @@ df_cosmos.head(10)
8383
## Set default database for queries
8484
You can set the default database ```%%sql``` commands will use for the notebook. Replace ```{database_id}``` with the name of your database.
8585

86-
```bash
86+
```python
8787
%database {database_id}
8888
```
8989
Run ```%database?``` in a cell to see documentation in the notebook.
9090

9191
## Set default container for queries
9292
You can set the default container ```%%sql``` commands will use for the notebook. Replace ```{container_id}``` with the name of your container.
9393

94-
```bash
94+
```python
9595
%container {container_id}
9696
```
9797
Run ```%container?``` in a cell to see documentation in the notebook.
9898

9999
## Upload JSON items to a container
100100
You can use the ``%%upload`` magic command to upload data from a JSON file to a specified Azure Cosmos container. Use the following command to upload the items:
101101

102-
```bash
102+
```python
103103
%%upload --databaseName {database_id} --containerName {container_id} --url {url_location_of_file}
104104
```
105105

@@ -108,11 +108,11 @@ You can use the ``%%upload`` magic command to upload data from a JSON file to a
108108

109109
For example:
110110

111-
```bash
111+
```python
112112
%%upload --database databaseName --container containerName --url
113113
https://contoso.com/path/to/data.json
114114
```
115-
```bash
115+
```
116116
Documents successfully uploaded to ContainerName
117117
Total number of documents imported : 2654
118118
Total time taken : 00:00:38.1228087 hours
@@ -123,7 +123,7 @@ With the output statistics, you can calculate the effective RU/s used to upload
123123
## Run another notebook in current notebook
124124
You can use the ``%%run`` magic command to run another notebook in your workspace from your current notebook. Use the syntax:
125125

126-
```bash
126+
```python
127127
%%run ./path/to/{notebookName}.ipynb
128128
```
129129
Replace ``{notebookName}`` with the name of the notebook you want to run. The notebook must be in your current 'My Notebooks' workspace.

0 commit comments

Comments
 (0)