See: Description
| Class | Description |
|---|---|
| CSVExportTemplateSpec |
Template specification for CSV export.
|
| CSVImportTemplateSpec |
Template specification for CSV import.
|
| EBXTransferTemplateSpec |
Template specification for transfer data from a EBX table to another EBX table.
|
| ExcelExportTemplateSpec |
Template specification for Excel export.
|
| ExcelImportTemplateSpec |
Template specification for Excel import.
|
| ImportExportTemplateSpec<ST extends SourceTable<?,?>,TT extends TargetTable<?,?>> |
Allows you to overwrite the dataset configured in an import or export template.
|
| SQLExportTemplateSpec |
Template specification for SQL export.
|
| SQLImportTemplateSpec |
Template specification for SQL import.
|
| TemplateConfig<ST extends SourceTable<?,?>,TT extends TargetTable<?,?>> |
Configures a user template.
|
| TemplateSpec<ST extends SourceTable<?,?>,TT extends TargetTable<?,?>> |
Abstract specification for a user template.
|
Create an instance of CSVExportTemplateSpec:
CSVExportTemplateSpec templateSpec = new CSVExportTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
outputFile,
session);
Create an instance of CSVImportTemplateSpec:
CSVImportTemplateSpec templateSpec = new CSVImportTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
inputFile,
session);
Create an instance of ExcelExportTemplateSpec:
ExcelExportTemplateSpec templateSpec = new ExcelExportTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
outputFile,
session);
Create an instance of ExcelImportTemplateSpec:
ExcelImportTemplateSpec templateSpec = new ExcelImportTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
inputFile,
session);
Create an instance of SQLExportTemplateSpec:
SQLExportTemplateSpec templateSpec = new SQLExportTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
session);
Create an instance of SQLImportTemplateSpec:
SQLImportTemplateSpec templateSpec = new SQLImportTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
session);
Create an instance of EBXTransferTemplateSpec:
EBXTransferTemplateSpec templateSpec = new EBXTransferTemplateSpec(
"7c67ed6a-3106-47b0-9bf8-0440e6238657", // this's template UUID, you can get from admin page.
session);
In case of data import or data export, it's possible to overwrite the source or the target EBX dataset configured in the template with another, which has the same data model:
templateSpec.setDataset(aDatasetWithSameDataModel);
In case of data transfer, it's possible to overwrite the source dataset or the target datasets configured in the template:
templateSpec.setSourceDataset(aDataset);
templateSpec.addTargetDatasets(datasets);
Create an instance of CSVImportTemplateSpec:
CSVImportTemplateSpec templateSpec = new CSVImportTemplateSpec(
TemplateConfig.forTable("aUniqueTemplateName", anAdaptationTable) // a template name is unique for each data model
inputFile,
session);
Create an instance of CSVImportTemplateSpec:
CSVImportTemplateSpec templateSpec = new CSVImportTemplateSpec(
TemplateConfig.forTable("aUniqueTemplateName", anAdaptationTable) // a template name is unique for each data model
inputFile,
session);
templateSpec.setInvalidDataFolder(aFolder, "fileNamePrefix_", "_fileNameSuffix.csv");
Create an instance of CSVImportTemplateSpec:
CSVImportTemplateSpec templateSpec = new CSVImportTemplateSpec(
TemplateConfig.forTable("aUniqueTemplateName", anAdaptationTable) // a template name is unique for each data model
inputFile,
session);
templateSpec.configureProcedure(context -> context.setTriggerActivation(false));
Create an instance of CSVImportTemplateSpec:
CSVImportTemplateSpec templateSpec = new CSVImportTemplateSpec(
TemplateConfig.forTable("aUniqueTemplateName", anAdaptationTable) // a template name is unique for each data model
inputFile,
session);
TemplateConfig<CSVSourceTable, EBXTargetTable> templateConfig = templateSpec.getTemplateConfig();
// modify the first table mapping
templateConfig.modifyTableMapping(TableMappingSelector.atIndex(0), context -> {
MappingStepSelector<TransformationMappingStep> crossRefStepSelector = MappingStepSelectorBuilder
.fromField(step -> {
CSVTable table = context.getSourceTable().getTable();
return table.get("Id").getPath().equals(step.getField().getPath());
})
.nextTransformation(step -> {
return CrossReference.getInstance()
.getCodeForTemplate()
.equals(step.getTransformationDefinition().getCode());
})
.select()
.throwErrorIfNotFound("Could not find the cross reference transformation step mapped from the Id source field.");
context.modifyStep(crossRefStepSelector, step -> {
step.param(CrossReference.DATASPACE, "anotherDataspace");
step.param(CrossReference.DATASET, "anotherDataset");
});
});
DataIntegrationExecutionResults results = DataIntegrationExecutor.getInstance().execute(templateSpec);