LoginSignup
0
0

More than 5 years have passed since last update.

Azure Machine LearningのExecute Python Script モジュールは pyodbc.connectをサポートしていない?

Last updated at Posted at 2017-10-19

Azure MLの実行速度が遅いので、試しに Pythonスクリプトの実行内で SQL Database から読み込みをやろうとしたところ
エラーで止まる。

python
    DB_SERVER = 'your server'
    DB_NAME = 'your database name'
    DB_USERNAME = 'username'
    DB_PASSWORD = 'password'
    #DB_DRIVER= '{ODBC Driver 13 for SQL Server}'
    DB_DRIVER= '{SQL Server}'
    #DB_DRIVER= '{SQL Server Native Client 11.0}'
    CONNECTION_STRINGS = 'DRIVER='+DB_DRIVER+';PORT=1433;SERVER='+DB_SERVER+';PORT=1443;DATABASE='+DB_NAME+';UID='+DB_USERNAME+';PWD='+DB_PASSWORD

エラーはこのような感じ。

ERROR
pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

恒例のstackoverflowで調査していたところ気にある記述が。
https://stackoverflow.com/questions/35682879/what-is-the-name-of-the-driver-to-connect-to-azure-sql-database-from-pyodbc-in-a

So currently it it impossible to connect to SQL server from “execute python script” module in Azure-ML. 
If you like to change it, please vote here'

Python ScriptからODBC接続できるようにするために、こちらから投票をお願いします!
Enable odbc connection from "Excute python script" module
https://feedback.azure.com/forums/257792-machine-learning/suggestions/12589266-enable-odbc-connection-from-excute-python-script

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0