WBCOPYTABLES: --table-range
Posted by: Scott Carpenter
Date: July 13, 2023 04:54PM

This feels like it should be a simple question, but I've searched for hours and cannot get it to work. I can't seem to find a real-life example of the --table option.


The CMD file created by the Workbench Migration tool works great for whole tables, but I want to be able to use "--table-range" to update tables and I can't even get a simple "--table" to work.



The contents of text file used by "--table-file" looks like this:

`quantdata` `dates_trading` `quantdata` `dates_trading` `date` `date` `date`, `tradeday_year`, `tradeday_month`, `data`



Output of the CMD file (using --table-file) look like this:

Loading table information from file C:\wb_tables_to_migrate.txt
18:27:24 [INF][ copytable]: --table `quantdata` `dates_trading` `quantdata` `dates_trading` `date` `date`
`date`, `tradeday_year`, `tradeday_month`, `data`
18:27:24 [INF][ copytable]: Connecting to MySQL server at SOURCE:3306 with user root
.......
18:27:25 [DB1][ copytable]: Executing query: SELECT `date`, `tradeday_year`, `tradeday_month`, `data` FROM `dates_trading` ORDER BY `date`



The table has only FOUR columns: date, tradeday_year, tradeday_month, data

If I try to migrate the same table on the command line, I get "Missing value for table copy specification"


C:\Progra~1\MySQL\MYSQLW~1.0CE\wbcopytables.exe ^
--mysql-source="root@SOURCE:3306" ^
--source-rdbms-type=Mysql ^
--target="root@localhost:3306" ^
--source-password="PASSWORD" ^
--target-password="PASSWORD" ^
--thread-count=1 ^
--dont-disable-triggers ^
--truncate-target ^
--log-level=debug3 ^
--table `quantdata` `dates_trading` `quantdata` `dates_trading` `date`, `tradeday_year`, `tradeday_month`, `data`


Question 1: Why are there 2 extra DATE fields in the text file?
Question 2: WHAT AM I DOING WRONG?
Question 3: If I can get --table to work, how do I use --table-range? I want to add "WHERE DATE > xxxx"


The WB manual (https://dev.mysql.com/doc/workbench/en/wbcopytables.html) seems simple enough, but does not include samples.
Thanks very much,

Scott

Options: ReplyQuote


Subject
Written By
Posted
WBCOPYTABLES: --table-range
July 13, 2023 04:54PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.