Key | Value |
---|---|
Table | DS06 Resources |
Severity | MINOR |
Unique ID | 1060250 |
Summary | Does this resource have a resource ID and a role ID? |
Error message | Resource item found with both a resource and role ID (resource_ID and role_ID are not blank). |
The following text was generated by an AI tool and hasn't been reviewed for accuracy by a human! It might be useful, but it also might have errors. Are you a human? You can help by reviewing it for accuracy! Edit it as needed then remove this message.
Test Name: Resource With Role
Table: DS06 Resources
Summary: This test checks if a resource item in the DS06 Resources table has both a resource ID and a role ID.
Error Message: "Resource item found with both a resource and role ID (resource_ID and role_ID are not blank)."
Explanation: This error occurs when a resource item in the DS06 Resources table has both a resource ID and a role ID. In other words, neither the 'resource_ID' nor the 'role_ID' fields are blank for a given resource item. This could be due to a data entry error or a system issue that is causing both fields to be populated when only one should be.
Expected Values: Each resource item should have either a 'resource_ID' or a 'role_ID', but not both. If a resource item has a 'resource_ID', the 'role_ID' should be blank, and vice versa. If both fields are populated for a resource item, this indicates a data integrity issue that needs to be addressed.
The following text was generated by an AI tool and hasn't been reviewed for accuracy by a human! It might be useful, but it also might have errors. Are you a human? You can help by reviewing it for accuracy! Edit it as needed then remove this message.
This test is being performed on the 'DS06 Resources' table to ensure that each resource item has both a resource ID and a role ID. The purpose of this check is to maintain data integrity and quality by ensuring that each resource is properly identified and assigned a role. This is important because it helps to prevent confusion and errors in data analysis. The severity of this test is marked as an 'MINOR', which means that while it may not cause major problems, it could potentially lead to minor issues or indicate that the data does not adhere to all best practices. Therefore, it is recommended to address this issue to ensure optimal data quality and integrity.
CREATE FUNCTION [dbo].[fnDIQ_DS06_Res_DoesResourceHaveRole] (
@upload_id int = 0
)
RETURNS TABLE
AS RETURN
(
SELECT
*
FROM
DS06_schedule_resources
WHERE
upload_id = @upload_ID
AND role_ID IS NOT NULL
AND resource_ID IS NOT NULL
)