Type issue mapping parameters to ExecuteGraph

Support/help with CloverETL implementation problems

anyeone
Posts: 14
Joined: Thu Feb 09, 2017 4:30 pm

Type issue mapping parameters to ExecuteGraph

Postby anyeone » Thu Feb 23, 2017 11:36 pm

Hi,

I'm trying to use the ExecuteGraph component to execute a graph that contains several integer parameters that I wish to set from the calling JobFlow. The issue that I am repeatedly seeing is that even when I declare the parameters as an integer on the child graph, the Input mapping of the ExecuteGraph component thinks that those parameters are strings and says that the conversion is invalid because you cannot convert an integer to string.

I am able to work around this by setting all the parameters to strings but it seems like this might cause an issue later, so I am wondering if this is a known issue or if I'm just missing something.

I've attached some pics to show what I'm talking about.
In the first pic, these are the parameter defs on the child graph, you can see they are integers.
Screen Shot 2017-02-23 at 4.33.38 PM.png
Screen Shot 2017-02-23 at 4.33.38 PM.png (200.72 KiB) Viewed 339 times


In the next one, you can see the Input mapping window on the ExecuteGraph component
Screen Shot 2017-02-23 at 4.34.08 PM.png
Screen Shot 2017-02-23 at 4.34.08 PM.png (159.75 KiB) Viewed 339 times


In the final one, you can see the error that occurs when I try to map the parent job_id parameter to the child JOB_ID parameter
Screen Shot 2017-02-23 at 4.34.24 PM.png
Screen Shot 2017-02-23 at 4.34.24 PM.png (190.43 KiB) Viewed 339 times


Thanks in advance!

vazquezrosariop
Posts: 112
Joined: Mon Feb 29, 2016 5:33 pm

Re: Type issue mapping parameters to ExecuteGraph

Postby vazquezrosariop » Fri Feb 24, 2017 4:46 pm

Hi anyeone,

Parameters are always type string, I know it might be confusing but the "Editor Type" property is to let the editor know to only accept the type selected as the value. Thus, for example if you choose integer and start writing a string in the editor, it will let you know that only integer are valid. I'm quite sorry for the confusion, I would advise to type cast the job_id you are sending to the Parameter, it should look something like this:

Code: Select all

$out.0.JOB_ID = num2str($in.0.job_id)
---
Pedro Vazquez Rosario
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com
How to speed up communication with CloverCARE support

anyeone
Posts: 14
Joined: Thu Feb 09, 2017 4:30 pm

Re: Type issue mapping parameters to ExecuteGraph

Postby anyeone » Fri Feb 24, 2017 4:59 pm

That's how I've been handling it, thanks for clearing it up!


cron