record.setSchemaType(rec.getFormat());
<BUG>record.setFields(rec.getFieldSchema().toString());
record.setSource("API");</BUG>
Urn urnType = new Urn(urn);
record.setDatasetType(urnType.datasetType);
String[] urnPaths = urnType.abstractObjectName.split("/");
record.setName(urnPaths[urnPaths.length - 1]);
DICT_DATASET_WRITER.append(record);
DICT_DATASET_WRITER.close();
<BUG>datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString());
}</BUG>
else {

datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString());
rec.setDatasetId(datasetId);
}
else {
