Skip to Content
0

Create target Element IF

Nov 17, 2017 at 08:24 AM

56

avatar image
Former Member

Hi Guys,

I need so tips about how to make this logical below:

Source to Target - (Element - KEY).

The element KEY must be not created with there is no LOCAL_PI_ID, because KEY it's WHERE to JDBC interface and the select will be:

SELECT * FROM TABLE WHERE - Will generate error.

If there is no LOCAL_PI_ID - Do not create KEY

If there is LOCAL_PI_ID - Send ROW - LOCAL_PI_ID to KEY - LOCAL_PI_ID

If there are COUNTRY_CODE or LOCAL_DRUG - Send ROW C or L to KEY C or L.

I need make this comparison from those 3 input fields to KEY.

Thank you guys !

Regards,

untitled.png (10.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Evgeniy Kolmakov Nov 17, 2017 at 11:48 AM
0

Hi Pedro!

Regards, Evgeniy.


where-mapp01.png (38.2 kB)
where-res01.png (27.1 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Great Evgniy,

Almost this, look this pic below:

in the case that I don't have LOCAL_PI_ID, I should not create (KEY).

I think solved with it:

capture.png (21.2 kB)
capture3.png (20.0 kB)
0
Priyanka Anagani Nov 17, 2017 at 09:17 AM
0

Try this.

LOCAL_PI_ID-->Exists-->CreateIf-->KEY

LOCAL_PI_ID-->LOCAL_PI_ID

COUNTRY_CODE-->Exist-->If-->then pass COUNTRY_CODE Else pass LOCAL_DRUG

--Priyanka

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Nov 17, 2017 at 09:54 AM
0

Hi Pedro!

Wouldn't you please clarify your requirement? Do you have three possible conditions like:

WHERE LOCAL_PI_ID = Value

WHERE COUNTRY_CODE = Value

WHERE LOCAL_DRUG = Value

?

Or combination of that conditions?

Regards, Evgeniy.

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Evgeniy,

If there is NO LOCAL_PI_ID at SOURCE message - Do not create KEY in target.

But if I have the COUNTRY_CODE or LOCAL_DRUG I need create KEY to create the statement for data base .

OR

If I have LOCAL_PI_ID at SOURCE message - Create KEY in Target with LOCAL_PI_ID to make statement for data base.

Row - 0:Unbounded

Key - 0:Unbounded

is it clear ?

0

Hi Pedro!

If there is NO LOCAL_PI_ID at SOURCE message - Do not create KEY in target.

But if I have the COUNTRY_CODE or LOCAL_DRUG I need create KEY

If no LOCAL_PI_ID - don't create key.

But if COUNTRY_CODE or LOCAL_GRUG exists (and still no LOCAL_PI_ID) - create key.

What does this mean?

Regards, Evgeniy.

1
Former Member
Evgeniy Kolmakov

Evgeniy,

Maybe its confused of my side about how works the SELECT statement.

I will clarify and post more if need, thanks for patient.

0

Should the "key" node be created if at least one of LOCAL_PI_ID, COUNTRY_CODE or LOCAL_DRUG exists?

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

Yes correct,

but need remember that ROW is 0:unbounded.

0

And can multiple elements exist within one "row" element: for example, LOCAL_PIID and COUNTRY_CODE?

Regards, Evgeniy.

0
avatar image
Former Member Nov 17, 2017 at 08:03 PM
0

Change the context of LOCAL_PI_ID to the root node, then map to key;

Change the context of LOCAL_PI_ID to the root node, then splitByValue (each value), then map to target LOCAL_PI_ID.

Share
10 |10000 characters needed characters left characters exceeded