Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
select database_id, name, physical_name, state_desc from sys.master_files where database_id <= 4; |
This file contains 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
#connect cluster('demo12.westus.kusto.windows.net').database('Datasets') | |
https://demo12.westus.kusto.windows.net | |
// 1. Count of events, ~165M | |
nyc_taxi | |
| count | |
// 2. Show random pickups |
This file contains 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
#connect cluster('help').database('Samples') | |
let LocalNetworks=dynamic([ | |
"0.0.0.0/0" | |
]); | |
let IPs=datatable(IP:string) [ | |
"10.1.2.3", | |
"192.168.1.5", | |
"123.1.11.21", | |
"1.1.1.1" |
This file contains 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
#connect cluster('mypersonalcluster').database('mydb') | |
// ingested blob by cloning repo & used oneclick | |
// this is a sample from git url | |
.drop table stores ifexists; | |
.create table stores (id:string, name:string, email:string, city:string, hq_address:string, phone_number:string) | |
.create table stores ingestion csv mapping 'stores_mapping' '[{"column":"id", "Properties":{"Ordinal":"0"}},{"column":"name", "Properties":{"Ordinal":"1"}},{"column":"email", "Properties":{"Ordinal":"2"}},{"column":"city", "Properties":{"Ordinal":"3"}},{"column":"hq_address", "Properties":{"Ordinal":"4"}},{"column":"phone_number", "Properties":{"Ordinal":"5"}}]' |
This file contains 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
// geotraining | |
#connect cluster('demo12.westus').database('Datasets') | |
// 1. Count of events, ~165M | |
nyc_taxi | |
| count | |
// 2. Show random pickups |
This file contains 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
https://github.com/Azure/ADX-in-a-Day-Lab2 | |
// Create table command | |
//////////////////////////////////////////////////////////// | |
.create table ['Logistics'] (['deviceId']:string, ['messageSource']:string, ['telemetry']:dynamic, ['schema']:string, ['enrichments']:dynamic, ['templateId']:string, ['applicationId']:guid, ['enqueuedTime']:datetime, ['messageProperties']:dynamic, ['NumOfTagsCalculated']:int, ['Shock']:real, ['Temp']:real, ['TransportationMode']:string, ['Status']:string, ['Location_alt']:real, ['Location_lon']:real, ['Location_lat']:real) | |
// Create mapping command | |
//////////////////////////////////////////////////////////// | |
.create table ['Logistics'] ingestion json mapping 'Logistics_mapping' '[{"column":"deviceId", "Properties":{"Path":"$[\'deviceId\']"}},{"column":"messageSource", "Properties":{"Path":"$[\'messageSource\']"}},{"column":"telemetry", "Properties":{"Path":"$[\'telemetry\']"}},{"column":"schema", "Properties":{"Path":"$[\'schema\']"}},{"column":"enrichments", "Properties":{"Path": |
This file contains 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
// https://github.com/Azure/ADX-in-a-Day-Lab2 | |
//5.2 | |
.show database policies | |
.show table target details | project RetentionPolicy | |
.alter table target policy retention | |
``` |
This file contains 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
// How to update data, try on https://aka.ms/adx.free. | |
// 1. sample table | |
.drop table MyTable ifexists | |
.set MyTable <| | |
datatable (id:int, fname:string, lname:string, age:int) [ | |
01,'John','Doe',21, | |
02,'Jim','Brown',23 | |
] |
This file contains 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
// https://aka.ms/kusto.trender | |
#connect cluster('kvc43f0ee6600e24ef2b0e.southcentralus').database('Trender') | |
.show database Trender principals | |
.add database Trender viewers ('aadapp=aa7e9f10-1035-4684-b10a-097bb4948f95') 'kustotrender1appreg' | |
.add database Trender viewers ('aadapp=b5f3b2a2-0ec3-4c9d-adfd-447e528f24ac') 'Kusto Trender Sample App' |
OlderNewer