
Anonymous
Not applicable
2018-08-29
08:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
unable to dump mysql database table using tsystem in talend
Hi
am trying to dump mysql database tables using tsystem component in talend
main syntax :-
"mysqldump -u user-p dbname tablename > file.sql"
using this am getting error like mysqldump: Couldn't find table: ">"
after modified syntax : -
mysqldump -u user-p dbname tablename like this am getting dump completed successfully but file not found.if i given path and file it's showing error
how to resolve this ??? please suggest
655 Views
1 Solution
Accepted Solutions

Specialist
2018-08-30
06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you instead of doing > use: --result-file
655 Views
7 Replies

Master
2018-08-29
09:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try with escape char something like
%mysqldump -u user-p dbname tablename% > file.sql
or
call "mysqldump -u user-p dbname tablename" > file.sql
655 Views

Specialist
2018-08-29
09:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a continuation of this thread: please stick to one?!
https://community.talend.com/t5/Design-and-Development/unable-to-get-output-sql-file-from-db-source/...
However if you specify a path, in Java you need to double the slash... like C:\\folder\\out.sql
Slash , \ is a escape character.
try this and see if it works, put this into your tSystem:
"cmd /c dir *.* > C:\\data\\_out.txt"
https://community.talend.com/t5/Design-and-Development/unable-to-get-output-sql-file-from-db-source/...
However if you specify a path, in Java you need to double the slash... like C:\\folder\\out.sql
Slash , \ is a escape character.
try this and see if it works, put this into your tSystem:
"cmd /c dir *.* > C:\\data\\_out.txt"
655 Views

Specialist
2018-08-29
09:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In tSystem it works for me:
"cmd /c mysqldump -v -h localhost --user=bcketl --password=mypwd datastage etl_source_files >c:\\data\\etldump.sql"
Starting job test at 14:17 29/08/2018.
[statistics] connecting to socket on port 3816
[statistics] connected
mysqldump: [Warning] Using a password on the command line interface can be insecure. -- Connecting to localhost... -- Retrieving table structure for table etl_source_files... -- Sending SELECT query... -- Retrieving rows... -- Disconnecting from localhost...
[statistics] disconnected
Job test ended at 14:17 29/08/2018. [exit code=0]
655 Views

Anonymous
Not applicable
2018-08-30
03:55 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Both cases r not working showing as could n't find table ">"
655 Views

Anonymous
Not applicable
2018-08-30
04:26 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
here am trying this command from talend after build the job am calling in ubuntu server which my sql placed in it.
again am getting the same issue
mysqldump: Couldn't find table: ">"
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: 192.168.20.21 Database: kafnu
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.16.04.1
/*!40101 SET @old_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @old_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @old_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @old_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @old_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @old_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @old_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @old_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
again am getting the same issue
mysqldump: Couldn't find table: ">"
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: 192.168.20.21 Database: kafnu
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.16.04.1
/*!40101 SET @old_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @old_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @old_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @old_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @old_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @old_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @old_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @old_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
655 Views

Specialist
2018-08-30
06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you instead of doing > use: --result-file
656 Views

Anonymous
Not applicable
2018-08-31
03:51 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dijke,
Thank u so much it works fine now and dumping tables after using this --result-file
Thank u so much it works fine now and dumping tables after using this --result-file
655 Views
