The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hive / HCatalog Forum

Handling of quoted csv format (through Sandbox web interface)

  • #16161
    David Turnbull

    Note that I’m working with Sandbox simply as a learning exercise – this is not a production issue for me.

    Within the Sandbox web interface, I created an HCatalog table for a file with a quoted csv format. By this I mean “ABC”,”DEF”,”1.0″…etc.

    The actual data contains all fields including those with numeric values enclosed in double-quotes.

    I’m finding that if I define these numeric columns are anything other than string type (e.g. float or int), the resulting table displays the values as NULL, presumably because the quotation marks are taken as an indication that these can only be string values.

    When choosing the column delimiter within the web interface, I tried selecting the checkbox for Excel style functionality ( I forget the exact description). Within the data preview, this caused all the values to be shown without the quotes, but after the table was defined the browse function still showed NULL for any fields defined as type float or int.

    Is there any way to have HCatalog cast these “string” values as numeric type fields?

    Is this an issue with Sandbox (i.e. GUI provides access to commonly used functions, but not all), or is this a current limitation of the current release of HCatalog or Hive?

    I looked at documentation at, but couldn’t find anything about how delimiter or file formats are to be specified. There was some information for Hive, but not addressing this. I also checked the, but couldn’t see anything on this.

  • Author
  • #16206

    Hi David,

    You have bumped into a limitation of the current version of Hive/Hcatalog, double quoted data is always interpreted as strings. The easiest workaround for this would be to strip the double quotes from the data files before loading it into hadoop. You could do this with a "sed -i ‘s/\"//g’ your-data-file".

    I hope this helps,

The forum ‘Hive / HCatalog’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.