def content_rpt(md):
    """ provides a report of what's left in the md.
        kinda useful for some diagnosis
    """
    rpt = '''SELECT s.schema_id,                             \
                    s.schema_name,                           \
                    c.collection_id,                         \
                    c.collection_name,                       \
                    f.field_id,                              \
                    f.field_name,                            \
                    f.field_order                            \
             FROM schema   s                                 \
                INNER JOIN collection c                      \
                  ON s.schema_id = c.schema_id               \
                INNER JOIN field      f                      \
                  ON c.collection_id = f.collection_id       \
          ''' 
    result = md.engine.execute(rpt)
    print
    #print 'final content report'
    print
    print '%-5.5s,  %-20.20s,  %-5.5s, %-20.20s, %-5.5s, %-20.20s, %-5.5s' % ('sch_id', 'sch_name', 'coll_id', 'coll_name', 'field_id', 'field_name', 'field_ord')
    for row in result:
        print '%-5.5s,  %-20.20s,  %-5.5s, %-20.20s, %-5.5s, %-20.20s, %-5.5s' % (row[0],row[1],row[2], row[3], row[4], row[5], row[6])
    print
    #print os.path.join(self.tempdir, 'metadata.db')
    #return result
dataset/ETHPy150Open kenfar/DataGristle/gristle/tests/test_metadata.py/content_rpt/original