Retiring Old Data

Overview

Occasionally, agents may need to delete old data from an EDW table for any of the following reasons:

  • Reclaiming space
  • Undoing duplicate loads
  • Undoing loads that contain bad data

The retire command is a Sensage SQL extension rather than a command-line tool. You do not run retire from the command line as you do the utilities. Instead, you use the atquery utility to run it.

The retire command replaces the deprecated atretire utility as the tool for retiring data from an EDW instance because it provides significantly enhanced performance and the syntax of the retire command is easier and more comprehensive.

While the atretire command required you to specify the cutoff time in the predefined syntax of a timestamp, the retire command allows you to specify the cutoff time as any Sensage SQL expression that evaluates to a timestamp data type. 

Steps

To retire all data before a certain date, use the following query:

atquery <SLS head node>:8072 --namespace=<namespace> -e "RETIRE FROM <table>
BEFORE time('Aug 26 11:02:34 2005')"

NOTE: enter the correct node, namespace, table, and date information as needed where indicated.

If the retire task finds any corrupted data, then the force command will need to be used to fully clear it:

atquery <SLS head node>:8072 --namespace=<namespace> -e "RETIRE FROM <table>
BEFORE time('Aug 26 11:02:34 2005') FORCE"

Comments

0 comments

Please sign in to leave a comment.