![](/img/trans.png)
[英]Using Talend ETL tool, How to insert a non existing record to MySQL table from Excel Sheet?
[英]how to import .sql file in mysql database using talend ETL tool
我想使用talend ETL工具將.sql文件導入mysql數據庫,而我的機器是Windows。
我嘗試過的是使用tSystem並編寫命令是
"cmd C:/xampp/mysql/bin>mysql -u root demo <C:/xampp/mysql/bin/localhost.sql"
當我運行這個我得到這個:
Starting job sqlfile at 10:51 04/09/2013.
[statistics] connecting to socket on port 3440
[statistics] connected
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\talend\TOS_DI-Win32-r104014-V5.3.1>
[statistics] disconnected
Job sqlfile ended at 10:51 04/09/2013. [exit code=0]
在控制台上,我沒有任何錯誤。 但是當我打開演示數據庫時,它不包含任何內容。
請誰能告訴我我錯了。
如果“ .sql”文件中的SQL命令未更改,並且您希望“一次性”交互式執行,則可以使用“ tMysqlRow ”並定義:
此處介紹了tMysqlRow的配置: https ://help.talend.com/display/TalendOpenStudioComponentsReferenceGuide53EN/tMysqlRow
您可以在此處閱讀使用場景(該組件是'tDBSQLRow',但它也適用於'tMysqlRow'): https ://help.talend.com/display/TalendOpenStudioComponentsReferenceGuide53EN/tDBSQLRow
如果要將XAMPP Mysql連接到Talend,請執行以下操作
在F:\\ xampp_new \\ mysql \\ bin \\ my.ini中進行如下更改wait_timeout =編號interactive_timeout =編號connect_timeout =編號bind-address = 127.0.0.1,然后在xampp中重新啟動mysql
並在數據庫版本5中選擇Mysql版本5
歡呼!!!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.