A statistical period defines the time range for data analysis, such as the last 7 days or the last 30 days.
Prerequisites
-
You have activated the Intelligent R&D Edition or Advanced Asset Operation Edition to use the statistical period feature.
-
You have configured the computing engine type. For more information, see Compute Settings. Once configured, the system automatically initializes a set of default statistical periods.
Permissions
Only a Super administrator or a System administrator can create statistical periods.
Procedure
-
In the top navigation bar of the Dataphin homepage, choose Plan > Common Definitions.
-
On the Common Definitions page, click + Create Statistic Period.
-
In the Create Statistic Period dialog box, configure the following parameters.
Parameter
Description
Statistic Period
The name of the statistical period. It can contain Chinese characters, letters, digits, underscores (_), and hyphens (-).
NoteThe name can be up to 64 characters long.
Abbreviation
An abbreviation for the statistical period. It can contain letters, digits, and underscores (_).
NoteThe abbreviation can be up to 64 characters long.
Time Granularity
Select Day, Hour, or Minute.
NoteThe StarRocks, SelectDB, and Doris computing engines support only Day. They do not support Hour or Minute.
Description
A brief description of the statistical period. Maximum length: 128 characters.
Calculation Expression
The calculation expression for the statistical period. For details, seeAppendix: Statistic Period Expression Parameters.
Calendar
If the time granularity is Day, you can configure a calendar type. Supported options: common calendar and fiscal calendar.
If you select a fiscal calendar, the cBeginDate, cEndDate, and tdBeginDate parameters output dates based on the fiscal calendar's cycle settings.
Start Time
Set the Start Time for the statistical period:
-
If you select Parameter, enter the expression for the parameter.
-
If you select Function Expression, click the
icon and select a function from the drop-down list. The system automatically populates the corresponding expression.
End Time
Set the End Time for the statistical period:
-
If you select Parameter, enter the expression for the parameter.
-
If you select Function Expression, click the
icon and select a function from the drop-down list. The system automatically populates the corresponding expression.
Note-
You cannot create a statistical period with the same Start Time and End Time as an existing one.
-
You cannot create a statistical period with a duplicate Statistic Period name or Abbreviation.
-
-
Click OK to create it.