]
Kylin Soong commented on TEIID-4622:
------------------------------------
I have added a pull request, and tested it works fine, could you have a look? I checked
there no name conflicts between osdq functions and teiid funtions.
Current we treat all osdq functions as category 'MISCELLANEOUS', this may mix up
with teiid MiscellaneousFunctions, do we need add a new category to address osdq
functions?
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)