title: solution for "select transform" for python udf in hive
body: <p>Is there a way to not to include all the columns in select transform () yet to get all the columns in output?</p>
  
  <p>for example:
  I have columns in hive table like:</p>
  
  <pre><code>c1, c2, c3, c4, c5, c6, c7, c8, c9, c10
  </code></pre>
  
  <p>and I am performing transform on columns <code>c8, c9, c10</code> and output contains <code>c1, c2, c3, c4, c5, c6, c7, co</code> where <code>co</code> = output after performing transform on columns <code>c8, c9, c10</code></p>
  
  <p>There is a way I can do this:</p>
  
  <pre><code>select transform (c1,c2,c3,c4,c5,c6,c7,c8,c9,c10)
  using 'python udf_name'
  as (c1,c2,c3,c4,c5,c6,c7,co)
  from table_name;
  </code></pre>
  
  <p>The problem is I don't want to pass all the columns in select transform as there are nearly 900 columns in my table, and its difficult to figure it out that on which columns the UDF works.</p>
  
  <p>Example:</p>
  
  <pre><code>#temp
  c1, c2, c3, c4  
   a,  1,  0, 5  
   b,   ,  8, 9  
  </code></pre>
  
  <p>Now I want to find first Non-zero Not Null value from column <code>c2, c3, c4</code>
  and print it with column c1</p>
  
  <p>here is the python UDF</p>
  
  <p>test.py:</p>
  
  <pre><code>import sys
  for line in sys.stdin:
      line=line.strip()
      c=line.split()
      l=len(c)
      for i in range (1,l):
          try:
              if (int(c[i])==0):
                  pass
              else:
                  print c[i]
                  break
          except ValueError:
              pass
  </code></pre>
  
  <p>I can Achieve this by passing all the columns</p>
  
  <pre><code>select transform (c1,c2,c3,c4)
  using 'python test.py'
  as (c1,co)
  from temp
  </code></pre>
  
  <p>output :  </p>
  
  <pre><code>c1, co  
   a,  1  
   b,  8  
  </code></pre>
  
  <p>Problem :
  I don't want to pass all the columns in select transform, as I have 900 columns.</p>
  
  <p>Basically I want to pass only those columns which are involved in the UDF and not all the columns.</p>