Unresolved Compilation Problems with Left and Right String Handling

One Star

Unresolved Compilation Problems with Left and Right String Handling

Hi,
I am trying to use the LEFT and RIGHT String Handling methods within the tMap component to do some very simple string manipulation but the expression builder always throws a red flag when I actually try to test the expression.
When I try testing this expression with 20120403 as a value:
StringHandling.LEFT(row1.TransactionDate,4)
I get an error message saying:
Exception in thread "main" java.lang.Error: Unresolved compilation problems: '
All I'm doing is passing a variable into the expression and trying to get the left 4 characters. Why is it have errors? How can I get this to work?
Thanks
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Hi
Could you show us the screenshot of tMap?
Or click 'Code' tag in Job Design area. Show us the line with red underline.
Regards,
Pedro
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Tests inn expression builder often come back with an error. Click on the code tab to see if there is a real error. If not the job should run ok.
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

With out screen Shot i am feeling like you are declaring the value as a date and not as a string....check the data type in the tmap and confirm...if it is date then change to string

Thanks,
Debashis
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Hi,
TransactionDate field data type is Date or string.
Thanks,
kumar
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Hi
see for any date the data type will be date only but if you want to do string handling to that one you need to treat that one as a string right...when you do a string handling with a date field it will show you unresolved compilation error...

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch