ciancolo opened a new pull request #16350:
URL: https://github.com/apache/airflow/pull/16350


   Hello all,
   I propose you this PR in order to fix 2 little bugs in Apache Sqoop 
behavior. 
   
   I usually use Airflow combined with Sqoop to create ingestion pipelines from 
different databases (SQL server, Postgres or Oracle). 
   I noticed:
   
   1. It was not possible to use Microsoft SQL Server Airflow connection with 
Sqoop Operator because the connection string generated from the Sqoop Hook code 
was wrong:
   The code generated this connection string  
`jdbc:sqlserver://<my_server>:<port>/<database>` but the correct string is ` 
jdbc:sqlserver://<my_server>:<port>;databaseName=<database>` ([official 
docs](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax)).
 I corrected the code in order to generate the correct connection string for 
Microsoft SQL Server Connection.
   
   2. Sqoop import command accepts the parameter `schema`; the parameter 
describes the name of the schema that Sqoop should use ([official 
docs](https://sqoop.apache.org/docs/1.4.7/SqoopUserGuide.html)). With the 
current implementation of the Sqoop Operator and Hook, it was not possible to 
specify this parameter. It was possible to add the parameter in the extra 
import/export parameters, but in this case, the schema parameter was added to 
the command in the wrong position: for the correct use of the parameter, this 
must be the last. 
   So I added the possibility for the user to use a specific parameter to 
specify which schema Sqoop should use. 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to