❓‍ When to use a Time-Based Query?

You should use a Time-Based Query type of calculation for your computation when you wish to analyse past data or player habits and patterns to understand which class a player should belong to. These queries can be set to run or update at specific moments, such as daily at 03:00 am.
FT Singularity Model Example
In this example from the FT Singularity Model, we want to understand, using an evaluation of players' previous playing patterns and behaviours, which day of the week the player prefers to play on.
Player Feature: Most Active Day of the Week - Based on last the last 90 Active Days, we identify the day which had the most active days.
Feature Type: Day of the Week.
Classes: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.
Time-Based Query: To evaluate the day of the week when the player is most active (number of deposits).
Let's set up the aboveπŸ‘† computation together and go step-by-step through the process of setting up a time-based query.

πŸŽ₯ New Action

Firstly you need to select if your new action should be a real-time movement or a time-based query.
In our example above, we want to evaluate the players preferred playing day of the week. This will allow you to assign your player to a day of the week class such as 'Friday' to determine which day of the week the player is most likely to be active on-site.
As this cannot be done by using a real-time event, we should select a time-based query.
Time-Based Query
Time-Based Query

⚑ Computation Triggers

Next, it is important to set the necessary trigger(s) to determine when the computation should take place. It is only possible to select time-based triggers, but if required it is possible to add multiple time-event triggers.
Simply click on the 'Add a Trigger' section to select an existing time trigger from the list, or click the ➕‍ icon to create a new time trigger.
In this example, we want the database query to run every day at 03:00 am.
Computation trigger
Computation trigger
Note 🧠: Usually it makes sense to run database queries in the early hours of the morning when there is less activity on your system and to capture the previous day's player data.

πŸ–₯️ Specify Computation Query

Next, you need to specify the computation option. This is powered by Clickhouse, an efficient database that is used by Fast Track to run analytical queries. This selection is the type of query that you want the computation to run.
As you can see from our example and the image below, the query is using the exact slug name that was set up and specified for each Feature Type Class.
After the time-based query has run, any players who have changed class will be updated.
Day of the Week query
Day of the Week query

Query Errors

If you make changes to an existing time-based query computation that is not formatted correctly, you will receive an error similar to the image belowπŸ‘‡ and the query will not be validated.
Error with query validation
Error with query validation
Note 🧠: All of the time-based queries in the FT Singularity Model already include a database query that is formatted correctly and fully operational.
Should you wish to edit this computation, you can edit the query provided or provide and write your own query.
If you need any support in writing new database queries, please reach out to your Partner Manager. We can refer you to our data scientists who will be happy to assist.

Query Editor

If you want to create new time-based queries, feel free to use the Query Editor to check how best to structure and to test the results of your query.
You can find the query editor in; Insights & Analytics menu - Data Studio - Query Editor.

πŸ“› Name your Computation

Finally, give your computation a descriptive name. Please make sure the name is informative enough for you and your team to understand what is being calculated inside the movement.
Once you are ready, Update Computation to save your work.
Name your computation
Name your computation

βœ… Active Movements

All of your movements (real-time and time-based queries) will be displayed under Active Processes on the Manage Movements tab of the Player Feature.
Active Proceses
Active Proceses
📈‍ Dashboards: You can see the results of the database queries in the Dashboards tab of the selected Player Feature.
Read more about the Player Feature Dashboards here.
Here is a full run-through of the set-up process for the time-based query used in the example featured on this page;