moved hive sql to top-level ddl