I am trying to get the count of rows in a mysql table and trying to get the count of data into a text file onto local machine.
I am using the below command:
sqoop-eval --connect jdbc:mysql:url -username -password \
--query"select count(*) from test" >> data.txt
I am getting the following output:
------------------------
| COUNT |
------------------------
| 7548757 |
------------------------
I am looking for just the number in the output file as:
7548757
Nothing other than the count. How can i achieve it?