title: Not able to fetch all data from hive table using HiveTemplate
body: <p>I have refer below link to create a sample program for spring with hive.</p>
  
  <p><a href="https://github.com/spring-projects/spring-hadoop-samples/blob/master/hive/src/main/java/org/springframework/samples/hadoop/hive/HiveApp.java" rel="nofollow noreferrer">https://github.com/spring-projects/spring-hadoop-samples/blob/master/hive/src/main/java/org/springframework/samples/hadoop/hive/HiveApp.java</a></p>
  
  <p>In this HiveApp class i have added some code to print the data of passwords table.</p>
  
  <pre><code>System.out.println(template.query("select * from default.passwords"));
  </code></pre>
  
  <p>Output :: </p>
  
  <pre><code>[root, bin, daemon, adm, lp, sync, shutdown, halt, mail, uucp, operator, games, gopher, ftp, nobody, vcsa, rpc, saslauth, postfix, rpcuser, nfsnobody, sshd, vagrant, vboxadd, dbus]
  </code></pre>
  
  <p>It is printing only the first column data.But when i use the same query from Hive console i got the all data.</p>
  
  <pre><code>hive&gt; select * from passwords;
  OK
  root    x   0   0   root    /root   /bin/bash
  bin x   1   1   bin /bin    /sbin/nologin
  daemon  x   2   2   daemon  /sbin   /sbin/nologin
  adm x   3   4   adm /var/adm    /sbin/nologin
  lp  x   4   7   lp  /var/spool/lpd  /sbin/nologin
  sync    x   5   0   sync    /sbin   /bin/sync
  shutdown    x   6   0   shutdown    /sbin   /sbin/shutdown
  halt    x   7   0   halt    /sbin   /sbin/halt
  mail    x   8   12  mail    /var/spool/mail /sbin/nologin
  uucp    x   10  14  uucp    /var/spool/uucp /sbin/nologin
  operator    x   11  0   operator    /root   /sbin/nologin
  games   x   12  100 games   /usr/games  /sbin/nologin
  gopher  x   13  30  gopher  /var/gopher /sbin/nologin
  ftp x   14  50  FTP User    /var/ftp    /sbin/nologin
  nobody  x   99  99  Nobody  /   /sbin/nologin
  vcsa    x   69  69  virtual console memory owner    /dev    /sbin/nologin
  rpc x   32  32  Rpcbind Daemon  /var/cache/rpcbind  /sbin/nologin
  saslauth    x   499 76  "Saslauthd user"    /var/empty/saslauth /sbin/nologin
  postfix x   89  89      /var/spool/postfix  /sbin/nologin
  rpcuser x   29  29  RPC Service User    /var/lib/nfs    /sbin/nologin
  nfsnobody   x   65534   65534   Anonymous NFS User  /var/lib/nfs    /sbin/nologin
  sshd    x   74  74  Privilege-separated SSH /var/empty/sshd /sbin/nologin
  vagrant x   500 500 vagrant /home/vagrant   /bin/bash
  vboxadd x   498 1       /var/run/vboxadd    /bin/false
  dbus    x   81  81  System message bus  /   /sbin/nologin
  Time taken: 0.189 seconds, Fetched: 25 row(s)
  hive&gt;
  </code></pre>
  
  <p>Can any one please tell how to print the all data using HiveTemplate.Thanks for giving yours valuable time.</p>