Skip to content

Instantly share code, notes, and snippets.

Matias Quaranta ealsur

Block or report user

Report or block ealsur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ealsur
ealsur / function.json
Last active Feb 7, 2018
Azure Cosmos DB + Functions Cookbook - live migration function.json
View function.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"databaseName": "<name-of-your-monitored-database>",
"collectionName": "<name-of-your-monitored-collection>",
"connectionStringSetting": "<name-of-connection-string-setting>",
"leaseCollectionName": "leases",
@ealsur
ealsur / function.json
Created Feb 16, 2018
Azure Cosmos DB + Functions Cookbook - search indexing function.json
View function.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"databaseName": "<name-of-your-monitored-database>",
"collectionName": "<name-of-your-monitored-collection>",
"connectionStringSetting": "<name-of-connection-string-setting>",
"leaseCollectionName": "leases",
@ealsur
ealsur / project.json
Created Feb 16, 2018
Azure Cosmos DB + Functions Cookbook - search indexing project.json
View project.json
{
"frameworks": {
"net46":{
"dependencies": {
"Microsoft.Azure.Search": "3.0.5"
}
}
}
}
@ealsur
ealsur / sample.json
Created Feb 16, 2018
Azure Cosmos DB + Functions Cookbook - search indexing sample.json
View sample.json
{
"name": "john",
"born": "1983-05-07",
"id": "f08cfd6b-303e-654b-9c49-41a47ebbeae7"
}
@ealsur
ealsur / run.csx
Last active Feb 16, 2018
Azure Cosmos DB + Functions Cookbook - search indexing run.csx
View run.csx
#r "Microsoft.Azure.Documents.Client"
using System;
using System.Configuration;
using System.Collections.Generic;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Search;
private static string searchServiceName = ConfigurationManager.AppSettings["SearchServiceName"];
private static string searchServiceKey = ConfigurationManager.AppSettings["SearchServiceKey"];
private static SearchServiceClient serviceClient = new SearchServiceClient(searchServiceName, new SearchCredentials(searchServiceKey));
@ealsur
ealsur / dataaicosmos2018.md
Last active Mar 19, 2018
Data & AI 2017 - Cosmos DB
@ealsur
ealsur / function.json
Created Apr 2, 2018
Azure Cosmos DB + Functions Cookbook - multi triggers
View function.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "<your-connectionstring-setting>",
"databaseName": "<your-monitored-database>",
"collectionName": "<your-monitored-collection>",
@ealsur
ealsur / function2.json
Created Apr 2, 2018
Azure Cosmos DB + Functions Cookbook - multi triggers
View function2.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "<your-connectionstring-setting>",
"databaseName": "<your-monitored-database>",
"collectionName": "<your-monitored-collection>",
@ealsur
ealsur / precompiled.cs
Created Apr 2, 2018
Azure Cosmos DB + Functions Cookbook - multi triggers
View precompiled.cs
[FunctionName("Trigger1")]
public static void Run(
[CosmosDBTrigger("<your-monitored-database>",
"<your-monitored-collection>",
ConnectionStringSetting = "<your-connectionstring-setting>"
LeaseCollectionPrefix = "trigger1")]
IReadOnlyList<Document> input,
TraceWriter log)
{
log.Info("Documents modified " + input.Count);
@ealsur
ealsur / host.json
Created Aug 8, 2018
Custom ConnectionMode and Protocol
View host.json
{
"documentDB": {
"connectionMode": "Direct",
"protocol": "Tcp"
}
}
You can’t perform that action at this time.