-
Notifications
You must be signed in to change notification settings - Fork 12
/
trender-sample-data.kql
23 lines (23 loc) · 1.8 KB
/
trender-sample-data.kql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.execute database script <|
//
// ingest data
//
.create table ['Timeseries'] ingestion csv mapping 'Timeseries_mapping' '[{"column":"TimeseriesId", "Properties":{"Ordinal":"0"}},{"column":"Timestamp", "Properties":{"Ordinal":"1"}},{"column":"Value", "Properties":{"Ordinal":"2"}}]'
//
.ingest async into table Timeseries (
h'https://trendersampledata.blob.core.windows.net/data/Timeseries_1.csv.gz',
h'https://trendersampledata.blob.core.windows.net/data/Timeseries_2.csv.gz',
h'https://trendersampledata.blob.core.windows.net/data/Timeseries_3.csv.gz'
) with (format='csv',ingestionMappingReference='Timeseries_mapping',ingestionMappingType='csv')
//
.create table ['TimeseriesMetadata'] ingestion csv mapping 'TimeseriesMetadata_mapping' '[{"column":"TimeseriesId", "Properties":{"Ordinal":"0"}},{"column":"TimeseriesName", "Properties":{"Ordinal":"1"}},{"column":"Description", "Properties":{"Ordinal":"2"}},{"column":"EngUnits", "Properties":{"Ordinal":"3"}},{"column":"DataStreamTags", "Properties":{"Ordinal":"4"}}]'
//
.ingest async into table TimeseriesMetadata (
h'https://trendersampledata.blob.core.windows.net/data/TimeseriesMetadata_1_2cb9453c338f44a6b9263f254f89cec3.csv.gz'
) with (format='csv',ingestionMappingReference='TimeseriesMetadata_mapping',ingestionMappingType='csv')
//
.create table ['TimeseriesHierarchy'] ingestion csv mapping 'TimeseriesHierarchy_mapping' '[{"column":"TimeseriesId", "Properties":{"Ordinal":"0"}},{"column":"DisplayName", "Properties":{"Ordinal":"1"}},{"column":"Path", "Properties":{"Ordinal":"2"}}]'
//
.ingest async into table TimeseriesHierarchy (
h'https://trendersampledata.blob.core.windows.net/data/TimeseriesHierarchy_1_814905e48a164222926254296d280149.csv.gz'
) with (format='csv',ingestionMappingReference='TimeseriesHierarchy_mapping',ingestionMappingType='csv')