Working with integer partition columns

This post describes a simple technique to deal with tables partitioned with an integer type key representing dates. Sample data with yyyymmdd as the partition key

| Column_A | Column_B  |  ... | yyyymmdd (Partition Key) |
|    1     |    1      |  ... | 20190131                 |
|    2     |    2      |  ... | 20190201                 |

To make the integer based partition key usable in the ArcViz as a regular date field for building time filters, you can create a derived timestamp field with 3 simple steps -

  1. On the Dataset Page, Clone the paritition key yyyymmdd


  2. Edit Field and use a friendly display name, say date_timestamp


  3. Click Expression and enter the expression to_timestamp(cast (yyyymmdd as string), 'yyyyMMdd') to convert the integer key to a timestamp. Note that the function to_timestamp can interpret many other creative representations of the key as well.


Now, you can use the new field date_timestamp to create date filters on dashboards just as if the field was part of the original dataset. The filtering will work as expected with


Hi @priyank,thanks for this info,
Can you please tell me whether a partition key feild can be used as filter ?
Will there be any errors if we use partition key as Filter?

Yes @Ashwini_Shetty. Partition keys can be used as filters.

1 Like