So here is the steps:
1) I create a table in postgresql with a capital column name:
CREATE TABLE demo.golf_cap_col(outlook text, temperature
integer,humidity integer,wind text, "*PLAY*" text) ;
These sql are executed from PgAdminIII, if you run from command line ,
you might need add extra quote and escape char I guess.But I only run
them from PGadmin.
Of cause you need have a schema named demo.
2)Then I run the following sqoop command and the progress showing map
100% finished and then console is dead.
./sqoop export --connect jdbc:postgresql://localhost:5432/miner_demo
--table golf_cap_col --export-dir /csv/golf_cap_col
--input-fields-terminated-by , --username miner_demo --password
miner_demo -m 1 -- --schema demo
The file is onle one line like this : sunny, 80, 81, false, no
There is no error log and I found the yarn console always show that
process is running and never stop.Finally I have to manually kill it.
Thanks.
John.
On 02/18/2014 01:42 PM, Abraham Elmahrek wrote:
John,
Could you be more explicit about the problem you are referring to? I
don't think Sqoop will automatically create the table and the insert
command you've provided does work for me.
-Abe
On Mon, Feb 17, 2014 at 6:07 PM, John Zhao <[email protected]
<mailto:[email protected]>> wrote:
When I run the following sqoop command
./sqoop export --connect
jdbc:postgresql://localhost:5432/miner_demo --table golf_cap_col
--export-dir /csv/golf_cap_col --input-fields-terminated-by ,
--username miner_demo --password miner_demo -m 1 -- --schema demo
The input table is like this:
CREATE TABLE demo.golf_cap_col(outlook text, temperature
integer,humidity integer,wind text, "*PLAY*" text) ;
INSERT INTO demo.golf_cap_col( outlook, temperature, humidity,
wind, "*PLAY*") VALUES ('sunny', 80, 81, 'false', 'no');
Does anyone have any idea about this ? Do you know whether this
is an open issue?
John Zhao