Deploying a SQL Database with ARM templates

I am trying to build a new ARM template to deploy, among others, a SQL server along with a Database.

My starting point was to export the template from the Azure resource group where I had this deployed and start from there. However, when trying to deploy that template I always got a Conflict status with this cryptical error message:

1
2
3
4
5
6
7
8
9
10
11
12
13
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "InternalServerError",
"message": "An unexpected error occured while processing the request. Tracking ID: '...'"
}
]
}
}

Read More

Share Comments

Ignite 2019 CosmosDB round-up

It’s been a few weeks since Ignite 2019 ended and I wanted to do a quick recap of the major (and some minor) announcements around Cosmos DB

Read More

Share Comments

Azure CosmosDB dotnet sdk v3 ["One of the specified inputs is invalid"]

So after an hour of frustration, I finally managed to figure out why I wasn’t able to do a simple Insert in a Cosmos collection using the latest v3 dotnet sdk

For the first time in a while I was playing with the raw SDK(shameless plug - I usually use the wrapper I wrote that abstracts away a lot of the internals of dealing with the documents and SDK itself) and I was getting this weird exeption while trying to perform the most basic Insert/Upsert operation:

1
await _container.UpsertItemAsync(movie, new PartitionKey(movie.Title))

__container’s PartitionKey definition is /Title_

1
Microsoft.Azure.Cosmos.CosmosException: 'Response status code does not indicate success: 400 Substatus: 0 Reason: (Message: {"Errors":["One of the specified inputs is invalid"]}

Read More

Share Comments

Announcing CosmosDB.Net 3.0 library

I’m incredibly proud to announce the release of the latest version of my CosmosDB .NET library.

The new version is a library that helps development against an Azure Cosmos DB database - SQL or Graph. It is a wrapper over the latest stable official Azure Cosmos DB .NET SDK Version 3.0 as well as the Gremlin.NET driver.

Here are some of the highlight features:

  • model annotations so you don’t have to create artificial properties in your model to handle Ids, Partition Keys and Labels.
  • mix SQL and Graph calls when working against a Gremlin enabled Azure Cosmos DB container.
  • fast parallel inserts/upserts with TPL Dataflow for bulk inserting.

Check it out on GitHub (https://github.com/alexdrenea/CosmosDb.Net) or get it from NuGet (nuget install CosmosDB.Net)and let me know what you think. Feedback is welcomed either in comments or on GitHub.

Share Comments

Simplify bearer token auth flow in Postman

If you’re developing API’s chances are you are using Postman to test or debug them.
If not, you should totally consider giving it a try, it’s possibly the best productivity tool out there in terms of playing with APIs either developed by you, or someone else.

In this article I want to present you a flow that you can use when working with APIs that require a bearer token for authentication.

Read More

Share Comments

Scaling an Azure Cosmos DB instance with Azure Automation

I wrote before about the need to be able to automatically scale your CosmosDB collections in an attempt to maximize performance while keeping cost at a minimum.

In that article I presented more of a “code-first” solution that you could deploy and use outside the Azure Portal, as a stand-alone tool.

This time, I’m exploring another option, that ties into some preexisting tools that Azure offers - Azure Automation

Read More

Share Comments

5 things you (probably) didn't know about CosmosDB

The more I learn about CosmosDB the more I discover new things that are amazing about it… Today I learned something new (see 2. below) and I wanted to compile and share a list of things that I found interesting and maybe not common knowledge about CosmosDB.

Read More

Share Comments

CosmosDB graph and PowerBI - Setting up refreshes

In previous articles I’ve shown how to connect a CosmosDB Graph database to PowerBI for easy reporting and analytics visualization.
An important piece of any dashboard is that it’s up to date and to do that, we need to refresh the data periodically to ensure that we’re visualizing the latest available information.
By default, when you hit refresh in PowerBI, what happens is that all queries behind the dataset are being re-run essentially grabbing all data again. This is certanly not advisable with larger databases both from time and performance perspectives. In order to deal with this problem, PowerBI came with a feature called incremental refresh however it requires a PowerBI Premium license and won’t work with all types of source data.

In this article I’ll be going tghough a technique that mimics the incremental refresh feature and works with our CosmosDB Graph database.

Read More

Share Comments

CosmosDB Graph and PowerBI - Connecting Datasets

In a previous article I showed how you can extract a clean dataset from a CosmosDB Graph database based on one node type (label). It’s likely however that your database contains multiple nodes that are connected with edges to represent relationships. In our reporting we might need the ability to navigate some of those relationships to allow for proper filtering or more complex visualizations.
In this article we’ll explore two techniques to extract those relationships and make them available to PowerBI.

Read More

Share Comments