Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

SQL Server Polybase External Table with Hadoop HDFS issue

$
0
0

I am getting the following error accessing the HDFS file, the interesting things is ,PolyBase is connecting to HDFS and trying to access the correct file but somehow resulting into error, can't figure-out why ? Please find the External configuration below

Error:

Msg 7320, Level 16, State 110, Line 33

Cannot execute the query "Remote Query" against OLE DB provider "SQLNCLI11" for linked server "(null)".

 HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: BlockMissingException: Could not obtainblock: BP-243674277-172.17.0.2-1529333510191:blk_1073743046_2226 file=/user/raj_ops/TP/Sacramentorealestatetransactions.csv

external table configuration


CREATE DATABASE SCOPED CREDENTIAL Hadoop_Cred WITH IDENTITY = 'raj_ops', Secret = 'raj_ops';
GO
CREATE EXTERNAL DATA SOURCE MyHadoopCluster WITH (  
      TYPE = HADOOP,
      LOCATION ='hdfs://192.168.0.107:8020',
      CREDENTIAL = Hadoop_Cred
);
CREATE EXTERNAL FILE FORMAT Hadoop_file_format WITH (  
      FORMAT_TYPE = DELIMITEDTEXT,
      FORMAT_OPTIONS (FIELD_TERMINATOR =',',
            USE_TYPE_DEFAULT = TRUE))

            DROP EXTERNAL TABLE HDFS_File

CREATE EXTERNAL TABLE [dbo].HDFS_File
(  
street nvarchar(500),city nvarchar(500),zip nvarchar(500),[state] nvarchar(500),beds nvarchar(500),baths nvarchar(500),sq__ft nvarchar(500),[type] nvarchar(500),sale_date nvarchar(500),
price nvarchar(500),latitude nvarchar(500),longitude nvarchar(500)
)  
WITH (  
      LOCATION = N'/user/raj_ops/TP/Sacramentorealestatetransactions.csv',  
      DATA_SOURCE =MyHadoopCluster,  
      FILE_FORMAT =Hadoop_file_format,  
      REJECT_TYPE = VALUE,  
      REJECT_VALUE = 0  
);

SELECT * FROM HDFS_File




Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>