如何将 Power Center 映射导出到 SQL 语句?
是否始终可以将 Informatica PowerCenter 映射导出到 SQL 语句序列?我们该怎么做呢?如果我们能以编程方式做到这一点,那就加分了。
我的映射是从一个关系数据库到另一个关系数据库。
Is it always possible to export an Informatica PowerCenter mapping to a sequence of SQL statements? How would we do it? Plus points if we can do it programmatically.
My mapping is from a relational database to another relational database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上,只要满足某些条件,Informatica 就可以将整个映射转换为 INSERT-SELECT 语句。
Pushdow Optimization
需要设置为Full
然后
Pushdown优化查看器
(更多信息) 允许您先睹为快,看看查询是完全映射转换为 SQL 语句的结果。注意:这可能还需要启用
允许临时视图进行下推
。注意2:此功能有许多限制(例如,使用局部变量时不可能实现,等等)。
Well, Informatica actually makes it possible to convert the whole mapping to a INSERT-SELECT statement, as long as some conditions are met.
Pushdow Optimization
needs to be set toFull
Then
Pushdown Optimization Viewer
(more info) allows you to take a sneak peek at the query being a result of complete mapping transformation into SQL statement.NOTE: This may also require enabling
Allow Temporary View for Pushdown
.NOTE2: This feature has a number of limitations (eg. it's not possible when local variables are used, etc.).
不,目前 Infa 没有提供任何以编程方式将 infa 映射转换为 SQL 的选项(否则谁会使用 informatica :D )。
如果你想为映射编写 SQL,那么你需要使用某种编程语言来编写一些东西 - 可以,但会很困难。有时,如果涉及多个数据库、文件、XML/http 转换、复杂逻辑等,这可能是不可能的。
这里是一些关于简单 1-1 映射的指南,该映射由来自同一数据库的 1 个或多个源、表达式、查找 tr 和一个目标组成-
您的整个 SQL 应该如下所示
再次强调,映射可能非常复杂,有时即使是简单的调整也会使您的程序失败。我建议,在投入时间之前先分析一下复杂性。
这是一个可以用来分析的映射分析工具(由我尊敬的 SO 用户创建)。
https://xmlanalyzer.maciejg.pl/
No, currently Infa doesn't give any option to convert a infa mapping to a SQL programmatically (else who will use informatica :D ).
If you want to write a SQL for a mapping then you need to write something using some programming language - you can but it will be difficult. Sometime it may be impossible if it involves multiple DBs, files, XML/http transform, complex logic etc.
Here is some guidance for simple 1-1 mapping consists of 1 or multiple sources from same DB, expression, lookup tr, and one target -
Your whole SQL should look like this
Again, the mapping can be really complex and sometime even simple tweak can throw your program off. I recommend, analyze the complexity before investing time on this.
Here is a mapping analyzer tool you can use to analyze (created by a SO user i respect).
https://xmlanalyzer.maciejg.pl/