Closed n0mn0m closed 6 years ago
@AlexHagerman do you have tests?
I don't have any test. At the time I wrote this I wasn't as familiar with Python test frameworks. I've since made some progress if this is something anybody wants I can look into what mocks or fixtures would help facilitate testing bcp with Pytest. Since bcp is from a flat file I'd be open to suggestions on any fixtures that might make sense. Also not sure what SQL Server integration testing there is in the travis build if any.
There's some discussion of bulk-loading in https://github.com/blaze/odo/issues/571 and another attempt at adding bcp functionality among other things in https://github.com/blaze/odo/pull/525
Added bcp functionality for odo within the framework of the other copy to/from flat file loaders. Tried to cover kwarg support for items like delimiter and newline settings. Using popen so that any error can be captured and populated. OSError will provide an error if bcp is not installed. One concern I have is building the Server.Database.Schema information. Currently I did this by slicing up the connection string that is given to sqlalchemy into a dict because I didn't see the server/db information in the element. Any feedback on a better way to accomplish retrieving that data that could be more stable would be appreciated.