file parsing using hive query issue
Question: I have a complex text file to parse and load for analysis.

I started off with a simple Hive query to parse a text file and load as a
table in HDFS.

I am using beeswax to run this query.

## name_area.txt

arun:salem anand:vnr Cheeli:guntur

Hive Query

CREATE TABLE test( name STRING, area STRING) ROW FORMAT SERDE
'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' WITH SERDEPROPERTIES
("input.regex" = "^(._):(._)$","output.format.string" = "%1$s %2$s") LOCATION
'/user/name_area.txt';

The file is copied to HDFS.

When i execute the query, I am getting the following exception.

NoReverseMatch at /beeswax/execute/6 Reverse for ‘execute_parameterized_query’
with arguments ‘(6,)’ and keyword arguments ‘{}’ not found. Request Method:
POST Request URL: <http://192.168.58.128:8000/beeswax/execute/6> Django
Version: 1.2.3 Exception Type: NoReverseMatch Exception Value: Reverse for
‘execute_parameterized_query’ with arguments ‘(6,)’ and keyword arguments ‘{}’
not found. Exception Location: /usr/lib/hue/build/env/lib/python2.6/site-
packages/Django-1.2.3-py2.6.egg/django/core/urlresolvers.py in reverse, line
297 Python Executable: /usr/bin/python2.6 Python Version: 2.6.6 Python Path:
[”, ‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/setuptools-0.6c11-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/pip-0.6.3-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Babel-0.9.6-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/BabelDjango-0.2.2-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Beaker-1.4.2-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Markdown-2.0.3-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/MarkupSafe-0.9.3-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Paste-1.7.2-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/PyYAML-3.09-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Pygments-1.3.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/South-0.7-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/Spawning-0.9.6-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/Twisted-8.2.0-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/anyjson-0.3.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/avro-1.5.0-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/billiard-2.7.3.28-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/celery-3.0.19-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/configobj-4.6.0-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/django_auth_ldap-1.2.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/django_celery-3.0.17-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/django_extensions-0.5-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/django_nose-0.5-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/elementtree-1.2.6_20050316-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/enum-0.4.4-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/eventlet-0.9.14-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/greenlet-0.3.1-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/httplib2-0.8-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/importlib-1.0.2-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/kerberos-1.1.1-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/kombu-2.5.10-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/lockfile-0.8-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/lxml-3.3.5-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/moxy-1.0.0-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/openpyxl-1.6.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/ordereddict-1.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/pam-0.1.3-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/processing-0.52-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/pyOpenSSL-0.13-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/pycrypto-2.6-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/pysqlite-2.5.5-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/python_daemon-1.5.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/python_dateutil-2.0-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/python_ldap-2.3.13-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/pytidylib-0.2.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/requests-2.2.1-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/requests_kerberos-0.4-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/sasl-0.1.1-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/sh-1.08-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/simplejson-2.0.9-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/threadframe-0.2-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/thrift-0.9.1-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/urllib2_kerberos-0.1.6-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages/xlrd-0.9.0-py2.6.egg’,
‘/usr/lib/hue/build/env/lib/python2.6/site-
packages/zope.interface-3.5.2-py2.6-linux-x86_64.egg’,
‘/usr/lib/hue/desktop/core/src’, ‘/usr/lib/hue/desktop/libs/hadoop/src’,
‘/usr/lib/hue/desktop/libs/liboozie/src’,
‘/usr/lib/hue/build/env/lib/python2.6/site-packages’,
‘/usr/lib/hue/apps/about/src’, ‘/usr/lib/hue/apps/beeswax/src’,
‘/usr/lib/hue/apps/filebrowser/src’, ‘/usr/lib/hue/apps/hcatalog/src’,
‘/usr/lib/hue/apps/help/src’, ‘/usr/lib/hue/apps/jobbrowser/src’,
‘/usr/lib/hue/apps/jobsub/src’, ‘/usr/lib/hue/apps/oozie/src’,
‘/usr/lib/hue/apps/pig/src’, ‘/usr/lib/hue/apps/proxy/src’,
‘/usr/lib/hue/apps/useradmin/src’, ‘/usr/lib/hue/build/env/bin’,
‘/usr/lib64/python2.6′, ‘/usr/lib64/python2.6/plat-linux2′,
‘/usr/lib64/python2.6/lib-dynload’, ‘/usr/lib64/python2.6/site-packages’,
‘/usr/lib/python2.6/site-packages’, ‘/usr/lib/python2.6/site-
packages/setuptools-0.6c11-py2.6.egg-info’, ‘/usr/lib/hue/apps/beeswax/gen-
py’, ‘/usr/lib/hue’, ‘/usr/lib64/python26.zip’, ‘/usr/lib64/python2.6/lib-tk’,
‘/usr/lib64/python2.6/lib-old’, ‘/usr/lib/python2.6/site-
packages/setuptools-0.6c11-py2.6.egg-info’, ‘/usr/lib/python2.6/site-
packages/setuptools-0.6c11-py2.6.egg-info’,
‘/usr/lib/hue/apps/beeswax/src/beeswax/../../gen-py’,
‘/usr/lib/hue/apps/jobbrowser/src/jobbrowser/../../gen-py’,
‘/usr/lib/hue/apps/proxy/src/proxy/../../gen-py’] Server time: Fri, 24 Apr
2015 07:37:07 -0700

Appreciate your help on this.


Answer: Your create statement query does not seems write. The location should be the
directory name where input file exists and not the file name.

