代码之家  ›  专栏  ›  技术社区  ›  AdvApp

为什么Talend tMSSqlSP或tMSSqlRow没有输出

  •  0
  • AdvApp  · 技术社区  · 7 年前

    我对ETL并不陌生,并试图熟悉泰伦德。我似乎无法获得存储过程(使用tMSSqlSP)或查询(使用tMSSqlRow)的任何输出。注意:我读到的东西表明,tMSSqlRow不会生成列输出,但不确定这是否正确。

    下面显示的作业正在运行,但没有来自tMSSqlSP组件的输出。跟踪调试显示输出标题为null。但是,在SSMS中手动执行SP成功,同时显示objid和title。

    SP执行一个接受单个输入参数(int)的简单查询,并输出两列——objid(int)和title(字符串):

    create procedure st_sp_case_title_get
        @objid int
    as
    select [objid], [title] from [dbo].[table_case] where [objid] = @objid   
    

    trace schema output

    1 回复  |  直到 7 年前
        1
  •  2
  •   Ibrahim Mezouar    7 年前

    您需要使用 tParseRecordSet 为了从中检索和分析结果集 tMSSqlRow tMSSqlSP :

    enter image description here

    定义一列作为结果集(我的称为 result )的类型 Object ,除了输入列之外(我的输入参数是personid)。在里面 tMSSqlSP 参数选项卡,设置 personid as类型 IN 后果 类型为 RECORD SET .

    tParseRecordSet 架构:

    enter image description here

    它解析结果列并获取 Firstname Lastname 列(您的 objid title 列)

    enter image description here

    tMSSqlRow 非常相似。检查我的上一个 answer 这里是一个例子。