You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2011/02/09 17:31:22 UTC
[Hadoop Wiki] Update of "Hive/HiveClient" by RadekMaciaszek
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "Hive/HiveClient" page has been changed by RadekMaciaszek.
The comment on this change is: Fixed python sample.
http://wiki.apache.org/hadoop/Hive/HiveClient?action=diff&rev1=11&rev2=12
--------------------------------------------------
client.execute("CREATE TABLE r(a STRING, b INT, c DOUBLE)")
client.execute("LOAD TABLE LOCAL INPATH '/path' INTO TABLE r")
client.execute("SELECT * FROM r")
+ while (1)
- while (row = client.fetchOne()):
+ row = client.fetchOne()
+ if (row == None):
+ break
print row
client.execute("SELECT * FROM r")
print client.fetchAll()