This forum has been disabled. Please visit our new Help Desk at help.jitterbit.com

Table that references itself

Questions and answers for configuring and deploying your integrations.

Table that references itself

Postby sandeepnair85 on Sun Oct 29, 2006 6:09 am

Is it possible to write a recursion function or formula such that in the target xml it checks for a condition, if it satisfies populate the data there otherwise go under next level node and populate there

source db has a table named folder. it has a column named parent_folder_id. if this column value is null that means the current folder is at root level and if it has got a value then it means the current folder has a parent with particular parent_folder_id.

Now in target xml the structure is somewhat like this. A root folder has choice[one of] either it can have child folder, document, documentref or alias. Now i need to properly map like this

folder
|__folder1--> document2
|__document1

then the target xml should have one root folder with one child document (document1) and child folder (folder1) and this child folder should have child document (document2)
sandeepnair85 Bookmark and Share
Community Sr. Contributor
Community Sr. Contributor
 
Posts: 40
Joined: Fri Sep 29, 2006 12:56 am
Location: India

Postby Ilan on Sun Oct 29, 2006 11:41 am

Hi Sandeep, have your tried to use folder conditions? (right click on the folder and enbale condition). Ilan.
Ilan Bookmark and Share
Jitterbit Guru
Jitterbit Guru
 
Posts: 599
Joined: Fri Jan 06, 2006 4:24 pm
Location: Alameda, CA

Postby sandeepnair85 on Sun Oct 29, 2006 9:50 pm

No i dont know how to do that. How many level of recursion is allowed in jitterbit. i mean in the schema "folder is a complextype which includes folder and document. But the folder level goes to 2 level only"
sandeepnair85 Bookmark and Share
Community Sr. Contributor
Community Sr. Contributor
 
Posts: 40
Joined: Fri Sep 29, 2006 12:56 am
Location: India

Postby Ilan on Mon Oct 30, 2006 9:29 am

Sandeep, I have not looked at your XML schema, but if you are using an XML recursion structure there is a bug in 1.1 that is fixed in 1.2. In 1.2 you can open the tree to the level of recursion you wish to map to. We are trying to get 1.2 beta published today.

Thanks.
Ilan.
Ilan Bookmark and Share
Jitterbit Guru
Jitterbit Guru
 
Posts: 599
Joined: Fri Jan 06, 2006 4:24 pm
Location: Alameda, CA

Postby sandeepnair85 on Mon Oct 30, 2006 9:24 pm

i m just attaching the jitterpack and xsd. Will u plz check that is this type of recursion possible.
The transformation i m using is folderaclrecepienwt.

will u plz check it out and say whether this type of mapping is feasible. ie with the help of parent folder id the hierarchy is to be defined
sandeepnair85 Bookmark and Share
Community Sr. Contributor
Community Sr. Contributor
 
Posts: 40
Joined: Fri Sep 29, 2006 12:56 am
Location: India

Postby Ilan on Tue Oct 31, 2006 10:01 am

How many levels of recursion are in your source? Can that be defined?

If you have, for example 3 levels, you would need to use the folder table three times and join them using a 0 to 1 or 0 to N relationship. This way the parent folders do not need to have child folders, but you would pre-define the number of levels you would go down to. You would join a child folder by parent_folder_id to the parent folder folder_id.

Once you define that, then the mapping should be obvious.

If you're still not sure what to do please tell me when you want to do a gotomeeting. I could do one this evening (tomorrow morning your time).

Thanks.
Ilan.
Ilan Bookmark and Share
Jitterbit Guru
Jitterbit Guru
 
Posts: 599
Joined: Fri Jan 06, 2006 4:24 pm
Location: Alameda, CA

Postby sandeepnair85 on Tue Oct 31, 2006 9:39 pm

The recursion is n level. I cant assume the child folder level of a particular parent. actually it all depends on parent folder id in folder table. if for a particular folder the parent folder id is null that means it itself is the root. and if it has a parent_folderid then the it would be the child of that particular folder. so this really is a n level recursion.
And even if i try to join folder. due to so many joins the data doesnt get loaded

Is it possible that we can have gotomeeting this saturday at 8:00am IST
sandeepnair85 Bookmark and Share
Community Sr. Contributor
Community Sr. Contributor
 
Posts: 40
Joined: Fri Sep 29, 2006 12:56 am
Location: India

Postby Ilan on Wed Nov 01, 2006 8:55 am

Sandeep, I will skype you at 8am IST (6:30 pm PST) and we'll do a gotomeeting. Talk to your then. Ilan.
Ilan Bookmark and Share
Jitterbit Guru
Jitterbit Guru
 
Posts: 599
Joined: Fri Jan 06, 2006 4:24 pm
Location: Alameda, CA

Postby sandeepnair85 on Wed Nov 01, 2006 9:12 am

Ok Saturday at 8:00am IST
sandeepnair85 Bookmark and Share
Community Sr. Contributor
Community Sr. Contributor
 
Posts: 40
Joined: Fri Sep 29, 2006 12:56 am
Location: India

Postby Ilan on Wed Nov 01, 2006 9:52 am

That's fine. Then I'll ping you on Friday night 6:30pm. Thanks. Ilan.
Ilan Bookmark and Share
Jitterbit Guru
Jitterbit Guru
 
Posts: 599
Joined: Fri Jan 06, 2006 4:24 pm
Location: Alameda, CA

Postby sandeepnair85 on Fri Nov 03, 2006 8:02 am

hi ilan
just to remind u that we have got a gotomeeting scheduled tomorrow ie saturday morning at 8 IST.
See u then
sandeepnair85 Bookmark and Share
Community Sr. Contributor
Community Sr. Contributor
 
Posts: 40
Joined: Fri Sep 29, 2006 12:56 am
Location: India

Postby Ilan on Fri Nov 03, 2006 10:18 am

Talk soon.
Ilan Bookmark and Share
Jitterbit Guru
Jitterbit Guru
 
Posts: 599
Joined: Fri Jan 06, 2006 4:24 pm
Location: Alameda, CA


Return to Using Jitterbit


SourceForge.net Logo  open source integration