Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Khouloudy
Contributor
Contributor

How to optimize job

Hello community ,

I have a talend job that communicates salesforce objects and generates an .xml file as output.

The .xml file contains several nodes. One of the nodes requires the recovery of the file from all the associated objects on the job (2 objects are concerned).

I used Contentdocumentlink to pass the id of object x and to retrieve the document title.

For more info , the two objects x and y are associated 'inner join) . the object x is associated with contentdocumentlink (left outer join/ reload at aech row).

The problem is that object x contains 700 records of object y and the job will do 700 transactions. 

Any help to optimize this job ?

Thank you 0695b00000fJyd5AAC.png

Labels (7)
4 Replies
Anonymous
Not applicable

Hello @khouloud yaakoubi​ ,

As a test, could you please try to setup the Lookup Model to "Load once" for contentdocumentlink  component with tXMLMap like

0695b00000fK5TCAA0.pngBest regards

Aiming

 

 

Khouloudy
Contributor
Contributor
Author

Hello ,

Thank you for your response , I change the lookup Model to load once but i have this error now :Exception in component tSalesforceInput_4 (XMLFile)

java.io.IOException: [UnexpectedErrorFault [ApiFault exceptionCode='UNKNOWN_EXCEPTION'

 exceptionMessage='invalid parameter value'

 extendedErrorDetails='{[0]}'

]

]

 

at org.talend.components.salesforce.runtime.SalesforceInputReader.start(SalesforceInputReader.java:118)

at org.talend.codegen.flowvariables.runtime.FlowVariablesReader.start(FlowVariablesReader.java:73)

at archivage.xmlfile_0_1.XMLFile.tSalesforceInput_4Process(XMLFile.java:9383)

at archivage.xmlfile_0_1.XMLFile.tSalesforceInput_1Process(XMLFile.java:4212)

at archivage.xmlfile_0_1.XMLFile.tSalesforceConnection_1Process(XMLFile.java:1114)

at archivage.xmlfile_0_1.XMLFile.tSetGlobalVar_1Process(XMLFile.java:877)

at archivage.xmlfile_0_1.XMLFile.tPrejob_1Process(XMLFile.java:743)

at archivage.xmlfile_0_1.XMLFile.runJobInTOS(XMLFile.java:9981)

at archivage.xmlfile_0_1.XMLFile.main(XMLFile.java:9735)

Caused by: [UnexpectedErrorFault [ApiFault exceptionCode='UNKNOWN_EXCEPTION'

 exceptionMessage='invalid parameter value'

 extendedErrorDetails='{[0]}'

]

]

 

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:677)

at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:560)

at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:250)

at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:224)

at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:163)

at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:108)

at com.sforce.soap.partner.PartnerConnection.query(PartnerConnection.java:1197)

at org.talend.components.salesforce.runtime.SalesforceInputReader.executeSalesforceQuery(SalesforceInputReader.java:163)

at org.talend.components.salesforce.runtime.SalesforceInputReader.start(SalesforceInputReader.java:105)

... 8 more

[statistics] disconnected

I try to get content document link from two object in the sceen shor below 'offer +PositionnementEMG" so i create to setglobal var to get id of offer and id of pos but not work .Usualy i get the contentdocumentlink of offer.

Any idea please?

0695b00000fK7uPAAS.pngQuery of contentDocumentLink :"SELECT Id,ContentDocumentId, LinkedEntityId ,

          ContentDocument.title ,

          ContentDocument.LatestPublishedVersion.FileExtension, 

          ContentDocument.LatestPublishedVersion.Title

           FROM ContentDocumentLink 

where (LinkedEntityId='"+(String)globalMap.get("OffreId")+"' or LinkedEntityId='"+(String)globalMap.get("PosId")+"')

and ContentDocument.LatestPublishedVersion.FileExtension!='zip'

"

Thank you

Anonymous
Not applicable

Hello @khouloud yaakoubi​,

To use the Lookup model 'Load once' in tXMLMap, please remove the globalMap variables​ in the query of contentDocumentLink  like:

"SELECT Id,ContentDocumentId, LinkedEntityId ,

          ContentDocument.title ,

          ContentDocument.LatestPublishedVersion.FileExtension, 

          ContentDocument.LatestPublishedVersion.Title

           FROM ContentDocumentLink 

where ContentDocument.LatestPublishedVersion.FileExtension!='zip'

"

Khouloudy
Contributor
Contributor
Author

Hello , but the contentdocumentLink query required to put value of linkedentityId or contentdocumentId.In my case i'd like to extract the title of files for two objects(offer, posionnement_EMG__c).Thats why i put tsetglobalvar to get the id of offer(tsetglobalvar1) and the ids of posionnement(tsetglobalvar2).

 

Other tracks ?

Thank you