Unresolved Compilation Problems - no other information

One Star

Unresolved Compilation Problems - no other information

I'm trying to build a tMap component that maps 4 incoming values: accountID (String), deviceID (String), timestamp (Long), and statusCode (int) into a single output value, pk (String), as follows:
pk = accountID_deviceID_dateString_statusCode
where accountID and deviceID have been padded with spaces to 32 characters, and dateString converts timestamp from a long to a date string of the form YYYY-MM-DD HH:MMSmiley FrustratedS
To do this, I'm using the following expression:
row1.accountID+StringHandling.SPACE(32 -StringHandling.LEN(StringHandling.TRIM(row1.accountID)))
+ "_" +
row1.deviceID+StringHandling.SPACE(32 -StringHandling.LEN(StringHandling.TRIM(row1.deviceID)))
+ "_" +
TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",TalendDate.parseTimestamp(row1.timestamp))
+ "_" +
DataOperation.DTX((int)row1.statusCode)
Where TalendDate.parseTimestamp is a method I added to TalendDate:
public static Timestamp parseTimestamp(long arg) {
Timestamp timestamp = new java.sql.Timestamp(new Long(arg)*1000);
return timestamp;
}
The thing is, every line in the above expression works when run independently. However, when I put it together as above, I get an "unresolved compilation error" with no additional information (no java error indicated)
Any suggestions?
Thanks,
Steve
Community Manager

Re: Unresolved Compilation Problems - no other information

Hi Steve
If you got a compilation error, open the Code tab and then you will see which line has the error and the prompt error message.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Unresolved Compilation Problems - no other information

Hi Shong,
Thanks for the quick response. I'm not seeing any hard errors in the code tab - see attached screenshot. Just some generic type and static method warnings. I have also atttached shots of the tMap_1 screen and the expression builder screen. The latter shows the compilation error that results after hitting the "Test!" button.
Thanks
Steve
One Star

Re: Unresolved Compilation Problems - no other information

Sorry, here's the expressionbuilder and tMap screenshots
One Star

Re: Unresolved Compilation Problems - no other information

It's probably not a real error. I get this lots of times when testing expressions. It's probably a bug in expression builder. So long as the job runs ignore it.
One Star

Re: Unresolved Compilation Problems - no other information

Thanks janhess, turns out you're right. Despite the "unresolved compilation problems" error using "Test!," the code runs fine when executed. Now I know to just ignore that error unless there are actual errors indicated in the code.
Steve

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