public boolean unloadDataset(String table, CliDriver cliDriver) throws Exception {
    try {
      CommandProcessorResponse result = cliDriver.processLine("drop table " + table);
      LOG.info("Result from cliDrriver.processLine in initFromDatasets=" + result);
    } catch (CommandProcessorException e) {
      Assert.fail("Failed during initFromDatasets processLine with code=" + e);
    }

    return true;
  }
Datasets are provided by this handler.

An invocation of:

<pre>
--! qt:dataset:sample
--! qt:dataset:sample:ONLY
</pre>

will make sure that the dataset named sample is loaded prior to executing the test.
itests/util/src/main/java/org/apache/hadoop/hive/ql/dataset/QTestDatasetHandler.java