Web Images Videos Maps News Shopping Google Mail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Use prepared statement - problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Zbigniew Szmigiero  
View profile   Translate to Translated (View Original)
 More options 1 July, 20:46
Newsgroups: ibm.software.network.directory-integrator
From: Zbigniew Szmigiero <zszmigi...@gmail.com>
Date: Wed, 1 Jul 2009 12:46:34 -0700 (PDT)
Local: Wed 1 July 2009 20:46
Subject: Use prepared statement - problem
I would like to use own SQL statement in the lookup to restrict output
to part of record
SELECT emp_number, code FROM `hs_hr_emp_jobtitle_history` WHERE
end_date IS NULL;

The output contains 3 different records but Assembly Line returns
"Multiple Line Entries" error:

21:39:45,530 INFO  - [JDBCConnector_3] CTGDIS495I handleException ,
lookup, java.lang.Exception: [JDBCConnector_3] CTGDIS048E Multiple
entries found and no 'On Multiple Entries' Hook defined.
21:39:45,530 ERROR - [JDBCConnector_3] CTGDIS810E handleException -
cannot handle exception , lookup  java.lang.Exception:
[JDBCConnector_3] CTGDIS048E Multiple entries found and no 'On
Multiple Entries' Hook defined.
21:39:45,546 ERROR - CTGDIS266E Error in NextConnectorOperation.
Exception occurred: java.lang.Exception: [JDBCConnector_3] CTGDIS048E
Multiple entries found and no 'On Multiple Entries' Hook defined.
java.lang.Exception: [JDBCConnector_3] CTGDIS048E Multiple entries
found and no 'On Multiple Entries' Hook defined.
21:39:45,577 INFO  - [FileSystemConnector] CTGDIS525I Closing Parser
on output stream.

If I use prepared statement assembly line doesn't recognize
possibility to manage this hook

Any idea????


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kolev.kg  
View profile   Translate to Translated (View Original)
 More options 2 July, 09:38
Newsgroups: ibm.software.network.directory-integrator
From: "kolev.kg" <kolev...@gmail.com>
Date: Thu, 2 Jul 2009 01:38:16 -0700 (PDT)
Local: Thurs 2 July 2009 09:38
Subject: Re: Use prepared statement - problem
I assume you have put this statement in a lookup connector, correct?

If so then it is normal to get such an error if your link criteria is
not bound to a unique constraint, i.e. you are querying for something
that can be present in multiple records at the same time. In your case
you have 3 records which "end_date" field is NULL. When you get
multiple entries returned the AL gives you the opportunity to further
filter the records or to put them all in the resultant entry before
doing the input map. Since the AL does not know what exactly you might
want to be done you have been given the ability to specify your
intentions using a hook - "On Multiple Entries" to be precise. In that
hook you could cycle throughout all the entries that matched your
criteria using a script.

Best Regards,
Kaloyan Kolev.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eddie Hartman  
View profile   Translate to Translated (View Original)
 More options 2 July, 10:10
Newsgroups: ibm.software.network.directory-integrator
From: Eddie Hartman <eddiehart...@gmail.com>
Date: Thu, 2 Jul 2009 02:10:50 -0700 (PDT)
Local: Thurs 2 July 2009 10:10
Subject: Re: Use prepared statement - problem
Take a look at the FlowDiagrams, particularly the page on Lookup Mode:
http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm....
The left sidebar tells you how to code your On Multiple Found Hook.

A simpler solution is to use a Connector Loop with your Lookup
Connector attached. Then you get the following:

1. Components you drop under this loop are cycled through, once for
    each entry found by your Lookup Connector.

2. You get a Connector Parameters Map tab where you can map in
    the SQL you want to use. This makes it easy to use JavaScript
    or Expression mapping to compute this SQL string using values
    in Work Attributes or script variables.

    And if you are using a Loop and setting the SQL SELECT yourself, I
would
    use Iterator mode instead of Lookup. These two modes are almost
identical,
    apart from a couple of major differences:

       a1). Iterator mode leaves the result set on the server,
returning a single
              entry with its getNextEntry() call for each cycle.
       b1). Lookup mode fetches the result set in memory. To prevent
              memory problems, this is limited to max 10 entries &
configured in
              the AssemblyLine Settings tab -- called "Config" in TDI
6, and
              behind the AssemblyLine's "Options" button in TDI 7.
This can be
              set at the individual Connector level in TDI 7 through
the
             "More" button to the right of the Inherit From Parent
button.

       a2). Iterator mode uses Config parameters to perform its
search.
       b2). Lookup mode uses Link Criteria. The advantage here is that
the
              search is done during AL cycling, while Iterator mode
does this
              at initialization. However, since the Loop lets you map
in the
              Config parameters and set the Initialization option to
only Select,
              you get the same flexibility for Iterator mode.

3. You can step through this in the Debugger!!! (you knew I had to
    mention the Debugger as well :)

-Eddie

On Jul 2, 10:38 am, "kolev.kg" <kolev...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zbigniew Szmigiero  
View profile   Translate to Translated (View Original)
 More options 2 July, 12:01
Newsgroups: ibm.software.network.directory-integrator
From: Zbigniew Szmigiero <zszmigi...@gmail.com>
Date: Thu, 2 Jul 2009 04:01:17 -0700 (PDT)
Local: Thurs 2 July 2009 12:01
Subject: Re: Use prepared statement - problem
On 2 Lip, 10:38, "kolev.kg" <kolev...@gmail.com> wrote:

I am doing this query on the table with 3 records. Each of them is
unique.
How I described the prepared statement doesn't invoke "on multiple
entries" hook.
Why this same assembly line did discover necessity to use multiple
entries hook (with my SQL instruction) and the second time it didn't
it (use prepared statement)??
What does exactly TDI 7.0 do?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zbigniew Szmigiero  
View profile   Translate to Translated (View Original)
 More options 2 July, 12:20
Newsgroups: ibm.software.network.directory-integrator
From: Zbigniew Szmigiero <zszmigi...@gmail.com>
Date: Thu, 2 Jul 2009 04:20:45 -0700 (PDT)
Local: Thurs 2 July 2009 12:20
Subject: Re: Use prepared statement - problem
Hi,
The mentioned documentation says:
"A few Hooks are mandatory and must be enabled, although they do not
need to actually contain any script. If a mandatory Hook is not
enabled
and the flow reaches this point, then this is considered an error, and
control faults out to error handling."

Great but my table contains only three records!!!
If I use Prepared Statement the "on multiple entries" hook is not
invoked!!!!!

My SQL statement returns unique records also. I assume that prepared
statement is similar to SELECT * from <TABLE>
I added additional condition which narrows output "WHERE blabla IS
NULL"

It shows that Hook is managed different way when we use Prepared
Statement or not!!!
When can I find description???


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zbigniew Szmigiero  
View profile   Translate to Translated (View Original)
 More options 2 July, 12:40
Newsgroups: ibm.software.network.directory-integrator
From: Zbigniew Szmigiero <zszmigi...@gmail.com>
Date: Thu, 2 Jul 2009 04:40:03 -0700 (PDT)
Local: Thurs 2 July 2009 12:40
Subject: Re: Use prepared statement - problem
On 2 Lip, 10:38, "kolev.kg" <kolev...@gmail.com> wrote:

Hi,
Maybe my problem is related with my misunderstanding how the query in
the JDBC connector should be defined.

I assumed standard query: for example Select * from <table>.
Probably I should use the sql with parameter which refers to
particular input record from iteration connector.
Could you tell me how the syntax of sql statement looks like?

For example Select * from table where <filed>=$parameter
I can't find this information


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zbigniew Szmigiero  
View profile   Translate to Translated (View Original)
 More options 2 July, 12:52
Newsgroups: ibm.software.network.directory-integrator
From: Zbigniew Szmigiero <zszmigi...@gmail.com>
Date: Thu, 2 Jul 2009 04:52:46 -0700 (PDT)
Local: Thurs 2 July 2009 12:52
Subject: Re: Use prepared statement - problem
On 2 Lip, 13:40, Zbigniew Szmigiero <zszmigi...@gmail.com> wrote:

BTW
The filter is defined in the link criteria and I don't need put it in
the sql statement

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google