'Upload data to HDFS home of user then load (aka move) it into the Hive table (in the Hive metastore in HDFS).'

def load(self, django_user):

    LOAD_HQL = "\n                        LOAD    DATA    INPATH\n                        '%(filename)s'    OVERWRITE    INTO    TABLE    %(tablename)s\n                        "
    hdfs_root_destination = self._get_hdfs_root_destination(django_user)
    hdfs_file_destination = self._upload_to_hdfs(django_user, self._contents_file, hdfs_root_destination)
    hql = (LOAD_HQL % {'tablename': self.name, 'filename': hdfs_file_destination})
    LOG.info(('Running    load    query:    %s' % hql))
    self._load_data_to_table(django_user, hql, hdfs_file_destination)
