gpt4 book ai didi

sql - Pentaho执行SQL语句变量转换为null

转载 作者:行者123 更新时间:2023-12-04 23:35:05 26 4
gpt4 key购买 nike

我正在使用 PDI 从数据库中删除和插入一些数据。我有以下问题。我创建了两个名为 START_DATE 和 END_DATE 的变量,用于选择将从我的数据库中删除的数据。我能够获取它们并在日志文件中没有错误地运行我的转换,但是当我检查数据是否被删除时,我发现它没有。我发送检查了我的“DeleteProcedure”步骤,它说“转换错误:空”。我尝试了不同的方法来获取变量并将它们作为字符串传递,但我无法解决这个问题。这不可能是 SQL 错误,因为我用常量对其进行了测试并且它有效。

有什么想法吗?我附上一些照片。谢谢!

This is how I try to get my variables

I get my variables correctly

最佳答案

作为执行SQL脚本的文档说:

Note: When you have an issue, that the SQL is started at the initialization phase of the transformation and not for each row, make sure to check the option "Execute for each row" (see description below).

在您的情况下,它在转换的初始化阶段执行,这就是为什么它获得 null 值而不是上一步中的值的原因。

关于sql - Pentaho执行SQL语句变量转换为null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37885358/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com