Generate predicates from metadata