Skip to content

Instantly share code, notes, and snippets.

View dbchudasama's full-sized avatar

Divyesh B Chudasama dbchudasama

  • 01:28 (UTC)
View GitHub Profile
@dbchudasama
dbchudasama / ExampleAzureARMTemplateADFv2CopyActivityPipelineParameter.json
Last active June 7, 2018 11:17
JSON Snippet of an example Azure ARM Template of defining pipeline parameters into a Copy Activity Pipeline for Azure Data Factory v2.0
“typeProperties”: {
“format”: {
“type”: “ParquetFormat”
},
“folderPath”: {
“value”:”@concat(‘/test/’, formatDateTime(adddays(pipeline().TriggerTime,0), ‘yyyy/MM/dd’)”,
“type”: “Expression”
},
“partitionedBy”: [
{
@dbchudasama
dbchudasama / GoogleAnalyticsServiceAccountCredentialAuth.cs
Created February 6, 2018 16:00
Code snippet for creating a Service Account Credential for Service Account Authentication with Google Analytics Core Reporting API
string[] scopes = new string[] { AnalyticsService.Scope.Analytics };
var keyPath =<path>;
var serviceAccountEmail =<email>;
//Loading the Key file
var certificate = new X509Certificate2(keyPath, <privateKey>, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable);
var initializer = new ServiceAccountCredential.Initializer(serviceAccountEmail)
{