bcpy
bcpy copied to clipboard
bcpy not working with single nvarchar(max) column
Hi, I am having troubles uploading data from .csv's with 1 nvarchar column. I tried both creating the table myself as well as letting bcp instantiate its own. The code works just fine for any other .csv with more than 1 column. I'm using bcpy 0.1.8.
The code snippet looks roughly like this:
data_frame = pd.read_csv(csv_file_path, sep=delimiter, encoding='utf8', dtype=str)
df= bcpy.DataFrame(data_frame)
exec_sql = bcpy.SqlTable(sql_connection, table=table_name)
df.to_sql(exec_sql, use_existing_sql_table=True)