How to find schema name via querying another schema and table with a sub query in LookML Views

I have to fetch the schema name from another schema's tables and match the regex with a user attribute. This is how my sub query looks like and I am trying to add it as sql_table_name query directly -

sql_table_name: (select concat((select concat('_', (select first_known_subdomain from public.account_info ai join public.subdomain_info si on ai.id = si.account_id where concat('_',si.subdomain) = '{{ _user_attributes['journeys_schema'] }}'))),'.activity_info')) ;;

When I am trying to do this way as mentioned, I get an error as 

ERROR: column journey.id does not exist Position: 1468

So, the user attribute for schema is not populating with exact schema that is required so we are trying to fetch the correct schema name from some tables in public schema which needs to be used as the schema for these views.

Has anyone been able to get such requirement working until now ?

0 1 467
1 REPLY 1

Even I am facing the same issue. Kindly help as fast as possible