Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

rlmagidson
2010-04-01 15:08:04

Alevy - Thank you... the expression box was hidden, even with the tMap UI in full screen. Entering my criteria there got me past that bump in the road.

- Russell

dexter_DSD
2010-03-29 21:17:54

Hi alevy,

thanks for your quick hint! Your suggestion sounds like a clever workaround, i will try that.

Meanwhile i helped myself with a sql query running in a tXXSQLRow component that triggers on success of a subjob. This is a clean solution but i would prefer the tMap approach to have graphical representation and to operate further on the data stream.

Thanks again
dexter

alevy
2010-03-29 00:34:44

dexter_DSD wrote:

how to have _all_ rows processed as a left join operation

Talend doesn't seem to properly deal with joins where none of the field values of the lookup table are directly specified.  I coincidentally raised a BugTracker (#0012344) last week about that very issue.

For now, I suggest you add a dummy field to your lookup table (you can do that using the SQL input statement) with a value that you can hard-code in the tMap.  That will make the "Inner Join" check-box available, which, if left blank, will make your tMap work correctly as a left-join.

alevy
2010-03-29 00:22:09

rlmagidson wrote:

I get errors that (following your example table name) say "row1 cannot be resolved" and "row2 cannot be resolved."

You need to use the names of your tables.  In my example, you can see those are row1 and row2.  In your example, they are F0902F0901Joined and StgF8305Flat.

As in my example, your expression needs to be in the expression box, activated by clicking the white arrow and green plus icon on the lookup table in tMap.  It's off-screen in your screen-print; you need to widen the left section of tMap to see it.

By having the expression against the R5OR01 field, you are saying that the value in that field must match your expression but your expression is a boolean result.

BTW, you should not need to use StringHandling.TRIM function if you check the Advanced Setting for your input components to trim the appropriate field(s).

dexter_DSD
2010-03-28 00:14:20

Hey guys,

i face quite the same issue.

I want to model a SQL left join in tMap like this:

SELECT a.FullString,
            b.MatchString
FROM a LEFT JOIN b
ON a.FullString LIKE b.MatchString

So i have to simulate the "like" operator in the inner join match condition? If i do that - would be "a.Fullstring.contains(b.MatchString)" - i get the same error as the thread-opener.

I tried a workaround by activating the output expression filter (see screenshot). This works as a replacement for an inner join, but how to have _all_ rows processed as a left join operation?

Thanks
dexter

rlmagidson
2010-03-26 20:36:29

Hi Alevy

Thank you for the reply. When I try that, I get errors that (following your example table name) say "row1 cannot be resolved" and "row2 cannot be resolved." I'm posting some screen shots to clarify. Also, since I'm doing text field comparison the join is a bit more complex.

Thanks for the help
- Russell

alevy
2010-03-26 01:08:18

See screenshot

rlmagidson
2010-03-25 17:09:35

Hello all

Here's my scenario:  I have one table that lists financial account ranges and descriptions (e.g. "Payroll" accounts range from 51110 to 51199, "Parts" accounts range from 61250 to 62250, etc.) and a second with account transactions (e.g. 1/5/2010 entry of $1,000 for account 51115, 2/1/2010 entry of $500 for account 62000, etc.). I need to assign the transactional data the appropriate payroll description. I'm basically building staging tables for operating statement analysis... someone else must have done this (or something similar).

How can I join based on ranges as opposed to discrete values? How do I specify this in the tMap editor?

Thanks in advance - I appreciate the help
- Russell

Board footer

Powered by FluxBB