cancel
Showing results for 
Search instead for 
Did you mean: 

Create target Element IF

Former Member
0 Kudos

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,

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Pedro!

Regards, Evgeniy.

Former Member
0 Kudos

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:

Answers (3)

Answers (3)

xinjiang_li
Active Participant
0 Kudos

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.

former_member190293
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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 ?

former_member190293
Active Contributor

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.

Former Member
0 Kudos

Evgeniy,

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

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

former_member190293
Active Contributor
0 Kudos

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

Regards, Evgeniy.

Former Member
0 Kudos

Yes correct,

but need remember that ROW is 0:unbounded.

former_member190293
Active Contributor
0 Kudos

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

Regards, Evgeniy.

PriyankaAnagani
Active Contributor
0 Kudos

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