Maintain
Maintain operation performs various tasks to maintain InfoLink (mainly the metadata repository).
Command: trimActivityLog
Removes all activity log records (stored in the il_activity_log in the metadata repository) before or equal to a timestamp. The timestamp is defined as a specific date or period (for example, 7 days ago). date is specified in the format of yyyy-MM-dd HH:mm:ss.SSS in the timezone of the user executing Maintain. date has higher precedence over period. You can also filter by appId and userId.
Specification:
{
"period": "<long>",
"periodTimeUnit": "<time unit of the period: DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS>",
"date": "<date in format yyyy-MM-dd HH:mm:ss.SSS>",
"appId": "<app id>",
"userId": "<user id>"
}Example 1:
{
"period": "1",
"periodTimeUnit": "DAYS"
}Example 2:
{
"date": "2022-06-08 14:18:00.000"
}Command: loadActivityLog
Loads activity log records from the metadata repository to a source.
Specification:
sourceName- name of the sourcespaceName- name of the space in the sourcetableName- name of the table to be created in the sourceformat(type: object):contentFormat- only"csv"is currently supported
appId(type: string) - filter by app idtitle(type: string) - filter by the title.status(type: string) - filter by the status. Values:stopped, ‘completed,completedWithError,stopping`.initType(type: string) - filter by via what means the job was started. Values:system- started by the systemscheduled- started by the schedulerapi- started via APIchild- started by the MessageConsumerService operationmanual- started manually via the UI
userId(type: string) - filter by user idlimit(type: string) - number of records to return. The result is sorted by the end time timestamp with running jobs (which end time is undefined) first. The default value is 1000.before(type: string) - filter jobs with the start time less or equal to the specified time in the time zone of the user executing the Maintain operation. Format by example:2024-07-15 10:44:38.708.beforeTS(type: string) - filter jobs with the start time less or equal to the specified timestamp in epoch milliseconds.beforeTShas higher precedence overbefore.after(type: string) - filter jobs with the start time greater than the specified time in the time zone of the user executing the Maintain operation. Format by example:2024-07-15 10:44:38.708afterTS(type: string) - filter jobs with the start time greater than the specified timestamp in epoch milliseconds.afterTShas higher precedence overafter.
Result schema:
app_id(type: string) - id of the app in which context the job was executedjob_id(type: string) - id of the jobtitle(type: string) - title of the job- is_running (type: string) - values are
trueandfalse.truemeans the job is still running - it is not a ghost record. It can only betrueif the status isrunning. status(type: string) - status of the job. See the specification above for a list of values.start_time(type: string) - start time of the job in epoch milliseconds.end_time(type: string) - end time of the job in epoch milliseconds.init_type(type: string) - means via which the job was started. See the specification above for a list of values.instance_name(type: string) - This column is for internal system use only and should be ignored by the user.op_name(type: string) - This column is for internal system use only and should be ignored by the user.op_sub_name(type: string) - This column is for internal system use only and should be ignored by the user.op_type(type: string) - This column is for internal system use only and should be ignored by the user.op_loc_group(type: string) - This column is for internal system use only and should be ignored by the user.op_loc_id(type: string) - This column is for internal system use only and should be ignored by the user.wf_input_params(type: string) - This column is for internal system use only and should be ignored by the user.user_id(type: string) - id of the user who started the job.user_name(type: string) - name of the user who started the job.result(type: string) - This column is for internal system use only and should be ignored by the user.tmp_tables(type: string) - This column is for internal system use only and should be ignored by the user.app_name(type: string) - name of the application in which context the job was executed.
Example 1 - Load activity log to AWS S3 as a CSV file:
{
"afterTS": "1721153101306",
"limit": "1000",
"sourceName": "S3-Tutorials",
"spaceName": "infolink-apps/PADBTest/",
"tableName": "activity_log.csv",
"format": {
"contentFormat": "csv"
}
}Example 2 - Load activity log to SQL server as a table:
{
"afterTS": "1721153101306",
"limit": "1000",
"sourceName": "S3-Tutorials",
"spaceName": "dbo",
"tableName": "activity_log"
}Last updated on