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
Related
I have tried to make custom mapping between my DTO and Entity.
I have tried to use [AutoMapfrom(typeof)..] function to mapping.
I have tried to use ObjectMapper.Map function in my application layer for my service.
I'm Using Asp.Net boilerplate framework to create a wep api.
Even though I tried everything that I have written on the top, I still get Missing type map configuration or unsupported mapping. Error when I run my get method which is about my app. I will be glad if someone can help me.
I get this error message
Error starting application: Error creating query engine Drools. Exception: java.lang.NoSuchMethodError. Message: 'void org.semanticweb.owlapi.util.PriorityCollection.add(java.io.Serializable)'
I am using SWRL API for Java to run SQWRL queries on OWL ontologies. So, I built edu.stanford.swrl swrlapi-example from Maven updating in the pom file the default swrl API and swrlapi-drools-engine from versions 1.0.3 to 2.0.9 and the owl API from default 4.2.3 to 5.1.17. I am runnig this code in the executable main :
OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
File file = new File("C:\\Users\\Hugo\\Desktop\\Universidad\\SUPAERO\\S4\\SWRLapiTEST\\Prueba.owl");
OWLOntology ontology = ontologyManager.loadOntologyFromOntologyDocument(file);
ontologyManager.createOntology();
SQWRLQueryEngine queryEngine = SWRLAPIFactory.createSQWRLQueryEngine(ontology);
The program stops at the last command. I don't know what I am doing wrong. If I use the version 1.0.3 of swrl api and swrlapi-drools-engine it works, bu I wanted to use some commands incuded in the tbox and abox libraries that are not implemented in that ancient version.
The exception you're seeing is a symptom of multiple incompatible OWLAPI versions in your classpath. Make sure you only have one version in use (5.1.17 from what you say). If you cannot find the problem, please add details on how you're setting your classpath (you can print the java.class.path environment variable at the beginning of your code to get the exact classpath being used).
My current project has switched to GraphQL API's and I wish to automate the generation of model objects that match both Query/Mutations requests/responses.
All I require is the model classes, I do not want to use tools such as Apollo at runtime in my Application.
I require model classes to be either Java or Kotlin.
I found this https://www.graphql-java-kickstart.com/tools/schema-definition/
however this appears to require me to create the model classes my self...
based on this statement "GraphQL Java Tools will expect to be given three classes that map to the GraphQL types: Query, Book, and Author. The Data classes for Book and Author are simple:"
What am I missing?
When I attempt use Apollo-cli to download my schema I get this error
~ - $ npx apollo-cli download-schema $https://my.graphql.end.point/graphql --output schema.json
Error while fetching introspection query result: only absolute urls are supported
Surely this is an basic requirement when employing GraphQL
So if I understand you correctly what you are trying to do is to a) download and locally create the schema from an existing graphql endpoint and b) create java model objects from this schema.
To download the schema you can use the graphql-cli. First install via npm install -g graphql-cli and run graphql init to setup your .graphqlconfig. Finally run graphql get-schema to download the schema from the defined endpoint.
Next you want to leverage a Java code generator that takes the GraphQL schema and creates:
Interfaces for GraphQL queries, mutations and subscriptions
Interfaces for GraphQL unions
POJO classes for GraphQL types
Enum classes for each GraphQL enum
There are various options depending on your setup / preferences (e.g. gradle vs maven):
https://graphql-maven-plugin-project.graphql-java-generator.com/index.html
https://github.com/kobylynskyi/graphql-java-codegen-gradle-plugin
https://github.com/kobylynskyi/graphql-java-codegen-maven-plugin
I recommend you to check out the first option, since it looks very well documented and also provides full flexibility after generating the desired helpers:
graphql-java-generator generates the boilerplate code, and lets you
concentrate on what’s specific to your use case. Then, the running
code doesn’t depend on any dependencies from graphql-java-generator.
So you can get rid of graphql-java-generator at any time: just put the
generated code in your SCM, and that’s it.
When in client mode, you can query the server with just one line of
code.
For instance :
Human human = queryType.human("{id name appearsIn homePlanet
friends{name}}", "180");
In this mode, the plugin generates:
One java class for the Query object, One java class for the Mutation
object (if any), One POJO for each standard object of the GraphQL
object, All the necessary runtime is actually attached as source code
into your project: the generated code is stand-alone. So, your
project, when it runs, doesn’t depend on any external dependency from
graphql-java-generator.
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
I wrote several plugin for previous CRM versions, most of them using Early Bound entities.
Right now I am writing a plugin for version 2015 with just one custom entity; the plugin contains the generated entity definition (early-bound entity class).
As soon as I attempt to retrieve an entity using the Organization Service in the Plugin Pipeline I get the following exception:
Element 'http://schemas.microsoft.com/xrm/2011/Contracts:Entity' contains data from a type that maps to the name 'http://schemas.microsoft.com/xrm/2011/Contracts:new_TestEntity'. The deserializer has no knowledge of any type that maps to this name. Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'new_TestEntity' and namespace 'http://schemas.microsoft.com/xrm/2011/Contracts'.
Plugin has a ProxyTypesAssembly attribute.
I am attempting to intercept the RetrieveMultiple and Retrieve messages. It's all working. It faults as soon as I attempt to execute a Retrieve within the plugin execution context (using the pipeline's org service).
Looks like you have changed your entity model without regenerating the early bound classes. Try regenerating your early bound entities.
Looks like the same issue as described in CRM 2015 SDK : The deserializer has no knowledge of any type that maps to this name