Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping to add a calculated field

Hello,

I need to add a calculated field in my script.

This field is calculated from three table, the field that I have to add is Shadowlocal:

     if agentName= CountryLocalShadowRouter

     then ShadowLocal= True

     else ShadowLocal= false

the field "agentNmae" is from the table Data and the field CountryLocalShadowRouter is from the table Countries.

This is my DataModel:

modele.png

I have to use a mapping to calculate this field but I don't know how!  I need your help please!

Thank you

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Create a mapping table Country_Mapping with Fields

Tab:

Mapping

LOAD * INLINE [

    CountryLocalShadowRouter, ShadowLocal

    All values of this field, True

];

Then write this in your script within Data table


Applymap('Tab',agentName,'False')  as Something

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Create a mapping table Country_Mapping with Fields

Tab:

Mapping

LOAD * INLINE [

    CountryLocalShadowRouter, ShadowLocal

    All values of this field, True

];

Then write this in your script within Data table


Applymap('Tab',agentName,'False')  as Something