Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[resolved] Hardcoded temp directory in code

Highlighted
One Star

[resolved] Hardcoded temp directory in code

Hi there,
I just tried running my Talend job on a different computer and that failed due to a hardcoded path in the code.
I can't figure out where that's coming from. It would suggest that a tMap is using some temp file, but all "Store on disk" fields in the tMaps are blank.
Here's the offending code:
org.talend.designer.components.lookup.persistent.PersistentRowSorterIterator<SortableRow_committee_fields> fsi_committee_fields = new org.talend.designer.components.lookup.persistent.PersistentRowSorterIterator<SortableRow_committee_fields>(
"/home/stan/Desktop/workspace/temp" + "/" + jobName
+ "_tMapData_" + pid + "_committee_fields",
2000000) {
public SortableRow_committee_fields createRowInstance() {
return new SortableRow_committee_fields();
}
};

Anyone know where this pesky code is coming from?

Accepted Solutions
Highlighted
One Star

Re: [resolved] Hardcoded temp directory in code

You can.

Indeed. I now realized it will use the temp data path in the Basic Settings of the component (if set).
Thanks for the clarification...

View solution in original post


All Replies
Highlighted
Community Manager

Re: [resolved] Hardcoded temp directory in code

Hi
What is the error message? File does not found? Are you able to open the job in studio, if so, go to the code tab and search the related code.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Highlighted
One Star

Re: [resolved] Hardcoded temp directory in code

It was the "Store temp data" setting in the tMap join. I can't remember why I had this switched on - I hope it doesn't break something else.
It seems to me that this feature should let you specify the temp data's location instead of potentially breaking your job when placed on a different machine.
Just for reference, the error on the remote server was:
Exception in component tAdvancedHash_ids_in
java.lang.RuntimeException: The following directory can't be created : '/home/stan/Desktop/workspace/temp'
Highlighted
One Star

Re: [resolved] Hardcoded temp directory in code

You can.
Highlighted
One Star

Re: [resolved] Hardcoded temp directory in code

You can.

Indeed. I now realized it will use the temp data path in the Basic Settings of the component (if set).
Thanks for the clarification...

View solution in original post

2019 GARTNER 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

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog