# Database lookup

**URL:** <https://forum.cloverdx.com/t/database-lookup/1075>\
**Category:** CloverDX Platform\
**Created:** [May 31, 2012, 12:00am UTC](https://forum.cloverdx.com/t/database-lookup/1075 "2012-05-31T00:00:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pro7](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pro7](https://forum.cloverdx.com/u/pro7)\
**Post date:** [May 31, 2012, 12:00am UTC](https://forum.cloverdx.com/t/database-lookup/1075/1 "2012-05-31T00:00:00Z")

</div>

Hello,  
We have a graph which includes a Reformat transformer. The Reformat is using a Database Lookup. I want to try some slightly different SQL  
for the lookup. Rather than mess up the existing lookup, I created a new Database Lookup. Same Metadata, same connection, slightly different SQL which I have tested outside of clover. Selecting the same column names to match the metadata. In the Reformat transformer, I have commented out the original line of code and added a line which is identical except that it calls the new Database Lookup. The graph fails with the following error:

Error occurred in nested transformation: ERROR caused by:  
Message: Transform failed! caused by: java.lang.IllegalStateException: Looking up has been never performed. Call seek method first

Any ideas about what the problem is??

Thanks  
pro7

---

<div class="post-metadata">

**Author:** ![pro7](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pro7](https://forum.cloverdx.com/u/pro7)\
**Post date:** [June 5, 2012, 12:53pm UTC](https://forum.cloverdx.com/t/database-lookup/1075/2 "2012-06-05T12:53:49Z")

</div>

Hi,  
I’ll also mention that my Clover ETL designer is acting funny when I try to work with these lookups.  
For example:  
- Open one of the lookups to review the query. Close  
- Open the other lookup, click the Edit button  
- The “Extracting” window pops up and just hangs. No matter how long I wait…it just hangs.  
If I run the graph, I get the error and then I can’t even edit the lookup. I double click it and nothing happens. I need to close Clover ETL designer completely. In one case I could not even close. I had to kill clover from the task manager. What is going on?

Thanks for any advice.  
pro7

---

<div class="post-metadata">

**Author:** ![vacekm](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vacekm](https://forum.cloverdx.com/u/vacekm)\
**Post date:** [June 5, 2012, 3:46pm UTC](https://forum.cloverdx.com/t/database-lookup/1075/3 "2012-06-05T15:46:59Z")

</div>

Hello Pro7,

please provide us with additional information.  
- What’s the version of your Clover Designer (is it a 3.0 like you were using before)?  
- Can you provide us both with your graph and the loookups?

We will look into both issues.

---

<div class="post-metadata">

**Author:** ![pro7](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pro7](https://forum.cloverdx.com/u/pro7)\
**Post date:** [June 6, 2012, 12:18pm UTC](https://forum.cloverdx.com/t/database-lookup/1075/4 "2012-06-06T12:18:54Z")

</div>

Marek,  
Thank you. Yes we are running 3.0.0. Is there some way I can send you the graph outside of the forum? This graph is one piece of a much bigger graph. It was created to isolate the sql we need to change.

Pro7

---

<div class="post-metadata">

**Author:** ![vacekm](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vacekm](https://forum.cloverdx.com/u/vacekm)\
**Post date:** [June 6, 2012, 12:39pm UTC](https://forum.cloverdx.com/t/database-lookup/1075/5 "2012-06-06T12:39:42Z")

</div>

Hello,

yes it is possible to send it to the [support@cloveretl.com](mailto:support@cloveretl.com)

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [July 3, 2012, 8:36am UTC](https://forum.cloverdx.com/t/database-lookup/1075/6 "2012-07-03T08:36:45Z")

</div>

attachment received BannerToADSynch2x1.grf

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [July 4, 2012, 1:51pm UTC](https://forum.cloverdx.com/t/database-lookup/1075/7 "2012-07-04T13:51:08Z")

</div>

Dear Pro7,

I tried to reproduce your problems, but not succeed. You mentioned that you are trying to use “slightly different SQL”. Can you send me original and altered SQLs?

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [July 9, 2012, 8:33am UTC](https://forum.cloverdx.com/t/database-lookup/1075/8 "2012-07-09T08:33:02Z")

</div>

Dear Pro7,

2 SQL queries you send are not really similar - the problematic one uses nested SQL. We are aware that older versions had issue with complex queries. However I am not able to reproduce your problem.

Workaround: What about replace “Database lookup table” by plain one initialized by you own?

---

<div class="post-metadata">

**Author:** ![pro7](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pro7](https://forum.cloverdx.com/u/pro7)\
**Post date:** [November 21, 2012, 3:53pm UTC](https://forum.cloverdx.com/t/database-lookup/1075/9 "2012-11-21T15:53:27Z")

</div>

I eventually got this working. It turns out that I had a dumb mistake in my code. I had changed the lookup .get call but neglected to change the .next call. So the .get was calling new lookup and .next was calling old lookup. Like I said…dumb. Anyway, thanks for your help, sorry for the trouble.
