Talend + FreeMarker - freemarker

Is there any way to use FreeMarker template to generate output in Talend OpenStudio (free version)? I want to read data from RDBMS and invoke FreeMarker Template to generate RDF data.
Thanks in advance for your help.

Talend Open Studio as well as the enterprise version do not have any Freemarker support. You can check Talend exchange to see if the community provides some custom component, which supports Freemarker templates or some other templating framework.
To solve your problem, you could either write your own Talend component (there are various tutorials that teach how to write a component - see links below) or you can add the Freemarker jar by using the tLibraryLoad component and write some Java code in within the job. For example: You could simply use a tJavaFlex component and receive some data flow. In the begin part of the tJavaFlex component, you initialize the Freemarker configuration and load the template from String or classpath. In the main part of the component, you collect the data of the incoming flow within a model, using custom logic. Finally In the end part of the tJavaFlex component, you process the template with the help of your model and write it into a file.
http://www.powerupbi.com/talend/componentCreation_1.html
https://help.talend.com/display/KB/How+to+create+a+custom+component

Related

Thymeleaf loading templates from database on fly

Iam new to thymeleaf and I am trying to send an email with a predefined template using spring mail and spring thymeleaf. I could able to send an email with a template in my templates folder, but i need to have a table which has different templates, and I need to read those template at runtime using template name, and utilize those template for sending email. I could not able to find a complete example which follows java based annotations in spring boot. can anyone share an example code with the explanation for the same?

Talend using elasticsearch with component tElasticsearchIndex

I'm new in Talend DI I'm developping a job in order to index data inside Elasticsearch using an inputfile
I'm using for this Talend data integration
I found a tutorial that explain an external component tElasticsearchIndex to index data
see this link
all steps are ok but I got an error java linked to two method from classes (Settings , TransportClient)
The method settingsBuilder() is undefined for the type Settings
The method builder() is undefined for the type TransportClient
error java code after adding component tElasticsearchIndex
design tElasticsearchIndex
I tried to import the two libraries (that I had aldready added in routines) with component tJava (Advanced Settings) I have always the same errors
If some one can help me please
I using talend 6.1.2
thank you

Configure a NiFi processor using an external file

I am using NiFi to chain several API calls. I would make my flow more configurable, by setting the API keys/endpoints in an external configuration file (for example JSON, or even the nifi.properties file).
How can I use the informations in this config file in the properties of my processors?
Thank you in advance!
Currently the easiest way to do this is by setting values in bootstrap.conf which are then available through NiFi expression language. For example, if you created a new java arg like:
java.arg.15=-DmyProperty=myValue
Then in your processor, your properties need to support expression language. This is done on the property descriptor builder:
.expressionLanguageSupported(true)
Then from the UI you would set the value of that property to ${myProperty}
In a future release there is going to be a new capability to make this a little easier where you can have an external properties file that will be loaded and accessible from expression language, so you won't have to edit bootstrap.conf, but for now this is the approach.

How to use Custom Component in Workflow?

I want to create a custom component to create some folders in the desired series. I've the java code the does this job and is running fine. But I'm not able to use the component after deploying. The problem I face is that the methods are not available for me to choose in the workflow.
If I deploy a simple component without any supporting jar file, it is working properly.
How to add component with supporting jars?
How to remove old components without re initializing the entire isolated region?
Thanks in advance.
Define component Queue in the process config console and add jar or JMS code.
In the workflow define component step and invoke tht operation in the workflow. IN PTM give the necessary jar files and start the PTm and component integrator.

Validate XML instance document against WSDL

I can easily validate a XML document against a XML Schema, eg. with XMLSpy or programmatically.
Is it possible to do this with a WSDL file? It does not seem possible with XMLSpy or any other XML tool I know. For me the only possibility right now is to do it programmatically, eg. by generating Java code from the WSDL and starting a request, which is then marshalled correctly.
If there is no tool / easy programmatic approach, is there a tool which can extract XML Schema from the WSDL?
Best
You could use SoapUI :
Create new project (you'll need to provide wsdl)
Double click on the "request" of your new project
Modify XML if needed
Right click -> validate
QTAssistant (I am associated with it) provides an easy to use utility to extract XSDs from any-style WSDL (single or multiple file, internalized or externalized XSDs).
The prompt is pretty straightforward to follow, and provides a lot of flexibility in referencing offline WSDLs (local disk) or remote (HTTP/S).
Another feature that works well with the above set is the ability to validate a SOAP envelope against an XSD, also available within QTAssistant; there's a property Strip SOAP for an XML document that'll automatically validate SOAP Body content against assign XSD.

Resources