使用happybase将csv文件加载到hbase时出错
正在尝试将csv文件加载到hbase,但在运行getting时出错: 使用的版本: 快乐基地0.9 Python 2.6.6 MapRDB TypeError:列表/集合类型参数的元组大小应为3 下面是使用的代码使用happybase将csv文件加载到hbase时出错,hbase,happybase,Hbase,Happybase,正在尝试将csv文件加载到hbase,但在运行getting时出错: 使用的版本: 快乐基地0.9 Python 2.6.6 MapRDB TypeError:列表/集合类型参数的元组大小应为3 下面是使用的代码 import csv import happybase # CSV file of customer records -- change me f = '/mapr/demo.mapr.com/project/cust.csv' ufile = open(f) reader = c
import csv
import happybase
# CSV file of customer records -- change me
f = '/mapr/demo.mapr.com/project/cust.csv'
ufile = open(f)
reader = csv.DictReader(ufile)
conn = happybase.Connection('localhost')
table = conn.table('cust_table')
print "reading customer file %s" % f
i = 0
for row in reader:
i += 1
table.put(row['CustID'],
{'cdata:name': row['Name'],
'cdata:gender': row['Gender'],
'cdata:address': row['Address'],
'cdata:zip': row['zip'],
'cdata:signdate': row['SignDate'],
'cdata:status': row['Status'],
'cdata:level': row['Level'],
'cdata:campaign': row['Campaign'],
# 'cdata:linked_with_apps': row['LinkedWithApps']
})
print "loaded cust db with %d entries" % i
屏幕截图错误:
任何帮助都将不胜感激。尝试降级旧图书馆 顺便说一句,错误报告的正确位置是github,而不是stackoverflow