private static String getComponentFunctionName(final Component component) { final String componentFunctionName = component.getFunction().getName(); if (METAMORPH_FUNCTION_SQLMAP.equals(componentFunctionName)) { return METAMORPH_FUNCTION_LOOKUP; } return componentFunctionName; }
final String funtionName = component.getFunction().getName();
final String functionName = component.getFunction().getName();
final String functionName = multipleInputComponent.getFunction().getName();
private static Function checkFunction(final Component component, final String uuid, final String name, final String description, final String... parameters) { final Function function = component.getFunction(); MatcherAssert.assertThat(function, Matchers.is(Matchers.notNullValue())); MatcherAssert.assertThat(function.getUuid(), Matchers.equalTo(uuid)); MatcherAssert.assertThat(function.getName(), Matchers.equalTo(name)); MatcherAssert.assertThat(function.getDescription(), Matchers.equalTo(description)); MatcherAssert.assertThat(function.getFunctionType(), Matchers.equalTo(FunctionType.Function)); MatcherAssert.assertThat(function.getParameters(), Matchers.hasItems(parameters)); return function; } }
final String functionName = component.getFunction().getName();
@Test public void testSqlMapSTask() throws Exception { final Task task = getTask("dd-1386.task.json"); final Job job = task.getJob(); final Set<Mapping> mappings = job.getMappings(); final Mapping mapping = mappings.iterator().next(); final Component mappingTransformationComponent = mapping.getTransformation(); final Transformation mappingTransformationComponentFunction = (Transformation) mappingTransformationComponent.getFunction(); final Set<Component> mappingTransformationComponentFunctionComponents = mappingTransformationComponentFunction.getComponents(); final Iterator<Component> iterator = mappingTransformationComponentFunctionComponents.iterator(); final String user = readManuallyFromTypeSafeConfig("dswarm.db.metadata.username"); final String pass = readManuallyFromTypeSafeConfig("dswarm.db.metadata.password"); final String db = readManuallyFromTypeSafeConfig("dswarm.db.metadata.schema"); while(iterator.hasNext()) { final Component component = iterator.next(); if("sqlmap".equals(component.getFunction().getName())) { final Map<String, String> sqlMapLookupParameterMappings = component.getParameterMappings(); setSqlMapParameterMappings(sqlMapLookupParameterMappings, user, pass, db); } } testXMLTaskWithTuples("dd-1386.task.result.json", "dd-1386.marcxml.tuples.json", task); }
function.setFunctionDescription(functionFunctionDescription); Assert.assertNotNull("the function name shouldn't be null", function.getName()); Assert.assertEquals("the function names are not equal", functionName, function.getName()); Assert.assertNotNull("the function description shouldn't be null", function.getDescription()); Assert.assertEquals("the function descriptions are not equal", functionDescription, function.getDescription());
inputAttributePath.toAttributePath(), mapping.getTransformation().getParameterMappings().get(transformation.getParameters().get(0))); Assert.assertNotNull("the transformation shouldn't be null", mapping.getTransformation().getFunction()); Assert.assertNotNull("the transformation name shouldn't be null", mapping.getTransformation().getFunction().getName()); Assert.assertEquals("the transformation names are not equal", transformationName, mapping.getTransformation().getFunction().getName()); Assert.assertNotNull("the transformation description shouldn't be null", mapping.getTransformation().getFunction().getDescription()); Assert.assertEquals("the transformation descriptions are not equal", transformationDescription, mapping.getTransformation().getFunction()
inputAttributePath.toAttributePath(), mapping.getTransformation().getParameterMappings().get(transformation.getParameters().get(0))); Assert.assertNotNull("the transformation shouldn't be null", mapping.getTransformation().getFunction()); Assert.assertNotNull("the transformation name shouldn't be null", mapping.getTransformation().getFunction().getName()); Assert.assertEquals("the transformation names are not equal", transformationName, mapping.getTransformation().getFunction().getName()); Assert.assertNotNull("the transformation description shouldn't be null", mapping.getTransformation().getFunction().getDescription()); Assert.assertEquals("the transformation descriptions are not equal", transformationDescription, mapping.getTransformation().getFunction()
inputAttributePath.toAttributePath(), mapping.getTransformation().getParameterMappings().get(transformation.getParameters().get(0))); Assert.assertNotNull("the transformation shouldn't be null", mapping.getTransformation().getFunction()); Assert.assertNotNull("the transformation name shouldn't be null", mapping.getTransformation().getFunction().getName()); Assert.assertEquals("the transformation names are not equal", transformationName, mapping.getTransformation().getFunction().getName()); Assert.assertNotNull("the transformation description shouldn't be null", mapping.getTransformation().getFunction().getDescription()); Assert.assertEquals("the transformation descriptions are not equal", transformationDescription, mapping.getTransformation().getFunction()
inputAttributePath.toAttributePath(), mapping.getTransformation().getParameterMappings().get(transformation.getParameters().get(0))); Assert.assertNotNull("the transformation shouldn't be null", mapping.getTransformation().getFunction()); Assert.assertNotNull("the transformation name shouldn't be null", mapping.getTransformation().getFunction().getName()); Assert.assertEquals("the transformation names are not equal", transformationName, mapping.getTransformation().getFunction().getName()); Assert.assertNotNull("the transformation description shouldn't be null", mapping.getTransformation().getFunction().getDescription()); Assert.assertEquals("the transformation descriptions are not equal", transformationDescription, mapping.getTransformation().getFunction()
Assert.assertNotNull("the transformation name shouldn't be null", mapping.getTransformation().getFunction().getName()); Assert.assertEquals("the transformation names are not equal", transformationName, mapping.getTransformation().getFunction().getName()); Assert.assertNotNull("the transformation description shouldn't be null", mapping.getTransformation().getFunction().getDescription()); Assert.assertEquals("the transformation descriptions are not equal", transformationDescription, mapping.getTransformation().getFunction()