Skip to content

Commit

Permalink
MetaInject step not correctly imported from Kettle #4384
Browse files Browse the repository at this point in the history
  • Loading branch information
nadment committed Oct 2, 2024
1 parent 7b11147 commit 31959cf
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ private enum EntryType {
DUMMY,
FORMULA,
GOOGLE_SHEETS_INPUT,
METAINJECT,
SIMPLE_MAPPING,
OTHER
};
Expand Down Expand Up @@ -589,6 +590,10 @@ private void processNode(Document doc, Node node, EntryType entryType, int depth
&& childNode.getChildNodes().item(0).getNodeValue().equals("Mapping")) {
entryType = EntryType.SIMPLE_MAPPING;
}
if (childNode.getNodeName().equals("type")
&& childNode.getChildNodes().item(0).getNodeValue().equals("MetaInject")) {
entryType = EntryType.METAINJECT;
}
}
}
}
Expand Down Expand Up @@ -698,7 +703,8 @@ else if (entryType == EntryType.TRANS)
}
}

if (entryType == EntryType.SIMPLE_MAPPING && currentNode.getNodeName().equals("transform")) {
if ((entryType == EntryType.SIMPLE_MAPPING || entryType == EntryType.METAINJECT)
&& currentNode.getNodeName().equals("transform")) {

Node filenameNode = null;
String transName = "";
Expand All @@ -718,10 +724,11 @@ else if (entryType == EntryType.TRANS)
}
}

// if we have a trans name and directory path, use it to update the mapping pipeline
// if we have a trans name and directory path, use it to update the mapping or injectable
// pipeline
// filename.
if (!StringUtils.isEmpty(transName) && !StringUtils.isEmpty(directoryPath)) {
filenameNode.setTextContent("${PROJECT_HOME}" + directoryPath + "/" + transName + ".hpl");
filenameNode.setTextContent("${PROJECT_HOME}" + directoryPath + '/' + transName + ".hpl");
}

// add the default pipeline run configuration.
Expand Down

0 comments on commit 31959cf

Please sign in to comment.