| Author | 
		  Message
		 | 
		
		  | Mohit Gupta | 
		  
		    
			  
				 Posted: Tue Feb 22, 2005 12:58 am    Post subject: Problem in mapping node from Database table as a source | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 16 Sep 2004 Posts: 34
  
  | 
		  
		    
			  
				Hi,
 
 
I am facing a problem in doing mapping from table as a source.
 
 
i want to map the columns of my table to a message output tree.
 
 
my message output tree is in the specified format below.
 
<DreamFileSet>
 
<DreamRowSet>
 
<DreamRow>
 
<a>
 
<b>
 
..
 
</DreamRow>
 
...
 
nth times DreamRow
 
</DreamRowSet>
 
</DreamFileSet>
 
 
where a and b are the columns in the table.
 
 
when i do a drag and drop from left hand side to DreamRowSet[1]/DreamRow[ALL].a editor comes up Specify Mapping instances and in that how do i specify the cardinality that should be equal to the no of rows in the table.
 
 
secondly, i want the column structure in the table as an xml representation. A row in the table is equal to the DreamRow tag with elements as a column names.
 
 
Please anybody can help me out.
 
 
Reards
 
Mohit | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mohit Gupta | 
		  
		    
			  
				 Posted: Wed Feb 23, 2005 9:20 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 16 Sep 2004 Posts: 34
  
  | 
		  
		    
			  
				Is there anybody who has done the same thing similar or is it not at all possible? Then how can we map between table as a source to the message output.
 
 
I have searched All the manuals but nothing mentioned about how to do mapping between table and message output.
 
 
Please reply .
 
 
Rgds,
 
Mohit | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JT | 
		  
		    
			  
				 Posted: Thu Feb 24, 2005 6:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Padawan
 
 Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT. 
  | 
		  
		    
			  
				Based on the information you provided, the following ESQL statement should produce the results you want:
 
 
   
	| Code: | 
   
  
	| SET OutputRoot.XML.DreamFileSet.DreamRowSet.DreamRow[] = PASSTHRU('SELECT a, b FROM Database.Table'); | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Feb 24, 2005 7:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				
   
	| JT wrote: | 
   
  
	
   
	| Code: | 
   
  
	| SET OutputRoot.XML.DreamFileSet.DreamRowSet.DreamRow[] = PASSTHRU('SELECT a, b FROM Database.Table'); | 
   
 
 | 
   
 
 
Why are you using PASSTHRU? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JT | 
		  
		    
			  
				 Posted: Thu Feb 24, 2005 7:54 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Padawan
 
 Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT. 
  | 
		  
		    
			  
				| Habit.........and a bad one at that. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |