Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 结构混乱,tMap_Sql_Oracle_Business Intelligence_Talend - Fatal编程技术网

Sql 结构混乱,tMap

Sql 结构混乱,tMap,sql,oracle,business-intelligence,talend,Sql,Oracle,Business Intelligence,Talend,我有一个称为Product\u Dim Create Table Product_Dim ( Product_ID INT primary key, Product_Line CHAR(20), Product_Category CHAR(25), Product_Group CHAR(25), Product_Name CHAR(45), Supplier_Country CHAR(2), Supplier_Name CHAR(30), Supplier_ID INT ) Product_

我有一个称为
Product\u Dim

Create Table Product_Dim
(
Product_ID INT primary key,
Product_Line CHAR(20),
Product_Category CHAR(25),
Product_Group CHAR(25),
Product_Name CHAR(45),
Supplier_Country CHAR(2),
Supplier_Name CHAR(30),
Supplier_ID INT
)
 Product_ID Product_Name Product_line Product_group ...
 1          PN1
 2          PN2
            ....
 3                       PL1
 4                       PL2
                         ....
 5                                     PG1
 6                                     PG2
                                       ...
 ....
和两个源表
供应商
产品列表

产品清单如下:

Product_ID
Product_Name
Supplier_ID
Product_Level
Product_Ref_ID
其中Product_Level的值为(1,2,3,4)

1表示它是一种产品 2表示它是一个产品组 3表示它是一个产品类别 4表示它是一条产品线

因此,为了填写我的
产品尺寸
表 我确实拖动了4次
产品列表
(相应地将查询更改为
产品级别
) 和一个供应商

因此,对于连接,我执行以下操作:

 product_list.Product_Name  => PRoduct_Name
 product_group.Product_Name  => PRoduct_Group
 product_line.Product_Name  => PRoduct_line
 product_group.Product_category  => PRoduct_category
 ....
我的问题出在
产品\u ID

我不知道在那里拖动什么,我想拖动四个
Product\u ID
s,但我不知道要写什么表达式

任何帮助都将不胜感激

编辑:
产品尺寸

Create Table Product_Dim
(
Product_ID INT primary key,
Product_Line CHAR(20),
Product_Category CHAR(25),
Product_Group CHAR(25),
Product_Name CHAR(45),
Supplier_Country CHAR(2),
Supplier_Name CHAR(30),
Supplier_ID INT
)
 Product_ID Product_Name Product_line Product_group ...
 1          PN1
 2          PN2
            ....
 3                       PL1
 4                       PL2
                         ....
 5                                     PG1
 6                                     PG2
                                       ...
 ....

等等,但我不知道怎么做。

好吧,这很难,但我明白你的问题

我想到的第一个解决方案是把它分成4个tMap组件

这应该能解决你的问题


您是否阅读了最终用户指南?您使用的是哪种Talend产品?我使用的是在sourceforge中找到的TOS-All-r67267-V4.2.3,它是TalEndEnd-Tudio-win32-x86。我需要为Product_ID列找到一个表达式,除了Product_Dim之外,所有products表都具有相同的结构,它们只有不同的查询。也许您可以告诉我们您想要实现什么?你的问题不是一个真正的问题,因为我在你的帖子中没有看到一个。我很抱歉造成混淆,从我上面评论的图片中,你可以看到,除了Product_Dim表中的Product_ID之外,所有列都有各自的匹配项,我很困惑,因为所有4个表Product_list,Product_category,product_line和product group具有相同的结构,事实上,我所做的只是将表product拖4次并更改查询,正如我在主要问题中所解释的,我不知道如何在product_Dim表中填写product_ID,逻辑上应该如下所示(请查看主要问题中的编辑)为什么不从产品列表表中获取产品ID?我不明白。请阅读: