Inserting Data into Hive Table

后端 未结 11 1149
失恋的感觉
失恋的感觉 2020-12-14 17:01

I am new to hive. I have successfully setup a single node hadoop cluster for development purpose and on top of it, I have installed hive and pig.

I created a dummy t

11条回答
  •  失恋的感觉
    2020-12-14 17:21

    There's no direct way to insert 1 record at a time from the terminal, however, here's an easy straight forward workaround which I usually use when I want to test something:

    Assuming that t is a table with at least 1 record. It doesn't matter what is the type or number of columns.

    INSERT INTO TABLE foo
    SELECT '12', 'xyz'
    FROM t
    LIMIT 1;
    

提交回复
热议问题