[英]I want to replace Normal Join in Informatica by Cross join in SQL by running a query in source qualifier?
Normal join in informatica has been done using Dummy fields added in table dev and remote. 已使用表dev和remote中添加的虚拟字段完成了informatica中的正常连接。 Columns in dev table are database_region,site_cd, dev_nm, dev_locn_id, dev_typ, bond_ind , FRM_ID, AP_ID ,DUMMY_DEV and Columns of remote are node_id and DUMMY_REMOTE.
dev表中的列是database_region,site_cd,dev_nm,dev_locn_id,dev_typ,bond_ind,FRM_ID,AP_ID,DUMMY_DEV,而remote的列是node_id和DUMMY_REMOTE。 We are creating a cross join using condition DUMMY_DEV = DUMMY_REMOTE declaring Master Columns as node_id and DUMMY_REMOTE.
我们使用条件DUMMY_DEV = DUMMY_REMOTE将主列声明为node_id和DUMMY_REMOTE来创建交叉联接。 However, as per client requirement we have create the Cross Join in sql.
但是,根据客户要求,我们已在sql中创建了交叉联接。 TO achieve that i am running a cross join using SQL query.
为了实现这一点,我正在使用SQL查询运行交叉联接。 When i compared the Row count and data between the Normal Join of Informatica and Cross Join of SQL, It resulted perfectly same.
当我比较Informatica的普通联接和SQL的交叉联接之间的行数和数据时,结果完全相同。 However the order of rows are different.
但是,行的顺序不同。 Can anyone suggest how can i achieve the exact same result?
谁能建议我如何达到完全相同的结果? Below is the query i am using.
以下是我正在使用的查询。
select database_region,site_cd,dev_nm,
dev_locn_id, dev_typ, bond_ind , FRM_ID, AP_ID ,
node_id
from dev cross join
remote ;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Result from Informatica Normal Join Informatica普通加入的结果XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 20MEG
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 20MEG
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 20MEG
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 20MEG
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx Result of Cross Join from informatica XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX来自Informatica的交叉加入的结果
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 15MEG
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 15MEG
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 15MEG
01 AGSTAR AGSTARXAHA1-AGST AUGUSTA/80MVC7B/N65 C7 /M Y 01 20MEG
For Demonstration providing Four output rows, as Cross join results in creation of 100 000 rows. 对于提供四个输出行的演示,由于交叉联接会导致创建100 000行。
This is too long for a comment. 这个评论太长了。
SQL tables represent unordered sets. SQL表表示无序集。 Result sets -- when there is no
order by
-- similarly represent unordered sets. 结果集-当没有
order by
-相似地表示无序集。
You can run the same query twice, on the same data, in the same database, and get the rows in a different order. 您可以在相同的数据,相同的数据库中对相同的查询运行两次,并以不同的顺序获取行。 SQL does not care.
SQL不在乎。
If you want the results in a particular order, then use order by
. 如果您希望结果按特定顺序排列,请使用
order by
。 If you want the results to always be returned in the same order, then use order by
. 如果您希望结果总是以相同的顺序返回,请使用
order by
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.