page256
343
REPLACE ( REPLACE ( s.sql_statement, '[REGION]', c.filter_value ),
'[ORDER_KEY_MASK]', c.mask_value ) AS client_sql_statement,
c.client_account,
c.object_name,
c.filter_name,
c.filter_attribute,
c.filter_value,
c.mask_name,
c.mask_attribute,
c.mask_value,
s.sql_statement
FROM v_client_info c,
sql_statement s
WHERE c.object_name = s.name;
Now check that the view
v_client_sql_statement
returns the expected results.
SELECT * FROM v_client_sql_statement;
You should see attribute
client_sql_statement
returns the next SQL statement,
noting I have appended
LIMIT 10
to restrict the returned result set.
SELECT customer_key, customer_name, '********',
order_date, nation_name
FROM base_customer_order
WHERE region_name = 'AFRICA'
LIMIT 10;
With your view
v_client_sql_statement
prepared, you are ready to build your
filter engine.
Building a Filter Engine
Building a filter engine brings together several components:
•
Creation of containers to hold client-specific curated objects
•
Creation of objects within a schema
•
Granting entitlement on schema objects to the share
Chapter 9
Client expeCtations