1

I have a simple pipe delimited file (newfile.txt) on my hdfs and I have configured my polybase correctly. I am having a tough time to import this file into my SQL Server using Polybase. Here are the queries:

At first an external file format is created:

CREATE EXTERNAL FILE FORMAT TextFile 
WITH (  
    FORMAT_TYPE = DELIMITEDTEXT  
    , FORMAT_OPTIONS ( Field_Terminator = '|',
      USE_TYPE_DEFAULT = TRUE));

Second, the data source for Hadoopcluster is created:

CREATE EXTERNAL DATA SOURCE HadoopCluster
    WITH (   
        TYPE = HADOOP,
        LOCATION = 'hdfs://10.153.14.11:8020'  
    )

Finally, the external table is created which imports the data from hdfs:

create external table tmpExternal
(
    patientEncounter varchar(8000),
    PtAcctNo varchar(200)) 
    with (location = '/user/newfolder/',
          data_source = HadoopCluster,
          file_format = TextFile,
          reject_type = value,
          reject_value = 0);

After running the above query, here is the error which I end up getting:

Msg 596, Level 21, State 1, Line 26
Cannot continue the execution because the session is in the kill state.

Msg 0, Level 20, State 0, Line 26
A severe error occurred on the current command. The results, if any, should be discarded.

I am sure that there is no issue with disk space. Please assist.

UPDATE: HDP 2.5 version is being used. I have installed Polybase successfully and this is my first external table I am trying to import from hdfs.

Format of the txt file has 2 rows and 2 columns:

1234|abcd

5676|efgh

user3838498
  • 29
  • 1
  • 1
  • 5
  • Can you post some sample data? Also, have you [installed and enabled](https://learn.microsoft.com/en-us/sql/relational-databases/polybase/get-started-with-polybase) Polybase? Have you got other external tables working successfully or is this the first one? In terms of security, how are you connecting? What version is the Hadoop installation (Hortonworks HDP x.x or Cloudera CDH)? – wBob Apr 26 '17 at 06:19
  • There is no `CREDENTIAL` in your external data source definition? – wBob Apr 26 '17 at 06:20
  • UPDATE: HDP 2.5 version is being used. I have installed Polybase successfully and this is my first external table I am trying to import from hdfs. Format of the txt file has 2 rows and 2 columns: 1234|abcd 5676|efgh – user3838498 Apr 27 '17 at 19:19

2 Answers2

0

Did you get this fixed? I just spent 3 weeks with the SQL Product group to track down this issue.

In my case, we had EVENT NOTIFICATIONS set up to notify of DDL changes. It is a bug in their code and will be a future CU. If you have event notifications, drop them and try again.

Hope this helps.

  • Any luck with this issue? We are trying to move around 5 million records from SQL table backed by mdf file to external table using polybase. It fails with same error. We could see mpdwsvc.exe is crashing in DB server prior to this exception. – Joy George Kunjikkuru Sep 06 '17 at 01:15
0

This can be caused due to various reasons, for us this error occurred while loading data into external tables. data contains date column with data containing dates older than 1970-01-01 and later to 2038-01-18 which was causing this error