Troubleshooting Guide: PolyBase Error 8714 — Failed to Convert External Data Format
Why This Error Happens
Error 8714 typically occurs when PolyBase encounters a data type or schema mismatch between the external data source file (CSV, Parquet, ORC) and the external table definition created in SQL Server. This often stems from incorrect column data types, unexpected NULL values in non-nullable columns, or malformed rows (such as inconsistent delimiters or encoding issues) within the source file. Additionally, outdated PolyBase connectors or corrupted ODBC/JDBC drivers on Windows Server 2025 can misinterpret the external file format, triggering this conversion failure.
Step-by-Step Resolution Guide
Step 1: Validate the External Table Schema Against Source Data
- Open SQL Server Management Studio (SSMS) and run
sp_help 'YourExternalTableName'to review the defined column data types. - Compare these types against the actual source file schema (e.g., open the CSV in a text editor or use
Get-Content -Path "C:\Data\source.csv" -TotalCount 5in PowerShell to inspect the first few rows). - Pay close attention to precision/scale mismatches on DECIMAL or NUMERIC columns, as these are the most common cause of Error 8714.
Step 2: Check for Malformed Rows or Null Handling Issues
- Enable PolyBase rejection logging by setting
REJECT_TYPE = VALUEandREJECT_VALUE = 10(or a higher threshold) in yourCREATE EXTERNAL TABLEstatement to allow logging instead of a hard failure. - Locate the rejected rows log, typically found in the PolyBase data movement directory:
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\PolybaseErrorLogs\ - Open the
.rejectedrowsfile in this directory to identify the exact row and column causing the conversion failure.
Step 3: Repair or Reinstall the PolyBase Connectivity Components
- Open Services.msc and restart both SQL Server PolyBase Engine and SQL Server PolyBase Data Movement Service.
- If the error persists, navigate to Control Panel > Programs > SQL Server 2025 Setup and select Repair on the PolyBase Query Service for External Data feature.
- Verify the external data source connection string does not have a trailing slash or incorrect port number, as this can cause the engine to misread file headers during format conversion.
Step 4: Update Statistics and External File Format Object
- Drop and recreate the
EXTERNAL FILE FORMATobject to ensure theFIELD_TERMINATOR,STRING_DELIMITER, andDATE_FORMATsettings exactly match the source file’s current configuration. - Run
UPDATE STATISTICSon the external table to refresh metadata cached by the SQL Server engine regarding the file format.
Alternative or Verification Steps
- Verify the Fix: Run a simple
SELECT TOP 10 * FROM YourExternalTableName;query. If the data returns without triggering Error 8714, the schema/format mismatch has been resolved. - Alternative Solution: If the error continues specifically with Parquet or ORC files, bypass the native PolyBase connector by using Azure Data Studio to export the data to a standard flat-file CSV format first, then re-import it to isolate whether the issue is file-format specific.