use of com.bakdata.conquery.models.dictionary.DictionaryMapping in project conquery by bakdata.
the class ImportJob method importPrimaryDictionary.
private DictionaryMapping importPrimaryDictionary(Dictionary primaryDictionary) {
Dictionary orig = namespace.getStorage().getPrimaryDictionaryRaw();
Dictionary primaryDict = Dictionary.copyUncompressed(orig);
DictionaryMapping primaryMapping = DictionaryMapping.createAndImport(primaryDictionary, primaryDict);
log.debug("Mapped {} new ids", primaryMapping.getNumberOfNewIds());
// if no new ids we shouldn't recompress and store
if (primaryMapping.getNumberOfNewIds() == 0) {
log.trace("No new ids");
return primaryMapping;
}
namespace.getStorage().updatePrimaryDictionary(primaryDict);
return primaryMapping;
}
Aggregations