Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I have actually two tables in a database for hive.
DB Name : test_db
table_a & table_b.
Once script is run , in sheet properties, we have only one table in Show Fields from table dropdown.
Table labels are getting updated in for loop and only table a is getting dropped
Below is the code
//Connect to hive
ODBC CONNECT TO hpc_hive;
a:
SQL use test_db;
SQL show tables;
LET vTablecount=NoOfRows('a');
For i=0 To $(vTablecount) -1
LET vTablename=Peek('tab_name',$(i),'a');
LET vMyTableNameQVD =Peek('tab_name',$(i),'a');
$(vTablename):
SQL desc $(vTablename);
Next i;
DROP Table a;
 
					
				
		
 rahulpawarb
		
			rahulpawarb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Ashwin,
As per my understanding tables are getting auto concatenated. To avoid this please use NoConcatenate statement before the table name of load statement.
//Connect to hive
ODBC CONNECT TO hpc_hive;
a:
SQL use test_db;
SQL show tables;
LET vTablecount=NoOfRows('a');
For i=0 To $(vTablecount) -1
LET vTablename=Peek('tab_name',$(i),'a');
LET vMyTableNameQVD =Peek('tab_name',$(i),'a');
NoConcatenate
$(vTablename):
SQL desc $(vTablename);
Next i;
DROP Table a;
Hope this will be helpful.
Regards!
Rahul
 
					
				
		
 rahulpawarb
		
			rahulpawarb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Ashwin,
Trust that you are doing well!
Have you verified the no. of rows hold by table a (before dropping table a; you can do it by commenting every statement after SQL show tables;).
Please correct me if I am wrong.
Regards!
Rahul
 
					
				
		
Hi
No.of rows is equal to 2 before dropping table a.
 
					
				
		
 rahulpawarb
		
			rahulpawarb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Ashwin,
As per my understanding tables are getting auto concatenated. To avoid this please use NoConcatenate statement before the table name of load statement.
//Connect to hive
ODBC CONNECT TO hpc_hive;
a:
SQL use test_db;
SQL show tables;
LET vTablecount=NoOfRows('a');
For i=0 To $(vTablecount) -1
LET vTablename=Peek('tab_name',$(i),'a');
LET vMyTableNameQVD =Peek('tab_name',$(i),'a');
NoConcatenate
$(vTablename):
SQL desc $(vTablename);
Next i;
DROP Table a;
Hope this will be helpful.
Regards!
Rahul
 
					
				
		
Thanks Rahul it is working fine now.
 
					
				
		
 rahulpawarb
		
			rahulpawarb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Cheers,
Rahul
 
					
				
		
Tables are shown separately in sheet properties but the column names are not filtering according to the table since the header name is same for both tables. Can you help me out in this.
 
					
				
		
 rahulpawarb
		
			rahulpawarb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Ashwin,
Could you please share the application with sample data? This will help me to understand the situation and provide you required inputs.
Regards!
Rahul
