Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property Value for: gplinkHostName not found! #1

Closed
vbortnyak opened this issue Feb 14, 2019 · 9 comments
Closed

Property Value for: gplinkHostName not found! #1

vbortnyak opened this issue Feb 14, 2019 · 9 comments

Comments

@vbortnyak
Copy link

vbortnyak commented Feb 14, 2019

Hello.
when i run:
gpltable -s $GPLINK_HOME/connections/sqlserver.properties -t $GPLINK_HOME/gplink.properties -f $GPLINK_HOME/sql/sqlserver.sql -a $GPLINK_HOME/tables/public.sqlserver.sql

I have:
Exception in thread "main" java.sql.SQLException: Property Value for: gplinkHostName not found!
at GPLink.main(GPLink.java:74)

what could be the problem

@vbortnyak vbortnyak changed the title gpltable: command not found Property Value for: gplinkHostName not found! Feb 14, 2019
@RunningJon
Copy link
Owner

Your gplink.properties file needs to have "gplinkHostName" set to the name of the host where gplink is installed. The segment hosts also need to be able to resolve and route to the hostname value you provide.

Here is the sample file:
https://github.com/pivotalguru/gplink/blob/master/connections/gplink.properties

@vbortnyak
Copy link
Author

Yes, I used the file: $ GPLINK_HOME/gplink.properties
which does not contain gplinkHostName.
Now I have got to create an external table and I can get the result from:
gpldata -s $ GPLINK_HOME / connections / sqlserver.properties -f $ GPLINK_HOME / sql / sqlserver.sql

but when I try to request data from my external table, I get an error:

SQL Error [08006]: ERROR: http response code 400 from gpfdist (gpfdist: // ubuntu: 24000 / connections / sqlserver.properties + sql / sqlserver.sql # transform = gplink): HTTP / 1.0 400 invalid request (unsupported input # transform) (seg0 slice1 127.0.1.1:6000 pid = 4408)

I was doing:
gplstart -t $GPLINK_HOME/gplink.properties
and i have rezult:
Started all ports needed.

@RunningJon
Copy link
Owner

Seeing that you are using ubuntu, you must be using the open source version. It looks like the open source version of gpfdist does not support #transform which is odd. I'll look into this for you to see why this isn't in the open source version.

@RunningJon
Copy link
Owner

Can you provide the external table DDL that gplink created?

@RunningJon
Copy link
Owner

gpfdist requires that GPDB has been compiled with libyaml.

Look in your configure output (if you still have it) and see if there is a line like "libyaml is not found. disabling transformations for gpfdist."

@vbortnyak
Copy link
Author

I did not find any references to "libyaml" in my config.log, but my config had the form:
  ./configure --prefix = / home / gpadmin / greenplum_db / --enable-mapreduce --with-openssl --with-perl --with-python --with-libxml --with-gssapi --enable-orca - -with-includes = / usr / local / include / --with-libraries = / usr / local / lib / --enable-pxf --with-libcurl

The external table DLL looks like:

  • Drop table
  • DROP EXTERNAL TABLE public.ant_series

CREATE EXTERNAL TABLE demodb.public.ant_series (
id int4,
id_1cseries varchar,
code varchar
)
LOCATION (
'gpfdist: // ubuntu: 24000 / connections / sqlserver.properties + sql / sqlserver.sql # transform = gplink'
) ON ALL
FORMAT 'TEXT' (delimiter '|' null 'null' escape '')
ENCODING 'UTF8';

  • Permissions

ALTER EXTERNAL TABLE public.ant_series OWNER TO gpadmin;
GRANT ALL ON TABLE public.ant_series TO gpadmin;

@vbortnyak
Copy link
Author

vbortnyak commented Feb 18, 2019

I previously tried to create an external table using "PXF" for the SQL Server, but I also received an error:

SQL Error [XX000]: ERROR: remote component error (500) from '127.0.0.1.1.18888': type Exception report message com.microsoft.sqlserver.jdbc.SQLServerDriver description . exception java.io.IOException: com.microsoft.sqlserver.jdbc.SQLServerDriver (libchurl.c: 944) (seg0 slice1 127.0.1.1:6000 pid = 13030) (cdbdisp.c: 254)
  Details: External table pxf_test_from_mssql

DLL external table:

  • Drop table
  • DROP EXTERNAL TABLE public.pxf_test_from_mssql

CREATE EXTERNAL TABLE demodb.public.pxf_test_from_mssql (
name varchar
)
LOCATION (
'pxf: //dbo.test_pxf? PROFILE = Jdbc & JDBC_DRIVER = com.microsoft.sqlserver.jdbc.SQLServerDriver & DB_URL = jdbc: sqlserver: //192.168.183.144; database = TestDB; user = sa password = 12qwasZX'
) ON ALL
FORMAT 'CUSTOM' (FORMATTER = 'pxfwritable_import')
ENCODING 'UTF8';

  • Permissions

ALTER EXTERNAL TABLE public.pxf_test_from_mssql OWNER TO gpadmin;

Could there be a cause of errors when working with PXF and gplink the same?
I successfully used PXF with PostgreSQL, but with SQL Server does not work.

@RunningJon
Copy link
Owner

Do external tables with gpfdist (without transform work)?
Example: http://www.pivotalguru.com/?p=147

If it does, can you try an external table with gpfdist transform like this:
http://www.pivotalguru.com/?p=871

@vbortnyak
Copy link
Author

Hello,

http://www.pivotalguru.com/?p=147

I used to create external table with csv file and it works.
I tried to create external table how here:

http://www.pivotalguru.com/?p=871

and it works too, but I used -p 8900 because with -p 8999 I had error.

Then I moved file
/home/gpadmin/gplink-master/yml/gplink.yml
to
/home/gpadmin/gplink-master/gplink.yml
and runed the gpfdist how here:
gpadmin@ubuntu:~/gplink-master$ gpfdist -p 8901 -c /home/gpadmin/gplink-master/gplink.yml &

Then I created external table like it:

-- Drop table
-- DROP EXTERNAL TABLE public.ant_series

CREATE EXTERNAL TABLE demodb.public.ant_series (
id int4,
id_1cseries varchar,
code varchar
)
LOCATION (
'gpfdist://ubuntu:8901/connections/sqlserver.properties+sql/sqlserver.sql#transform=gplink'
) ON ALL
FORMAT 'TEXT' ( delimiter '|' null 'null' escape '' )
ENCODING 'UTF8';

-- Permissions

ALTER EXTERNAL TABLE public.ant_series OWNER TO gpadmin;
GRANT ALL ON TABLE public.ant_series TO gpadmin;

And it is working now.

Thank you for yor help to me!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants