Member since 
    
	
		
		
		08-30-2018
	
	
	
	
	
	
	
	
	
	
	
	
	
	
			
      
                5
            
            
                Posts
            
        
                0
            
            
                Kudos Received
            
        
                0
            
            
                Solutions
            
        
			
    
	
		
		
		02-04-2019
	
		
		03:45 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 Thanks @Naveen  Your suggestion worked. At first, I wasn't sure about how to create the hql file. I ended up just using vi to create it with the "show partitions" statements.  Also, in my environment, I don't need to provide the credentials. I'm not sure why. I just provided the jdbc string for the zk cluster like the following:  beeline --silent=true --showHeader=false --outputformat=csv2 -u "jdbc:hive2://zk1:zkport,zk2:zkport,zk3:zkport/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" -f show_partitions_tables.hql > show_partitions_tables.txt  Thanks for your help! 
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
			
    
	
		
		
		01-17-2019
	
		
		07:44 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 Thanks @Naveen  I needed to generate a file show all of the partitions for several tables. I ended up using the following with hive.   #!/home/user/  rm -f tables.txt  rm -f partitions.txt  echo "  dbname.tablename1  dbname.tablename2  dbname.tablename3  dbname.tablename4  " >> tables.txt   wait  cat tables.txt |while read LINE    do    echo  -e "$LINE\n" >> partitions.txt    hive -e "show partitions $LINE" >>partitions.txt    echo  -e "\n" >> partitions.txt    done  rm -f tables.txt  echo "Show Partitions generated"      It seemed like hive didn't like something cause it threw a couple of errors at the beginning and end. But, ended up generating the desired output.  I'd prefer to use beeline but couldn't figure out how to integrate the beeline -u connection with the looping through the list of tables.  Can anyone suggest a similar approach using beeline? 
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		