Jump to: navigation, search

DaysBack

Section: ETL
Default Value: 14
Valid Values: Any integer between 0 and 365
Changes Take Effect: Immediately
Dependencies: None

Specifies the number of days (from the current date) in the past to track Fact data.

Purging Procedures and Parameters

The WFM ETL database script includes the following database-stored procedures used to enable purging of the ETL database:

Procedure Description
WFM_PURGE_PROC The main procedure, used to call all the procedures below, passing a date that is calculated by subtracting a specified number of days from the current date.


This procedure is designed to be executed regularly (daily or more often) as a scheduled task.

Use the following parameters with this procedure:

  • @DAYS_BACK_FOR_DAY—Purges daily granularity data that is older than the specified number of days from the current day. For example, if this parameter value is 10, WFM purges data that is older than 10 days prior to today (data for the 10 days prior to today, plus today's data is retained).
  • @DAYS_BACK_FOR_TIMESTEP—Purges 15-minute granularity data that is older than the specified number of days from the current day. See the example above.
  • @MAX_PURGE_CHUNK—Specifies the maximum number of records to purge in one pass.
WFM_PERF_PURGE_PROC Purges performance statistics data older than a given date.


Use the following parameters with this procedure:

  • @PURGE_DATE—Specifies the purge date. Data older than this date is purged.
  • @MAX_PURGE_CHUNK—Specifies the maximum number of records to purge in one pass.
WFM_SCH_PURGE_PROC Purges schedule data older than a given date.


Use the following parameters with this procedure:

  • @PURGE_DATE—Specifies the purge date. Data older than this date is purged.
  • @MAX_PURGE_CHUNK—Specifies the maximum number of records to purge in one pass.
WFM_ADH_PURGE_PROC Purges adherence data older than a given date.


Use the following parameters with this procedure:

  • @PURGE_DATE—Specifies the purge date. Data older than this date is purged.
  • @MAX_PURGE_CHUNK—Specifies the maximum number of records to purge in one pass.
WFM_CFG_PURGE_PROC Purges configuration data (uses no parameters).

Specifying the Number of Records to Delete

When using the @MAX_PURGE_CHUNK parameter in the procedures described in the table above, be sure to carefully weight it to prevent overtaxing the database server if there are already millions of records that need purging.

Genesys recommends that you limit the number of records to be deleted in one pass to avoid large transactions and allow the database to purge gradually, during subsequent executions of scheduled purging tasks.


Frequently Asked Questions About Purging ETL Database

The information in these FAQs might be useful when you are purging the database:

Q: Can you suppress or deactivate the data production for the TIMESTEP tables?
A: No, only the complete subsystem (Perf, Sch, Adh) can be disabled.

Q: When the DaysBack configuration option is set to a value of 30, can you purge the TIMESTEP tables to a retention time lower than 30 days—using an extreme example, TRUNCATE TABLE every night? In this case, would ETL try to recreate the last 30 days of data?
A: Yes, you can purge TIMESTEP tables to a retention time lower than the one specified for DAY tables. No, ETL would not try to recreate those tables unless there was a change in the main WFM database for those days and data was synchronized back to ETL. When data is synchronized for some date(s), both TIMESTEP and DAY tables are synchronized simultaneously.

Q: Is Genesys planning features, now or in future versions, that would improve handling of the huge TIMESTEP tables or provide a way to deactivate them?
A: Currently, nothing is planned, but we might consider a feature of disabling TIMESTEP tables. Please submit a feature request.

Q: What is the best way to start purging the TIMESTEP tables?
A: Depending on the scenario, you might want to schedule a task that would call a main purging procedure at regular intervals. For example, using these parameters: WFM_PURGE_PROC (730, 0, 100000)—where the values in brackets represent the @DAYS_BACK_FOR_DAY, @DAYS_BACK_FOR_TIMESTEP, and @MAX_PURGE_CHUNK tables, consecutively.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on August 15, 2017, at 10:51.