- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
HIve not loading escape character (\)
- Labels:
-
Apache Hive
Created ‎03-14-2016 02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have some data that has a backslash (\) and noticed that when loading into Hive, it treats it as an escape character. Is there a way to get around it treating this as an escape character?
I have tried replacing a single backslash with 2 backslashes and it still give me the same result.
The only other thing i could think of doing is just replacing the backslash with the encoded version of that value.
Created ‎03-14-2016 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Jesse Passwaters @Takahiko Saito Please take a look at
https://documentation.altiscale.com/using-csv-serde-with-hive It has example of how to use a different escape character.
Created ‎03-14-2016 02:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How are you loading your data to Hive ? If you are using Sqoop, then you need to take a look at
https://sqoop.apache.org/docs/1.4.0-incubating/SqoopUserGuide.html#id1765770
Created ‎03-14-2016 02:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are loading the data from an external table via the CSVSerde. In the temp table we can view the backslashes, but once we load it into the ORC format via the CSVSerde the backslashes, no matter how many there are, they disappear.
Created ‎03-14-2016 03:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me clarify - the external table is using the CSVSerde to read the data and then we are loading an ORC table which uses the OrcSerde
Created ‎03-14-2016 05:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you use ESCAPED BY '\' when you create an ORC table and load from the external table?
Created ‎03-14-2016 06:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've seen where you can do that with the CSVSerde, but haven't found anything that states that you could use that with the OrcSerde. Do you have any examples?
Created ‎03-14-2016 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Jesse Passwaters @Takahiko Saito Please take a look at
https://documentation.altiscale.com/using-csv-serde-with-hive It has example of how to use a different escape character.
Created ‎03-16-2016 01:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shishir Saxena - That worked! I previously saw that but just didn't think that would solve it.
Created ‎05-18-2018 05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was not able to open the link :https://documentation.altiscale.com/using-csv-serde-with-hive
Could you p[lease provide the correct link or provide me the solution which would be helpful.
Created ‎06-12-2018 08:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shishir Saxena: This link is not working
https://documentation.altiscale.com/using-csv-serde-with-hive It has example of how to use a different escape character.
Can you post the contents of the above link here? or give a different link that works?
