bcpy
bcpy copied to clipboard
Python Wrapper for Microsoft SQL Server bcp Utility
fix error to_csv() got an unexpected keyword argument 'line_terminator' in data_objects.py
Was not possible to set the parameter -u that permit Trust server certificate. (available since bcp version 18). https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/connecting-with-bcp?view=sql-server-ver16 I did the modification below and works: def bcp(sql_table, flat_file, batch_size):...
In pandas 1.5, the parameter `line_terminator` of the `to_csv` function was renamed to `lineterminator` (see [here](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html)). This seems to break bcpy as the following error message shows: ``` File "...\bcpy\data_objects.py",...
I'm running the following code in my Python job on Ubuntu 22.04: ```python bdf = bcpy.DataFrame(df) sql_table = bcpy.SqlTable(self.cnxns["sql_config"], table=f"{table_name}_temp") bdf.to_sql(sql_table) ``` This works fine when called manually, however when...
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...
If I load data from a DataFrame which has foreign characters such as äöü, the import loads garbage. To fix that you would need in the bcp command option: '-C...
Where can i provide datatype parameter for each column in SQL Server 'bcpy.SqlTable' or 'bdf.to_sql'. Also where can I provide drop table if exist?
Love this library big time. I installed bcp utils on a new machine recently and was having issues getting it to run. Further investigation revealed this error was being thrown...
Would it be possible to add support for trusted_connection -T parameter?
I would like to request the ability to send additional arguments to the BCP utility when calling the DataFrame.to_sql method. In particular, I would like to be able to send...