use of io.atlasmap.csv.core.CsvFieldWriter in project atlasmap by atlasmap.
the class CsvModule method writeTargetValue.
@Override
public void writeTargetValue(AtlasInternalSession session) throws AtlasException {
CsvFieldWriter writer = session.getFieldWriter(getDocId(), CsvFieldWriter.class);
writer.write(session);
}
use of io.atlasmap.csv.core.CsvFieldWriter in project atlasmap by atlasmap.
the class CsvModule method processPostTargetExecution.
@Override
public void processPostTargetExecution(AtlasInternalSession session) throws AtlasException {
CsvFieldWriter writer = session.getFieldWriter(getDocId(), CsvFieldWriter.class);
if (writer != null && writer.getDocument() != null) {
String targetDocumentString = writer.toCsv();
session.setTargetDocument(getDocId(), targetDocumentString);
} else {
AtlasUtil.addAudit(session, getDocId(), String.format("No target document created for DataSource:[id=%s, uri=%s]", getDocId(), this.getUri()), AuditStatus.WARN, null);
}
session.removeFieldWriter(getDocId());
if (LOG.isDebugEnabled()) {
LOG.debug("{}: processPostTargetExecution completed", getDocId());
}
}
use of io.atlasmap.csv.core.CsvFieldWriter in project atlasmap by atlasmap.
the class CsvModule method processPreTargetExecution.
@Override
public void processPreTargetExecution(AtlasInternalSession session) throws AtlasException {
CsvConfig csvConfig = CsvConfig.newConfig(getUriParameters());
CsvFieldWriter writer = new CsvFieldWriter(csvConfig);
session.setFieldWriter(getDocId(), writer);
if (LOG.isDebugEnabled()) {
LOG.debug("{}: processPreTargetExcution completed", getDocId());
}
}
Aggregations