Uncategorized

Data View: Automation Instance

By monitoring automation health, you may get a broad picture perspective of all automations within your business unit and increase the efficiency and success rate of your automations.

In Automation Studio, query the _AutomationInstance data view to prevent failures by identifying long-running processes and to solve failed automations by addressing the reason of failure.

Create the Data extension first, which will hold the query output.

Data extension columns

NAMEDESCRIPTIONDATA EXTENSION DATA TYPENULLABLE
MemberIDThe unique ID of the business unit.Number
AutomationNameThe automation name.Text
AutomationDescriptionThe automation description.TextX
AutomationCustomerKeyThe unique ID of the automation.Text
AutomationTypeThe automation’s starting source. Possible values are Schedule, File Drop, or Trigger.Text
AutomationNotificationRecipient_CompleteThe email address where notifications about completed automations are sent.TextX
AutomationNotificationRecipient_ErrorThe email address where notifications about automation errors are sent.TextX
AutomationNotificationRecipient_SkipThe email address where notifications about skipped automations are sent.TextX
AutomationStepCountThe number of steps in the automation.Number
AutomationInstanceIDThe unique ID of the automation run.Text
AutomationInstanceIsRunOnceWhether the automation was set to run once. 1 = true, 0 = false.Boolean
FilenameFromTriggerFor file drop and trigger automations, the file that started the automation.TextX
AutomationInstanceScheduledTime_UTCFor scheduled automations, the time that the run was scheduled to begin.DateX
AutomationInstanceStartTime_UTCThe time that the automation run started. This value is null if the automation was skipped.DateX
AutomationInstanceEndTime_UTCThe time that the automation run ended. This value is null if the automation was skipped or is still running.DateX
AutomationInstanceStatusThe status of the automation run when the data view is queried. Possible values are QueuedFile, Initialized, Executing, Stopped, Complete, or Error.Text



AutomationInstanceActivityErrorDetailsThe message from the error log, if applicable. If a system or unclassified error occurs, the value is System Error. If multiple errors occur, only the first message is displayed. To get details on multiple errors, use the _AutomationActivityInstance view.TextX

Which Automations Failed Yesterday?

By evaluating automations that failed yesterday, you can identify deficiencies with your automations and prevent future failures.

1234SELECT automationcustomerkey, AutomationInstanceActivityErrorDetails, AutomationNameFROM   [_automationinstance]WHERE  automationinstancestatus = 'Error'AND automationinstanceendtime_utc >= Dateadd(day, -2, Getutcdate())

Which Automations Completed Yesterday?

Check that yesterday’s automations ran.

1234SELECT automationcustomerkey, AutomationInstanceActivityErrorDetails, AutomationNameFROM   [_automationinstance]WHERE  automationinstancestatus = 'Complete'AND automationinstanceendtime_utc >= Dateadd(day, -2, Getutcdate())

Which Automations Skipped Yesterday?

Skipped activities indicate an unhealthy automation, such as too little time between scheduled automations. Or, when a running instance was halted, several file drop automation instances waited. Find automations skipped yesterday and decide whether to act using this query.

1234SELECT automationcustomerkey, AutomationInstanceActivityErrorDetails, AutomationNameFROM   [_automationinstance]WHERE  automationinstancestatus = 'Skipped'AND automationinstanceendtime_utc >= Dateadd(day, -2, Getutcdate())

What Is the Average Duration of Each Automation?

Check your automations’ average performance for patterns and issues before they affect crucial processes. If an automation slows down, find out why and fix it. This query calculates each automation’s average duration for the past 1–31 days.

12345SELECT automationcustomerkey,Avg(Datediff(minute, automationinstancestarttime_utc,automationinstanceendtime_utc)) AS AvgDurationFROM   [_automationinstance] automationGROUP  BY automationcustomerkey

What Is the Latest End Time and Status of Each Automation?

View all automations with at least one run in the previous 6 months, including the latest end time and status. Identify critical failures and inactive automations using this data.

1234567891011121314SELECT automationcustomerkey,automationinstanceid,automationinstancestatus,automationinstanceendtime_utcFROM   (SELECT automationcustomerkey,automationinstanceid,automationinstancestatus,automationinstanceendtime_utc,Row_number()OVER (partition BY automationcustomerkeyORDER BY automationinstanceendtime_utc DESC) AS run_countFROM   [_automationinstance]) AS instancesWHERE  run_count = 1

Leave a Reply

Your email address will not be published. Required fields are marked *