Skip to content

Conversation

@FabianMeiswinkel
Copy link

Adding notebook to emit partition key statistics (and quota) for containers

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Adding notebook to emit partition key statistics (and quota) for containers
@@ -0,0 +1,52 @@
{
"cells": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order for this to be a standalone, self-explanatory sample, can you add some markdown text that explains at a high level what the notebook does?

"trusted": true
},
"outputs": [],
"source": "#Configuration section\n#Change parameters below if you want to export results t Excel workbooks in a blob storage account\n\n#Account name of the blob stroage account the workbooks are saved to\nblob_account_name='<YourAccountName>'\n\n#Account key of the blob stroage account the workbooks are saved to\nblob_account_key='<YourAccountKey>'\n\n#Blob container name taht the excel workbooks will be saved to\nblobContainerName='<YourContainerName>'\n\n#By default use the same cosmos account in which the notebook is stored in\nclient = cosmos_client\n#Alternatively you could point to another cosmso account via connection string for example\n#client = CosmosClient.from_connection_string('<YourConnectionString>')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow Python conventions, e.g. partitionQuotaDataFrame -> partition_quota_dataframe

"trusted": true
},
"outputs": [],
"source": "#Configuration section\n#Change parameters below if you want to export results t Excel workbooks in a blob storage account\n\n#Account name of the blob stroage account the workbooks are saved to\nblob_account_name='<YourAccountName>'\n\n#Account key of the blob stroage account the workbooks are saved to\nblob_account_key='<YourAccountKey>'\n\n#Blob container name taht the excel workbooks will be saved to\nblobContainerName='<YourContainerName>'\n\n#By default use the same cosmos account in which the notebook is stored in\nclient = cosmos_client\n#Alternatively you could point to another cosmso account via connection string for example\n#client = CosmosClient.from_connection_string('<YourConnectionString>')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: typo:

Change parameters below if you want to export results to Excel workbooks in a blob storage account

"trusted": true
},
"outputs": [],
"source": "#Configuration section\n#Change parameters below if you want to export results t Excel workbooks in a blob storage account\n\n#Account name of the blob stroage account the workbooks are saved to\nblob_account_name='<YourAccountName>'\n\n#Account key of the blob stroage account the workbooks are saved to\nblob_account_key='<YourAccountKey>'\n\n#Blob container name taht the excel workbooks will be saved to\nblobContainerName='<YourContainerName>'\n\n#By default use the same cosmos account in which the notebook is stored in\nclient = cosmos_client\n#Alternatively you could point to another cosmso account via connection string for example\n#client = CosmosClient.from_connection_string('<YourConnectionString>')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to make this standalone - can we make this part optional? E.g. we print the statistics in the notebook, and then have an optional cell where they can save it to Excel? Or they can write it to the current directory, and it will show up as a file under Notebooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants