private Dataset getDatasetHelper(int accountId, int containerId, String accountName, String containerName,
      String datasetName, boolean needWritable) throws SQLException, AccountServiceException {
    PreparedStatement getDatasetStatement = dataAccessor.getPreparedStatement(getDatasetByNameSql, needWritable);
    return executeGetDatasetStatement(getDatasetStatement, accountId, containerId, accountName, containerName,
        datasetName);
  }
Helper function to get the dataset.
@param accountId the id for the parent account.
@param containerId the id of the container.
@param accountName the name for the parent account.
@param containerName the name for the container.
@param datasetName the name of the dataset.
@param needWritable if we need writable for connection.
@return the {@link Dataset}
@throws SQLException
@throws AccountServiceException
ambry-account/src/main/java/com/github/ambry/account/mysql/DatasetDao.java