Skip to main content

How can I change the type of a new added field in the Expression Evaluator?

 

Because if I add a field like this:

 

Then the field is defined as a string. But I need to have it as DATETIME

I know I could just not add this field but my goal is to make the pipeline creating not existing tables if needed.

 

So I need to declare all attributes, even they are empty. 

Thanks

@drozdse1 

Please refer the document and i hope it will help in your case.

 

https://docs.streamsets.com/portal/platform-datacollector/latest/datacollector/UserGuide/Expression_Language/Functions.html?hl=functions

 

In case of any issues , please provide me the sample input and what will be expected result expecting ,so i can help you on it.


As mentioned in the my question. I expect an DATETIME but I get an STRING field back for SOURCE_VALID_FROM attribute


So I expect, that the SOURCE_VALID_FROM is shown as {DATETIME}


Found the solution by myself:

 

 

It’s not what I would do in a real world programming language but it works :-)


@drozdse1 

 

Great to hear that you were able to find a solution on your own.

Just for your reference, the provided URL can be quite useful if you need to set values to variables

 


Thanks @Bikram, will do


Reply