]
Ramesh Reddy commented on TEIID-4622:
-------------------------------------
Add these functions to "data-quality" project's function library. Make sure
that they are not already provided through the standard Teiid function library.
Adding new data quality functions from osDQ
-------------------------------------------
Key: TEIID-4622
URL:
https://issues.jboss.org/browse/TEIID-4622
Project: Teiid
Issue Type: Feature Request
Components: Common
Affects Versions: Open To Community
Environment: osdq-core and its dependency simmetric 3.0.0 is needed to run these
functions
maven central location
http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22osdq-core%22
Reporter: vivek singh
Assignee: Kylin Soong
Fix For: Open To Community
Attachments: DateUtil.java, NumberUtil.java, StringUtil.java
Following functions have been added into osdq-core for integration with teiid.
String functions :
// Encrypting a string using key and AES encryption
String encrypt ( String val, String key)
String decrypt ( String val, String key)
// Fuzzy distance - similarity between two strings
float levestheindistance ( String a, String b)
float jarowinklerdistance( String a , String b)
float cosinedistance (String a, String b)
// Format check for PII ( personal information)
boolean isCreditCardFormat(String a)
boolean isSSNFormat(String a)
boolean isPhoneFormat(String a)
boolean isEmailFormat(String a)
boolean hasWhiteSpace(String a )
Date Functions
// converting date into universal recognized format
long dateToEpoch(java.util.Date date)
Date epochToDate(long epoch)
Date epochToDate(long epoch, String TimeZone)
long diffInSec(date a, date b)
String convertToFormat ( Date a, String Format)
Numerical Functions
// Statistical functions
double stdDev(Number[] numSeries)
double range(Number[] numSeries)
double median(Number[] numSeries)