create table and query for custom metadata