You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Mich Talebzadeh <mi...@cloudtechnologypartners.co.uk> on 2016/02/11 16:38:17 UTC
Using Contains function call
Hi,
Is this possible to look for more than one work in a file using
contains?
Example
scala> oralog.filter(line =>
line.contains("Errors")).collect().foreach(line => println(line))
This operation will return anything with Errors in it.
Few considerations please
Much like UNIX or hdfs can I do case insensitive contains call like
ERROR or error (Like grep -i error)
Is this possible to have more than one work entry in contains call like
egrep -i "Errors|ORA-"
THanks
--
Dr Mich Talebzadeh
LinkedIn
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
http://talebzadehmich.wordpress.com
NOTE: The information in this email is proprietary and confidential.
This message is for the designated recipient only, if you are not the
intended recipient, you should destroy it immediately. Any information
in this message shall not be understood as given or endorsed by Cloud
Technology Partners Ltd, its subsidiaries or their employees, unless
expressly so stated. It is the responsibility of the recipient to ensure
that this email is virus free, therefore neither Cloud Technology
partners Ltd, its subsidiaries nor their employees accept any
responsibility.