File size: 2,839 Bytes
0eef7fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b49f97e
 
 
 
 
 
 
 
 
0eef7fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
task_categories:
- time-series-forecasting
tags:
- tsfile
- format:tsfile
- timeseries
modality: timeseries
configs:
- config_name: default
  data_files:
  - split: train
    path: app_flow.tsfile
---

# App Flow

This dataset consists of hourly maximum traffic flow for 128 systems deployed on 16 logic data centers, resulting in 1083 different time series in total.
The length of each series is more than 4 months. Each time series is divided into two segments for training and testing with a ratio of 32:1.
This dataset was collected at Ant Group and does not contain any Personal Identifiable Information and is desensitized and encrypted.

## TsFile Conversion

- Original dataset: [`kashif/App_Flow`](https://huggingface.co/datasets/kashif/App_Flow)
- Modalities: Time-series
- Converted data files are listed in the YAML metadata above.
- Source README text and dataset-specific metadata are retained; the source
  Usage section is replaced with the executable TsFile Python SDK example below.

- The encrypted source CSV is decoded as provided; `app_name`, `zone`, and generated `event_rank` are TAG columns, `time` becomes millisecond `Time`, and the CSV export index is retained as the `source_row_id` FIELD.
- The source contains 1,189 observed `(app_name, zone)` combinations (the source card states 1,083) and 4,766 concurrent duplicate time keys. `event_rank` distinguishes those concurrent rows without changing their original minute timestamps; 4,766 additional rows remain intentionally represented across distinct event-rank devices.
- All source rows and values are retained and sorted by `app_name`, `zone`, `Time`, and `event_rank`.

## Schema (TsFile structure)

- `Time` (INT64, milliseconds) is the original CSV `time` value.
- `app_name`, `zone`, and `event_rank` are TAG dimensions.
- `value` and `source_row_id` are FIELD measurements; `source_row_id` is the original CSV export row number.

## Usage

Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:

```python
from pathlib import Path
from tsfile import TsFileReader

path = Path("app_flow.tsfile")
with TsFileReader(str(path)) as reader:
    schemas = reader.get_all_table_schemas()
    print("tables:", list(schemas))
    table_name = next(iter(schemas))
    table = schemas[table_name]
    columns = [column.get_column_name() for column in table.get_columns()]
    print("columns:", columns)
    field_names = [
        column.get_column_name()
        for column in table.get_columns()
        if column.get_column_name() not in {"Time", "time"}
    ]
    if field_names:
        with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
            batch = result.read_arrow_batch()
            if batch is not None:
                print(batch.to_pandas().head())
```