Expand my Community achievements bar.

SOLVED

Conditional join in schemas

Avatar

Level 1

Hi - 

 

I am trying to add a conditional join into a schema, where IF a field in the new schema = X, THEN join to Y table, ELSE join to Z table.

 

Does anyone know if this is possible? If so, do you have an example of the XML code that would be needed?

 

Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

It's not really possible to do in schema- however you can add both joins and dynamically select them at point of use, e.g. with js initialization of query activity.

I once worked on a project that had a table composed of hundreds of unlabeled cols that were ~grouped in sets, e.g. column1+column318+column319+column618 would be one of many sets defined in an Excel doc.

Made it sort of manageable by using js init to select which groups to query and their relationships to other tables.

 

Thanks,

-Jon

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

 

It's not really possible to do in schema- however you can add both joins and dynamically select them at point of use, e.g. with js initialization of query activity.

I once worked on a project that had a table composed of hundreds of unlabeled cols that were ~grouped in sets, e.g. column1+column318+column319+column618 would be one of many sets defined in an Excel doc.

Made it sort of manageable by using js init to select which groups to query and their relationships to other tables.

 

Thanks,

-Jon