sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarek Jarcec Cecho <jar...@apache.org>
Subject Re: Capture record cound using sqoop eval
Date Sun, 11 Aug 2013 18:07:34 GMT
Hi VKing,
Sqoop is highly optimized tool for transferring data between relational databases and Hadoop
ecosystem. It's not a general purpose querying tool. The tool "eval" stands for "evaluation"
and should be used only for validating the connection status using simple queries. It should
not be used in production workflows. I would suggest to use mysql utility itself for this
purpose.

Jarcec

On Thu, Aug 08, 2013 at 05:00:57PM -0700, VKing Gorri wrote:
> Hi,
>  
> I would like to store record count of a MySQL table in a variable using sqoop eval. How
could I suppress the formatting from the QueryResult and just get count so that I could export
the value to a variable?  Please suggest.
>  
> sqoop eval --connect <> --username <>--password <> --query "select
count(1)  from table_nm"
> ------------------------
> | count(1)             |
> ------------------------
> | 3768                 |
> ------------------------
> 
> Thanks!

Mime
View raw message