如果为空,如何为参数设置默认值?

斯里尼夫

如果运行时中未提供参数,我需要将其设置SYSTEM DATE为默认值load_date我可以通过检查传递的值并根据 NULL 检查相应地分配它来实现这一点。是否有内置功能来实现这一目标?

我什至尝试使用 if_null 步骤,这似乎是一个问题。

这是我在日志中得到的

2017/11/10 14:19:13 - Spoon - Transformation opened.
2017/11/10 14:19:13 - Spoon - Launching transformation [123]...
2017/11/10 14:19:13 - Spoon - Started the transformation execution.
2017/11/10 14:19:13 - 123 - Dispatching started for transformation [123]
2017/11/10 14:19:19 - get_variables.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2017/11/10 14:19:19 - Write to log.0 - 
2017/11/10 14:19:19 - Write to log.0 - ------------> Linenr 1------------------------------
2017/11/10 14:19:19 - Write to log.0 - load_date = null
2017/11/10 14:19:19 - Write to log.0 - 
2017/11/10 14:19:19 - Write to log.0 - ====================
2017/11/10 14:19:19 - get_system_info.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2017/11/10 14:19:19 - if_null.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2017/11/10 14:19:19 - Write to log.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2017/11/10 14:19:22 - Spoon - The transformation has finished!!

这就是我的转变的样子。在图片中嵌入每个步骤的详细信息。

123.ktr

阿兰

事实上If Null不接受 中的字段replace by value,只接受一个值。

尽管其他解决方案也是可能的,但您可能希望使用Modify JavaScript Value. 根据作业如何将参数提供给您的转换,您可能必须将条件替换为if(load_date!='null')if(!load_date.isEmpty())

在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何在Javascript中为可选参数设置默认值?

Android:如何为参数变量设置默认值

如果env var为空,如何分配默认值?

从python中的参数设置参数默认值

如何为DateTime参数设置默认值

是否可以在PowerShell中的许多函数调用中为命名参数设置默认值?

如何为命名函数参数设置默认值?

如何在Scala中为varargs参数设置默认值?

如何为可选的Range参数设置默认值?

C#:如果输入为空,如何设置默认值

如何在程序定义的架构中为参数设置默认值?

如果它们为空,如何在程序中设置日期输入参数的默认值?

如何为ChoiceParameterDefinition参数设置默认值

如果变量为空,则设置默认值

为Rcpp函数中的参数设置默认值NULL

如何为功能类型的可选位置参数设置默认值?

如何在关键字中为可选列表参数设置默认值

如果路径值为空,则设置默认值

为哈希表参数设置默认值

如何根据URL参数设置下拉菜单的默认值?

SQL函数-将date参数设置为默认值会破坏函数

如何为星号参数设置默认值?

如何为通过JavaScript中的对象文字模拟的命名函数参数设置默认值?

如果jTextField为空,如何设置默认值

如何在Rails中为参数设置默认值?

SSRS 2017:想要在共享数据集中将参数设置为默认值 NULL

从元组参数设置元素参数的默认值

如果 props 为空,如何设置默认值?反应Js

如果 props 为空,如何设置默认值?使用反应JS