Help on HDFS_READ() function



IBM's flagship relational database management system

Help on HDFS_READ() function

Postby gopurs » Tue Dec 11, 2018 3:20 am

Does anyone used the below HDFS_READ user defined function in Mainframe to read data from Hadoop - Data Lake to Mainframe. I am running the below query in Mainfram QMF to read a file in HDFS(Hadoop Distributed File system) and getting SQL error -443.


SELECT * FROM TABLE(                                                          
HDFS_READ(                                                                    
'http://<userid>:password@<servername>:<portno>/webhdfs/v1/user/admin/test.csv',                        
'DELIMITER=,'))                              
AS T1(C1 char(4), c2 char(5));


Error
An error occurred while processing the results. - ROUTINE HDFS_READ (SPECIFIC NAME HDFS_READ) HAS RETURNED AN ERROR SQLSTATE WITH DIAGNOSTIC TEXT Error due to no/unexpected HTTP return/content typ. SQLCODE=-443, SQLSTATE=38362, DRIVER=4.18.60


we also opened the trace in IBM DB2 and got the below message.

checkOperation rc=-1

Unexpect return, line=HTTP/1.1 307 TEMPORARY_REDIRECT
parseGetResponse rc=-1

Any help in resolving this error will be highly appreciated.

HDFS Version 2.7.3
gopurs
 
Posts: 3
Joined: Fri Sep 09, 2016 10:30 am
Has thanked: 0 time
Been thanked: 0 time

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post