Decide Case ID Data Type
QPR ProcessAnalyzer supports both textual (string) and integer (whole number) data types for case IDs. This article outlines the considerations for selecting the appropriate data type for case IDs. This discussion is applicable to both Snowflake and in-memory models.
When to Use Text
Use the text as the data type when:
- Case IDs contain characters other than digits (0-9).
- Case IDs include leading zeros.
- There are numeric case IDs greater than 9,007,199,254,740,991 (=2^53-1) (this is called the maximum safe integer).
When case IDs are integers, they cannot represent the above-mentioned characteristics.
Additionally, QPR ProcessAnalyzer displays thousand separators for numbers, potentially making the case IDs to display in an unfamiliar format. Use text as the data type if desired to avoid thousand separators.
Functional Differences
Sorting
The choice of data type affects how case IDs are sorted, for example when showing a list of case IDs. For example, case IDs 1, 2, and 10 are sorted as integers in the order: 1, 2, 10, whereas they are sorted as text in the order: 1, 10, 2. Thus, select the data type based on which sorting method best suits your data.
Content Alignment
In tables, text data types are always left-aligned and integers are right-aligned, impacting the data readability in lists.
Filtering Options
For textual data, you can use the following filtering methods: "contains," "starts with", and "ends with." For integer data, the available filtering methods are "less than," "greater than", and "between". Additionally, both data types support "equal" and "not equal" filtering options.
Integer is Better for Performance
Storing digits as integers requires significantly less storage space compared to storing them as text, resulting in better performance with integer data types. Especially, avoid converting data types in the chart expressions because conversion operations are generally slow. If there is a need to convert data types when creating charts, the data type selection is most likely incorrect.
Changing Data Type
Be aware that you cannot change the data type by altering the displayed data type in QPR ProcessAnalyzer. The actual data in the tables needs to be converted to a different type. The data type for a column (i.e., case or event attribute) is determined when the data is loaded into QPR ProcessAnalyzer and the table is created.
For instance, when uploading a CSV file, you can define column data types for new columns. However, you cannot change the data type of an existing column when new data is loaded. The data type for the existing columns is displayed, and new data of that type can be loaded into the table.