Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop, mail # user - Capture record cound using sqoop eval


+
VKing Gorri 2013-08-09, 00:00
Copy link to this message
-
Re: Capture record cound using sqoop eval
Abraham Elmahrek 2013-08-09, 00:17
Hey User,

I don't think it's possible. Looking at EvalSqlTool.java, it looks like
"ResultSetPrinter" is used in all cases. You should be able to use grep or
awk to extract the result.

-Abe
On Thu, Aug 8, 2013 at 5:00 PM, VKing Gorri <[EMAIL PROTECTED]> 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!
>
+
Jarek Jarcec Cecho 2013-08-11, 18:07
+
VKing Gorri 2013-08-21, 05:47