Skip to content

Instantly share code, notes, and snippets.

View ArthurSteijn's full-sized avatar

Arthur Stejin ArthurSteijn

  • HSO
  • Rotterdam, the Netherlands
  • 09:03 (UTC +02:00)
View GitHub Profile
CREATE VIEW [dbo].[vFactSalesOrder_Parquet] AS
SELECT SOH.[SalesOrderID]
,SOH.[RevisionNumber]
,SOH.[OrderDate]
,SOH.[DueDate]
,SOH.[ShipDate]
,SOH.[Status]
,SOH.[OnlineOrderFlag]
,SOH.[SalesOrderNumber]
,SOH.[PurchaseOrderNumber]
@ArthurSteijn
ArthurSteijn / AASRefreshDiagnosticLog02Details.kql
Last active August 15, 2020 09:00
Query for Azure Analysis Services Diagnostics Logs in Kusto Query Language
let window = AzureDiagnostics
| where ResourceProvider == "MICROSOFT.ANALYSISSERVICES" and Resource =~ "<MyServerName>" and DatabaseName_s =~ "<MyDatabaseName>"
| where OperationName !hasprefix "Discover" and OperationName !hasprefix "VertiPaq" and OperationName !hasprefix "LogMetric"
| where TimeGenerated > ago(14d);
window
| extend DurationMs=extract(@"([^,]*)", 1,Duration_s, typeof(long))
| project TimeGenerated,RootActivityId_g, ResourceId, OperationName, DatabaseName_s, level_d, EventClass_s, EventSubclass_s, StartTime_t, EndTime_t, ProgressTotal_s, ObjectReference_s, ObjectName_s, ObjectID_s, ObjectPath_s, Duration_s, CPUTime_s, Severity_s, Success_s, Error_s, TextData_s,DurationMs
| order by TimeGenerated desc
@ArthurSteijn
ArthurSteijn / AASRefreshDiagnosticLog01.kql
Last active August 15, 2020 08:32
Query for Azure Analysis Services Diagnostics Logs in Kusto Query Language
let window = AzureDiagnostics
| where ResourceProvider == "MICROSOFT.ANALYSISSERVICES" and Resource =~ "<MyServerName>" and DatabaseName_s =~ "<MyDatabaseName>"
| where TimeGenerated > ago(14d);
window
| where OperationName has "CommandEnd" and TextData_s has "<Refresh "
| extend DurationMs=extract(@"([^,]*)", 1,Duration_s, typeof(long))
| project StartTime_t,EndTime_t,ServerName_s,OperationName,RootActivityId_g,TextData_s,DatabaseName_s,ApplicationName_s,Duration_s,Success_s,EffectiveUsername_s,User_s,EventSubclass_s,DurationMs
| order by StartTime_t desc
steps:
- task: AzurePowerShell@5
inputs:
azureSubscription: 'YourAzureSubscriptionOrServiceConnection'
ScriptType: 'FilePath'
ScriptPath: 'AddDevOpsIpToAAS.ps1'
ScriptArguments: '-ResourceName "YourAnalysisServicesName" -ResourceGroup "YourResourceGroupName"'
azurePowerShellVersion: 'LatestVersion'
#Author - Arthur Steijn // Motion10 // 20200708
#Original from Mathias Wrobel // Innofactor A/S
#Other sites to provide IPv4 public address with this type of request
<#
http://ipinfo.io/ip
http://ifconfig.me/ip
http://icanhazip.com
http://ident.me