Two Laptop Bag*
The moose likes Hadoop and the fly likes backslash in hive regexp_replace function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Hadoop
Bookmark "backslash in hive regexp_replace function?" Watch "backslash in hive regexp_replace function?" New topic

backslash in hive regexp_replace function?

Joseph Hwang

Joined: Aug 17, 2013
Posts: 14
I try to replace backslash(\) to slash(/) of string "L\F\W\A\5\LFWA55MATRQ647N.csv" in Hive regexp_replace function with java.
The result string I want is "L/F/W/A/5/LFWA55MATRQ647N.csv"

This is source

String sql = "select trim(regexp_replace(filename,'\', '/')) from table";
res = stmt.executeQuery(sql);
while ( {
using JDBC.But the result string is like below

/L/\/F/\/W/\/A/\/5/\/L/F/W/A/5/5/M/A/T/R/Q/6/4/7/N/./c/s/v/ / / / / / / / / / / /

Any advice will be appreciated.
I agree. Here's the link:
subject: backslash in hive regexp_replace function?
Similar Threads
memory limit crossed (assignment)
login check while password is encrypted in db.
oracle '5' to 'five'
I want to merge the two files into one of kind: by placing englishKeyword=English in format Russian
problem while updating the record