File size: 4,098 Bytes
d8bbcb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5afdadb
 
d100acf
 
d8bbcb3
 
 
5afdadb
 
d100acf
 
d8bbcb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
license: other
license_name: cic-ids-2017-research-use
license_link: https://www.unb.ca/cic/datasets/ids-2017.html
task_categories:
- tabular-classification
language:
- en
tags:
- network-security
- cybersecurity
- netflow
- flow
- intrusion-detection
- nids
- canonical-schema
- flowprep
- deeptempo
- tsfile
- modality:timeseries
- timeseries
- format:tsfile
pretty_name: CIC-IDS-2017 Canonical NetFlow Flowprep TsFile
size_categories:
- 100K<n<1M
modality:
- timeseries
- tabular
- text
configs:
- config_name: default
  data_files:
  - split: train
    path: cic_ids_2017_flowprep.tsfile
---

# CIC-IDS-2017 Canonical NetFlow Flowprep (TsFile)

This repository contains an Apache TsFile conversion of
[`DeepTempo/cic-ids-2017-flowprep`](https://huggingface.co/datasets/DeepTempo/cic-ids-2017-flowprep),
a small CIC-IDS-2017 demonstration slice canonicalized by DeepTempo's
`flowprep` tool into a typed NetFlow schema.

Modalities: Time-series.

## Source Dataset

- **Original dataset:** [`DeepTempo/cic-ids-2017-flowprep`](https://huggingface.co/datasets/DeepTempo/cic-ids-2017-flowprep)
- **Source artifact:** `data/cic-ids-2017-canonical.parquet`
- **Rows:** 101,094 flows
- **Columns:** 13 source columns
- **Task:** binary intrusion-detection / tabular classification
- **Source format:** ZSTD-compressed Parquet, single row group
- **Source timestamp encoding:** int64 epoch microseconds
- **Source license metadata:** `other`, `cic-ids-2017-research-use`
- **License link:** https://www.unb.ca/cic/datasets/ids-2017.html

The source dataset is a clean canonical NetFlow table produced by `flowprep`
from a CIC-IDS-2017 sample. It is a demonstration slice, not the full
CIC-IDS-2017 dataset. For research use, refer to the official UNB CIC dataset
page and cite the original CIC-IDS-2017 paper.

## Converted Data

- **TsFile path:** `cic_ids_2017_flowprep.tsfile`
- **TsFile table:** `cic_ids_2017_flowprep`
- **Rows:** 101,094
- **Converted columns:** 14 including `Time` and generated `event_rank`
- **Device/TAG groups:** 1,780
- **Time precision:** microseconds
- **Time range:** 2017-03-07 01:00:01 UTC to 2017-07-07 12:59:00 UTC
- **Class balance:** 81,171 benign / 19,923 attack

## TsFile Schema

`timestamp` is converted to the TsFile `Time` column as epoch microseconds and
is not retained as a duplicate FIELD.

TAG columns:

- `attack`
- `label`
- `event_rank`

FIELD columns:

- `src_ip`
- `dest_ip`
- `src_port`
- `dest_port`
- `fwd_bytes`
- `bwd_bytes`
- `fwd_pkts`
- `bwd_pkts`
- `flow_dur`
- `protocol`

`protocol` is null for all rows in this source slice and is preserved as a
nullable numeric FIELD for canonical-schema fidelity.

## Conversion Notes

This is a network-flow event table. High-cardinality endpoint columns such as
`src_ip`, `dest_ip`, `src_port`, and `dest_port` are kept as FIELD columns rather
than TAG/device keys. The low-cardinality ground-truth columns `attack` and
`label` are TAGs for efficient filtering.

`event_rank` is a generated TAG that preserves all concurrent flows without
modifying `Time`. It is the duplicate order within `(attack, label, Time)`.
In this source snapshot, `event_rank` ranges from 0 to 1,587 and 88,916 rows
have a nonzero rank. The final `(attack, label, event_rank, Time)` key has no
duplicates.

No source rows are dropped. The source `timestamp` column is represented by
TsFile `Time`; all other source columns are represented either as TAG or FIELD
columns.

## Minimal Read Example

Read the `.tsfile` file with the Apache TsFile Java or Python SDK.

Example logical filter:

```sql
SELECT *
FROM cic_ids_2017_flowprep
WHERE attack = 'attack'
```

## Citation

If you use the data, cite the original CIC-IDS-2017 paper:

```bibtex
@inproceedings{sharafaldin2018toward,
  title     = {Toward Generating a New Intrusion Detection Dataset and Intrusion Traffic Characterization},
  author    = {Sharafaldin, Iman and Lashkari, Arash Habibi and Ghorbani, Ali A.},
  booktitle = {Proceedings of the 4th International Conference on Information Systems Security and Privacy (ICISSP)},
  year      = {2018}
}
```