Putting tSalesforceInput out put data row by row into multiple excelfiles

Six Stars

Putting tSalesforceInput out put data row by row into multiple excelfiles

Hi,

 

I want to put each row which i got from tsalesforceInput after querying .. into a separate excel sheet..

Please suggest how to achieve this...PFA..


Accepted Solutions
Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

As soon as an input field is you cannot use the corresponding globalMap.get.
Try with globalMap.getOrDefault instead.

TRF

View solution in original post


All Replies
Forteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

@Lavankumar,i suggest you to use tMap between tsaleforceinput and tFileOutputExcle and generate the filenames in tMap using as a filed and then in the tFileOutputExcel using output stream option from the basic settings and specify the filed name based on that filed files will be generated.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

As the whole data flow arriving into the tFileOutputExcel component will go to the same sheet, you need to use both tFlowToIterate and tIterateToFlow components between tSalesforceInput and tFileOutputExcel.

This suppose that the sheetname can be directly derived from the schema fields.

Else you will need a tMap or tJavaXxxx component to construct the desired sheetname. 


TRF
Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

Hi,

I have tried that way..but getting below error.

 

 

Error :

Error in the component's properties:Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to Date
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String

 

 

Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

I have tried that way but getting below error....PFA

 

Error in the component's properties:Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to Date
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to String
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to boolean
Type mismatch: cannot convert from Object to String

Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

Can you explain ..how to do that...since i am new to talend..

Highlighted
Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

Can you expain how to do this
Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

Here is how ot should look like:

Capture.PNG

1rst tFixedFlowInput replace tSalesforceInput component for the example. The associated schema is composed of 2 fields (name and sheetname).

tFlowToIterate generates a global variable for every incoming field and mark the beginning of an iteration for every row. The configuration of this component is the default one.

2nd tFixedFlowInput generates a flow based on the global variable "row113.name" genrated by the tFlowToIterate component.

Here is how it is configured:

Capture.PNG

The field "name" is populated by the global variable "row113.name".

tFileOutputExcel generates the desired Excel file using the global variable "row113.sheetname" as the target sheetname:

 

Capture.PNG

Be carefull with the ticked options.

That's all.


TRF
Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

@Lavankumar, did this help?

If so, thank's to mark your case as solved (Kudos also acceptedas a bonus).


TRF
Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

i have tried as u said..but still getting below error....PFA

 

Error in the component's propertiesSmiley Surprisedrg.talend.components cannot be resolved to a type
org.talend.components cannot be resolved to a type
org.talend.components cannot be resolved to a type
org.talend.components cannot be resolved to a type
org.talend.components.salesforce.tsalesforceinput.TSalesforceInputProperties cannot be resolved to a type
org.talend.components.salesforce.SalesforceConnectionProperties cannot be resolved to a variable
org.talend.components.salesforce.SalesforceConnectionProperties cannot be resolved to a variable
org.apache.avro cannot be resolved to a type
org.talend.components.api.properties cannot be resolved to a variable
org.talend.daikon cannot be resolved to a type
org.talend.daikon cannot be resolved to a type
org.talend.components.api.properties cannot be resolved to a variable
org.talend.daikon cannot be resolved to a type
org.talend.daikon cannot be resolved to a type
org.talend.components cannot be resolved to a type
org.talend.components cannot be resolved to a type
org.talend.components cannot be resolved to a type
org.talend.components.api.component.ConnectorTopology cannot be resolved to a type
org.talend.daikon cannot be resolved to a type

Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

i have tried that way but getting error. PFA.

Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

There is a lot of screen captures but not the most interesting one.

Share the tSalesforceInput settings and advanced settings.


TRF
Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

PFA...

Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

As your captures are not complete, double-check that the fields in your query correspond exactly with the fields of the schema


TRF
Six Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

Hi,

 

As you said i have tried using iterator and fixedflow...

 

 

Exception in component tFixedFlowInput_1 (ExtractApexClasses)
java.lang.NullPointerException
at local_project.extractapexclasses_0_1.ExtractApexClasses.tSalesforceInput_1Process(ExtractApexClasses.java:3326)
at local_project.extractapexclasses_0_1.ExtractApexClasses.runJobInTOS(ExtractApexClasses.java:4147)
at local_project.extractapexclasses_0_1.ExtractApexClasses.main(ExtractApexClasses.java:3996)
[statistics] disconnected

Job ExtractApexClasses ended at 11:49 19/09/2018. [exit code=1]

Sixteen Stars TRF
Sixteen Stars

Re: Putting tSalesforceInput out put data row by row into multiple excelfiles

As soon as an input field is you cannot use the corresponding globalMap.get.
Try with globalMap.getOrDefault instead.

TRF

View solution in original post

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog