Question: We are encountering the following error when loading a data file - that has two characters delimiter - to an Azure SQL Db
. What we may be doing wrong and how can the issue be resolved?
Using a Python
notebook in Azure Databricks, we are trying to load a data file into Azure SQL Db. The delimiter in the data file has two characters ~*
. On the following code we get the errors shown below:
pandas dataframe low memory not supported with the 'python' engine
Code:
import sqlalchemy as sq
import pandas as pd
data_df = pd.read_csv('/dbfs/FileStore/tables/MyDataFile.txt', sep='~*', engine='python', low_memory=False, quotechar='"', header='infer' , encoding='cp1252')
.............
.............
Remarks: If we remove the low_memory
option, we get the following error. Although with other data files that are even larger than this file but have delimiter with a single character, we don't get the following error.
ConnectException: Connection refused (Connection refused) Error while obtaining a new communication channel ConnectException error: This is often caused by an OOM error that causes the connection to the Python REPL to be closed. Check your query's memory usage.