Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

t_map java.lang.ArrayIndexOutOfBoundsException

Hi 

I 'm using three t_map to lookup  from three different  postgres tables and than insert into one postgres table .

But I'm getting the error below :

 

Exception in component tMap_3 (Load_DimSong)
java.lang.ArrayIndexOutOfBoundsException: 1
at decisionalproject.load_dimsong_0_1.Load_DimSong.tDBInput_3Process(Load_DimSong.java:3293)
at decisionalproject.load_dimsong_0_1.Load_DimSong.runJobInTOS(Load_DimSong.java:6365)
at decisionalproject.load_dimsong_0_1.Load_DimSong.main(Load_DimSong.java:6214) .

 

DB Version : v9.X

 

This is  my job Load_DimSong.

0683p000009M1Oh.png

 

 

Thank you .

 

 

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Is lookup_release_dates_album.date_release allways populated?

I suggest you to transform the expression like this in case of:

 

lookup_release_dates_album.date_release != null ? lookup_release_dates_album.date_release.split("-")[1] : null

You may also refer to this link for a technic to avoid multiple calls to the String.split() method

https://community.talend.com/t5/Design-and-Development/extract-fullname-to-firstname-and-middlename-...

 

 

View solution in original post

8 Replies
TRF
Champion II
Champion II

So, what in tMap_3 ?

Anonymous
Not applicable
Author

this is what in tmap3 :

0683p000009M1QT.png

TRF
Champion II
Champion II

The expressions for local variables are not visible.

Do we have to guess them?

Anonymous
Not applicable
Author

I'm sorry .

my date_release is in this format yyyy-mm-jj
and I want to extract month , year and month+year from this date .
here are my expressions  :
lookup_release_dates_album.date_release.split("-")[0] for  variable dateYear
lookup_release_dates_album.date_release.split("-")[1] for variable dateMonth
lookup_release_dates_album.date_release.split("-")[0] +lookup_release_dates_album.date_release.split("-")[1] for variable datemonthYear.

TRF
Champion II
Champion II

Is lookup_release_dates_album.date_release allways populated?

I suggest you to transform the expression like this in case of:

 

lookup_release_dates_album.date_release != null ? lookup_release_dates_album.date_release.split("-")[1] : null

You may also refer to this link for a technic to avoid multiple calls to the String.split() method

https://community.talend.com/t5/Design-and-Development/extract-fullname-to-firstname-and-middlename-...

 

 

TRF
Champion II
Champion II

Is lookup_release_dates_album.date_release allways populated?

I suggest you to transform the expression like this in case of:

 

lookup_release_dates_album.date_release != null ? lookup_release_dates_album.date_release.split("-")[1] : null

You may also refer to this link for a technic to avoid multiple calls to the String.split() method

https://community.talend.com/t5/Design-and-Development/extract-fullname-to-firstname-and-middlename-...

 

Anonymous
Not applicable
Author

Thank you so much ! 

I also added a condition song.date_release.length()>4 when I want to extract the month  because sometimes the date comes with this format YYYY so my condition becomes :

(song.date_release!=null &&
song.date_release.length()>4 )?
song.date_release.split("-")[1]:null

Thank you again ! you helped me a lot .

I 'll try to change my splitted strings in the same way in  the link u provided me with .

TRF
Champion II
Champion II

Thank's to mark your cas as solved.