title: Import selected data from oracle db to S3 using sqoop and create hive table script on AWS EMR with selected data
body: <p>I am new to big data technologies. I am working on below requirement and need help to make my work simpler.</p>
  
  <p>Suppose i have 2 tables in oracle db and each table has 500 columns in it. my task is to move the selected columns data from  both the tables (by join query) to AWS S3  and populate the data in  hive table on AWS-EMR. 
  Currently to full-fill my requirement i follow below steps.</p>
  
  <ol>
  <li>Creating external hive table on AWS-EMR with the selected columns. I know the column names but to identify the column data type for hive, i am going to oracle database tables and identifying the type of column in oracle and creating the hive script.</li>
  <li>Once table is created, i am writing sqoop import command with selected query data and giving directory directory to S3.</li>
  <li>Repair the table from the S3 data.</li>
  </ol>
  
  <p>To explain in details,
  Suppose T1 and T2 are two tables, T1 has 500 columns from T1_C1 to T1_C500 with various data type (Number, Varchar, Date) etc. Similarly T2 also has 500 columns from T2_C1 to T2_C500.
  Now suppose i want to move some columns for ex: T1_C23,T1_C230,T1_C239,T2_C236,T1_C234,T2_C223 to S3 and create the hive table for selected columns and to know the data type i need to look into T1 and T2 table schema.
  Is there any simpler way to achieve this  ?
  In above mentioned steps, First step takes lot of manual time because i need to look at the table schema and get the data type of selected columns and then create hive table.</p>
  
  <p>To brief about work environment.</p>
  
  <p><strong>Services running on Data Center:</strong></p>
  
  <ol>
  <li><p>Oracle DB</p></li>
  <li><p>Sqoop on linux machine.</p></li>
  </ol>
  
  <p>sqoop talks to oracle db and configured to push the data on S3.</p>
  
  <p><strong>Services running on AWS:</strong></p>
  
  <ol>
  <li><p>S3</p></li>
  <li><p>AWS EMR hive</p></li>
  </ol>
  
  <p>hive talks to S3 and uses S3 data to repair the table.</p>