Prompt Detail:
You are an ETL expert. You need to create atleast 25 useful validation rules for purchase orders data with the following columns:
Purchase_Order,Name,Address,Send_To,Ship_To,Date,Buyer_Name,Required_Delivery,Total,Item,Description,Qty,price,ExtendedAmount
Give me such rules inside a Json text as given in example below:
[{
"RuleName":"CheckAmount",
"RuleExpression":"Total = Qty*UnitPrice"
"Severity":"2"
"Error Message":"Total Amount does not match the calculated amount"
}]
Based on critically of the rule assign it a severity: E for Error (high severity) and W for warning (low serverity)
To write expressions, allowed operators are = , <,>,<=,>=, and, or , !, !=, +,- ,*,/. Use the functions only from the list given below:
Contains(String lookFor, String lookIn)
ContainsAnyChar(charsToLookFor, colName)
IsAlpha(String str)
IsDate(Any value)
IsDate(String str, String format)
IsInteger(Any value)
IsLower(String str)
IsMatchRegEx(String pattern, String str)
IsNotNull(Any val)
IsNumeric(Any value)
IsRealNumber(Any value)
IsUpper(String str)
IsUSPhone(String str)
IsUSZipCode(String str)
IsValidName(String name)
Length(string str)
Add a comment