Created
February 9, 2020 19:37
-
-
Save rchardptrsn/c5d6d2eb255231fe820c40f2d7baa2dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create a database | |
| # https://docs.microsoft.com/en-us/python/api/azure-cosmos/azure.cosmos.cosmos_client.cosmosclient?view=azure-python#createdatabase-database--options-none- | |
| database_name = 'HDIdatabase' | |
| try: | |
| database = client.CreateDatabase({'id': database_name}) | |
| except errors.HTTPFailure: | |
| database = client.ReadDatabase("dbs/" + database_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment