title: Sqoop export to SQL Server: schemas?
body: <p>I would like to export data in HDFS to a SQL Server table in the schema <code>my_schema</code>. </p>
  
  <p>I tried <code>--schema</code> like the import command:</p>
  
  <pre><code>sqoop export \
  --libjars /opt/mapr/sqoop/sqoop-1.4.6/lib/sqljdbc4.jar \
  --connect "jdbc:sqlserver://MY-SERVER-DNS;database=my_db;" \
  --schema "myschema" \
  --table "my_table" \
  --export-dir /path/to/my/hdfs/dir
  
  ERROR tool.BaseSqoopTool: Unrecognized argument: --schema
  </code></pre>
  
  <p>And <code>--table "schema.table"</code></p>
  
  <pre><code>sqoop export \
  --libjars /opt/mapr/sqoop/sqoop-1.4.6/lib/sqljdbc4.jar \
  --connect "jdbc:sqlserver://MY-SERVER-DNS;database=my_db;" \
  --table "my_schema.my_table" \
  --export-dir /path/to/my/hdfs/dir
  
  INFO manager.SqlManager: 
  Executing SQL statement: SELECT t.* FROM [my_schema.my_table] AS t WHERE 1=0 
  
  ERROR manager.SqlManager: Error executing statement: 
  com.microsoft.sqlserver.jdbc.SQLServerException:
  Invalid object name 'my_schema.my_table'.
  </code></pre>
  
  <p>Is there any way to do this with sqoop? Or another technology?</p>
  
  <p>EDIT:</p>
  
  <pre><code>sqoop export \
  --libjars /opt/mapr/sqoop/sqoop-1.4.6/lib/sqljdbc4.jar \
  --connect "jdbc:sqlserver://MY-SERVER-DNS;database=my_db;schema=my_schema;" \
  --table "my_table" \
  --export-dir /path/to/my/hdfs/dir
  
  INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM [my_table] AS t WHERE 1=0
  16/07/25 10:46:21 ERROR manager.SqlManager: 
  Error executing statement: com.microsoft.sqlserver.jdbc.SQLServerException:
  Invalid object name 'my_table'.
  </code></pre>
  
  <p>This is not recognizing the schema.</p>