Comments (9)
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
from gplink.
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.
from gplink.
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.
from gplink.
Can you provide the external table DDL that gplink created?
from gplink.
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."
from gplink.
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;
from gplink.
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.
from gplink.
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
from gplink.
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!!!
from gplink.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gplink.