Informatica - MD5
2015-12-02 15:24
295 查看
在对数据进行增量抽取的时候,通常的方法是按照时间戳或者 Identity 字段来过滤历史数据。当然还有更加简便的方式,那就是 MD5加密函数,它可以跟他特定列或者整行数据进行hash处理成一个组32位/64位字符串。之后根据该哈希值来 SCD-2 类型抽取。
MD5有很多加密形式,不同的加密形式输出的结果是不一样的。之所以这么说是因为在 Informatica 里面使用 MD5 函数之后,在数据库中再 Check 的时候发现数据对不上,也是Google 之后才找到了匹配的函数形式。
1. How to use MD5
2. How to validate MD5 results.
Part 1. How to use MD5 function in Mapping
1. define a reuse expression for MD5 hash function.
![](http://img.blog.csdn.net/20151202151320684)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/9ac26809c4d54c49a6586a05909cf5e3/clipboard.png)
Trying to convert other datatype to string.
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/e2aaaedf7149481db17d7a12015ba0bf/clipboard.png)
![](http://img.blog.csdn.net/20151202151429687)
Part 2 : How to validate MD5 results according to SQL querying.
![](http://img.blog.csdn.net/20151202151436498)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/8895d62435b849249db26b97279b61ee/attachment.png?1449040295191)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/ec3592e78e264536b97a7680985191dc/attachment.png?1449040295192)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/bf443a7d09384f3a845930f7f8808e43/attachment.png?1449040295192)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/d696af61461949f385cb3d6aeecc206c/attachment.png?1449040295193)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/100e212e47934f5ca9a048fd006d0d09/attachment.png?1449040295193)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/118830076e2049839f2cc951a7821ea2/attachment.png?1449040295193)
Need added all involded field into joint together....
Validate results:
![](http://img.blog.csdn.net/20151202151440440)
Part 3. Some mapping which use MD5 function
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/0808de51713b400aadcd00136da31c08/attachment.png?1449040295194)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/4159723dbcfd4f48b6c992af2bf0a2ca/attachment.png?1449040295194)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/8a6978a43c094a64aa6016a879550dc2/attachment.png?1449040295195)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/d6be3513e6004d03a8d37c3dfd7c9862/attachment.png?1449040295195)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/c85dbab71f3a4e45b845ba31fc6f902b/attachment.png?1449040295196)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/72cdd576da8b4494a7d7e97ea428f15b/attachment.png?1449040295196)
![](http://img.blog.csdn.net/20151202151444861)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/0202e30ec6724884ad91fe8618b84c7e/clipboard.png)
![](http://img.blog.csdn.net/20151202151448898)
MD5有很多加密形式,不同的加密形式输出的结果是不一样的。之所以这么说是因为在 Informatica 里面使用 MD5 函数之后,在数据库中再 Check 的时候发现数据对不上,也是Google 之后才找到了匹配的函数形式。
1. How to use MD5
2. How to validate MD5 results.
Part 1. How to use MD5 function in Mapping
1. define a reuse expression for MD5 hash function.
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/9ac26809c4d54c49a6586a05909cf5e3/clipboard.png)
Trying to convert other datatype to string.
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/e2aaaedf7149481db17d7a12015ba0bf/clipboard.png)
Part 2 : How to validate MD5 results according to SQL querying.
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/8895d62435b849249db26b97279b61ee/attachment.png?1449040295191)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/ec3592e78e264536b97a7680985191dc/attachment.png?1449040295192)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/bf443a7d09384f3a845930f7f8808e43/attachment.png?1449040295192)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/d696af61461949f385cb3d6aeecc206c/attachment.png?1449040295193)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/100e212e47934f5ca9a048fd006d0d09/attachment.png?1449040295193)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/118830076e2049839f2cc951a7821ea2/attachment.png?1449040295193)
SELECTCONVERT(VARCHAR(32),HashBytes('MD5','Hello World'),2)SELECT UPPER(master.dbo.fn_varbintohexsubstring(0, HashBytes('MD5','Hello World'),1,0))
Need added all involded field into joint together....
Validate results:
Part 3. Some mapping which use MD5 function
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/0808de51713b400aadcd00136da31c08/attachment.png?1449040295194)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/4159723dbcfd4f48b6c992af2bf0a2ca/attachment.png?1449040295194)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/8a6978a43c094a64aa6016a879550dc2/attachment.png?1449040295195)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/d6be3513e6004d03a8d37c3dfd7c9862/attachment.png?1449040295195)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/c85dbab71f3a4e45b845ba31fc6f902b/attachment.png?1449040295196)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/72cdd576da8b4494a7d7e97ea428f15b/attachment.png?1449040295196)
![](file:///C:/Users/mhan030/AppData/Local/YNote/data/qqDDA2AAB8EB055CFDE7C8DF00259EE1EA/0202e30ec6724884ad91fe8618b84c7e/clipboard.png)
相关文章推荐
- Atom 炫酷插件安装方法
- Mahout安装与配置
- poj1273--Drainage Ditches(最大流Edmond-Karp算法 邻接表实现)
- 控制台不打印日志异常
- LeetCode() Min Stack 不知道哪里不对,留待。
- 调用 java GC
- nginx 虚拟主机+负载均衡
- rsync无密码传输文件
- Codenames, Tags, and Build Numbers
- 简单工厂模式
- 情感分析——《Hierarchical emotion classification and emotion component ...》 2015-12-02
- iOS错误汇总 Implicit declaration of function - C99 完美解决
- Windows WebBrowser JQuery password
- 使用Eclipse Memory Analyzer进行内存泄漏分析三部曲
- MAC快捷键汇总
- 151202NSMutableAttributedString给UITextView 添加超链接
- 交互图
- Linux从程序到进程
- Sphinx/Coreseek 4.1的安装流程
- 线程池 Executors 入门