I'm in front off a problem that I don't find how to solve to: I'm fetchning from an oracle database a field value. this value must be updated in an mysql database throw an update with two constants in a where row: UPDATE my_table SET my_field = oraclevalue WHERE field = 'firstField' AND secondField = 'secondField';
So my batch is based like the following one:
But from and to field are not variables but must be static values. How can I define their values ? Does I need to update the model? Does I need to update job to fetch the row matching from Mysql Database server and update it?
Best
you can use a look up (small file delimited) with and dooble inner join
or create global variables in a tJava / tSetGloblavariable and use filter the output
or create two context variable and use filteron the output.
If you are using external image provider you may block out people from helping you. Some companies have extreme restrictive firewall rules. I can not get your picture if you don?t attach them to your post. If you need a constant value you can use a global variable. A global variable, you can set from any place in your job (like with tPrejob) and then use in your tMap. I?m usually using a context Variable for global Variables because I like the CTRL+Space functionality.
Hello,
thanks for your feedback.
So I have add a t_SetGlobalVar with two variables: Var1 with value firstField, Var2 with value secondField.
But I'm sorry but can't found how to use them in t_Map?
Best regards
hello,
thanks for yours feedback.
So I have used them like this, but I'm not sure that syntax is wrong because CTRL+space doesn't give me my variables in list.
The job contains now a t_SetGlobalVar which have two variables definitions.
In My Map, I have update the variables with CTRL+Space
But when I run job, I have an error that mapping fields cannot be null.
So, My mapping is wrong, I suppose that my variables declarations is wrong, but I can't see why.
Does someone can help a newbie?
Best regards
As I said, if you don?t attach the picture to the post, I will not be able see them. If variables are not available, then you did not declare them before.