load_from_hcatalog when templeton is not on namenode

Aster
Enthusiast

load_from_hcatalog when templeton is not on namenode

Hello guys,

I have a HDP instance that has templeton on a secondary node and so instead of my connector being:

CREATE VIEW aster_view AS
SELECT hcat_table.col1,
hcat_table.col2
FROM load_from_hcatalog (
ON mr_driver
server('name_node')
username('hdfs')
dbname('db')
tablename('tbl')
) AS hcat_table;

giving the error:

ERROR:  failed to access hcatalog table t_tfm_log: error connecting to the hcatalog templeton server

I have now since moved it to the node containing hive,


CREATE VIEW aster_view AS
SELECT hcat_table.col1,
hcat_table.col2
FROM load_from_hcatalog (
ON mr_driver
server('secondary_node')
username('hdfs')
dbname('db')
tablename('tbl')
) AS hcat_table;


- additionally changing AMC interface's SQL-H connector setting for the other node (makes no difference in the error output) 

and I get:


Giving the error:

ERROR:  SQL-MR function LOAD_FROM_HCATALOG failed: Failed to load hadoop classes : sqlh config not found for server secondary_node.

I assume it got to the templeton server but couldn't get the remaining jars or such. Any ideas?

1 REPLY
Teradata Employee

Re: load_from_hcatalog when templeton is not on namenode

 I tried running the  below query with our new Teradata version 14.10, SQL-H capability to query a Hortonworks Hadoop environment  enabled  and got an error.

SELECT

             CAST(Price AS DECIMAL (8,2))

             , mileage

             , CAST(make AS VARCHAR(20))

             , CAST(model AS VARCHAR(20))

      FROM load_from_hcatalog ( USING

                     server('sdll43.teradata.com')

                     port('9083')

                     username('hive')

                     dbname('default')

                     tablename('carpricedata')

                     columns('*')

                     templeton_port('50111')

) as dt;

>[Error] Script lines: 5-18 -------------------------

 [Teradata Database] [TeraJDBC 14.10.00.26] [Error 3707] [SQLState 42000] Syntax error, expected something like ';' between the word 'load_from_hcatalog' and '('. 

Does  load_from_hcatalog table function exists or if we need to do something special to make it available to everybody?

Please help .

Regards

Vishnu Gupta