Last active
August 29, 2015 14:01
-
-
Save nileema/8d512700abe3d90bff32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Input | |
======= | |
fbid1,fbid2,name | |
9,9,z | |
99,99,zz | |
999,999,zzz | |
Output | |
========= | |
presto:default> select * from test_loader_column_names; | |
fbid1 | fbid2 | name | url | |
-------+-------+---------------------+------ | |
1 | 2 | abc | qq | |
66 | 77 | pqr | qq | |
100 | 200 | stu | qq | |
110 | 220 | test_string_correct | qq | |
300 | 400 | vwxyz | qq | |
330 | 440 | test_name2 | qq | |
3 | 4 | def | qq | |
9 | 9 | z | NULL | |
11 | 12 | ghi | qq | |
13 | 14 | jkl | qq | |
44 | 55 | mno | qq | |
99 | 99 | zz | NULL | |
999 | 999 | zzz | NULL | |
With missing columns: | |
==================== | |
$ cat test_loader_column_names.dat | |
fbid1,fbid2,name | |
9,9,z | |
99,99,zz | |
999,999 | |
$ curl -v -X POST --data-binary @test_loader_column_names.dat localhost:8081/v1/hbaseloader/load/test_loader_column_names | |
* Adding handle: conn: 0x7fafda804000 | |
* Adding handle: send: 0 | |
* Adding handle: recv: 0 | |
* Curl_addHandleToPipeline: length: 1 | |
* - Conn 0 (0x7fafda804000) send_pipe: 1, recv_pipe: 0 | |
* About to connect() to localhost port 8081 (#0) | |
* Trying 127.0.0.1... | |
* Connected to localhost (127.0.0.1) port 8081 (#0) | |
> POST /v1/hbaseloader/load/test_loader_column_names HTTP/1.1 | |
> User-Agent: curl/7.30.0 | |
> Host: localhost:8081 | |
> Accept: */* | |
> Content-Length: 40 | |
> Content-Type: application/x-www-form-urlencoded | |
> | |
* upload completely sent off: 40 out of 40 bytes | |
< HTTP/1.1 500 Server Error | |
< Content-Type: application/json | |
< X-Content-Type-Options: nosniff | |
< Transfer-Encoding: chunked | |
< | |
"tupleBuffer expects a different number of fields than supplied" | |
* Connection #0 to host localhost left intact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment