zillow / ctds

Python DB-API 2.0 library for MS SQL Server
MIT License
83 stars 12 forks source link

Bulk copying empty iterables #36

Closed kadrach closed 5 years ago

kadrach commented 5 years ago
connection.bulk_insert(table, <empty iterable, e.g. csv reader with no rows>)

throws a DatabaseError: None. The (free)bcp utilities happily copy "0 rows".

Some mailing list necromancy lead me to this thread and this example.