Key | Value |
---|---|
Table | DS04 Schedule |
Severity | CRITICAL |
Unique ID | 1040215 |
Summary | Is this task duplicated in the schedule? |
Error message | Duplicate task ID found (by subproject_ID). |
The Data Integrity and Quality (DIQ) check titled "Duplicate Task ID" is designed to identify any instances where the same task ID appears more than once in the DS04 Schedule table. This check is important because each task ID should be unique and correspond to a single task.
If the DIQ check returns a message stating "Duplicate task ID found," this indicates that there are one or more task IDs that have been entered into the DS04 Schedule table more than once. The fields causing this issue are the 'task_ID', 'schedule_type', and 'subproject_id' fields.
The expected values for these fields are unique identifiers for each task and the type of schedule respectively. If the same task ID is found more than once, it suggests that there may be an error in the data entry process, such as a task being entered into the system multiple times.
To resolve this issue, you should review the tasks in the DS04 Schedule table and ensure that each task has a unique ID. If any duplicate task IDs are found, they should be corrected or removed to ensure the integrity and quality of the project management data.
This test is being performed to ensure that there are no duplicate Task IDs in the 'DS04 Schedule' table. The presence of duplicate Task IDs can lead to confusion, misinterpretation of data, and errors in data analysis. This is because each task in the schedule should have a unique identifier for proper tracking and management.
The severity of this check is marked as 'CRITICAL', which is the highest level of severity. This means that if duplicate Task IDs are found, they must be corrected before the data can be reviewed.
CREATE FUNCTION [dbo].[fnDIQ_DS04_Sched_PK] (
@upload_id int = 0
)
RETURNS TABLE
AS RETURN
(
with Dupes as (
SELECT task_ID, schedule_type, ISNULL(subproject_ID,'') SubP
FROM DS04_schedule
WHERE upload_ID = @upload_ID
GROUP BY task_ID, schedule_type, ISNULL(subproject_ID,'')
HAVING COUNT(*) > 1
)
SELECT
S.*
FROM
DS04_schedule S INNER JOIN Dupes D ON S.task_ID = D.task_ID
AND S.schedule_type = D.schedule_type
AND ISNULL(S.subproject_ID,'') = D.SubP
WHERE
upload_id = @upload_ID
)
Date | Description of Changes |
---|---|
2024-04-30 | Logic adjusted to account for the addition of subproject_id field. |