Create Data Dependency (example for a Data Collection Trigger)
Data Dependencies are typically associated with a Data Collection Trigger in order to ensure that data is available and relevant in the source system. Unlike Schedule or Trigger Dependencies which verify that a particular process has been completed, this dependency involves creating SQL to look at the data for verification.
This article explains Creating from an existing Data Collection Trigger. (see Create a Data Collection Trigger) and is identical to creating a Data Dependency from the Admin > Collection & Storage > Data Dependencies menu.
Note that creating Data Dependency is slightly different when creating from a Notification Schedule (see Create or Modify a Notification Schedule
Examples of Data Dependency Checks:
- Check that data in a Warehouse Customer Order table contains records post midnight of the prior day (indicating that all of the prior day's orders have been loaded).
- Verify that an ETL (Extract, Transform, Load) control table specifies that ETL processing has been completed since the last data collection cycle.
- Verify that volume in a data table is at least n% of the volume of data on a prior day as a data quality check before loading data.
- Click [+ New Data Dependency] on the Dependencies tab of the Data Collection Trigger Editor
- In the Add Data Dependencypop-up:
- Select the Add New Data Dependency option from the drop-down list
After the new Data Dependency is saved, the Data Dependency Editor opens.
- Select Data Dependency Mode:
- If set to "Numeric", the system expects the SQL statement to return a positive number, see Hint on right of statement box above
- If set to "Date", the SQL hint will change to: "Specify a statement which will return a single column which contains a DateTime value. The dependency will be satisfied if the value returned falls after the DateTime on which the Dependency was last satisfied. You may optionally also specify the Table Name for the query."
- Specify the Data Source for the Data Dependency
- Provide a fetch command. The hint to the right will change based on the Data Dependency Mode selected above
- Configure Data Dependency Action:
- If set to "Wait until satisfied": you can also specify how many time a Dependency is checked until it is satisfied. See Specify When and How Often to Perform the Data Dependency Check
- If set to "Abort if not satisfied": the dependency will be checked as the first step of Data Collection Trigger If the dependency is not satisfied, the associated Data Collection Trigger will abort with error when starting
- [Validate] your fetch command
- If last_dependency_satisfied was included in the fetch command, provide a value for testing the data dependency logic
- If Validation is successful [Enable Dependency]
Scroll to bottom of Info tab. The values shown above are the system defaults.
- Check Interval: specify how often the dependency check fetch command should be run
- Provide a time window during which checks should be performed
- Max. check time: specify a limit to time expended when checking the dependency. If exceeded, the Data Dependency fails.
- [Enable Dependency] at the top right corner of the page
- A given dependency can be shared among multiple Data Collection Triggers
- Multiple dependencies can be specified for a Data Collection Trigger and all associated dependencies must be satisfied before the Data Collection Trigger starts
Open Dependencies tab
- Select the Edit icon to open popup
- If the Data Collection Trigger's interval value is set to "1" of any time unit, except Minute; e.g., 1 Hour, 1 Week, 1 Calendar Year, you can control whether an associated Data Dependency must be satisfied during current collection cycle by accessing the Dependencies tab of the Data Collection Trigger Editor and editing an existing dependency.