script to check if the schema part of the data share or not in aws Redshift database:
SELECT * FROM SVV_DATASHARE_OBJECTS where object_type='schema' and object_name='<schema_name>';
share_type|share_name |object_type|object_name|producer_account|producer_namespace
----------+-----------------+-----------+-----------+----------------+--------------------
outbound |abcprod_k1222_ds|schema |schema_name|122234555555 |1234567890