#NEWLINE# @ wwwutils . gzipped #NEWLINE# @ expose ( '/partitions/' ) #NEWLINE# def partitions( self ) : #NEWLINE# #INDENT# ( schema , table ) = request . args . get ( 'table' ) . split ( '.' ) #NEWLINE# sql = "\n        SELECT\n            a.PART_NAME,\n            a.CREATE_TIME,\n            c.LOCATION,\n            c.IS_COMPRESSED,\n            c.INPUT_FORMAT,\n            c.OUTPUT_FORMAT\n        FROM PARTITIONS a\n        JOIN TBLS b ON a.TBL_ID = b.TBL_ID\n        JOIN DBS d ON b.DB_ID = d.DB_ID\n        JOIN SDS c ON a.SD_ID = c.SD_ID\n        WHERE\n            b.TBL_NAME like '{table}' AND\n            d.NAME like '{schema}'\n        ORDER BY PART_NAME DESC\n        " . format ( ** locals ( ) ) #NEWLINE# h = MySqlHook ( METASTORE_MYSQL_CONN_ID ) #NEWLINE# df = h . get_pandas_df ( table ) #NEWLINE# return df . to_html ( classes = 'table table-striped table-bordered table-hover' , index = False , na_rep = '' )