Comments (7)
@myahl You're correct, I should add that to the docs. I also have an outstanding issue (#11) to specify it on the Connection instance. I might actually get to that in the next few weeks.
from bcp.
Hey Eric, I have been able to follow what you and Mike are discussing and am wondering what you mean by "solved by directly adjusting the bcp command line through python"? You are changing the output from the library and then calling the execution?
from bcp.
Python directly calls the external command /opt/mssql-tools/bin/bcp....
from bcp.
Good catch. The readme is incorrect. DataFile() is expecting a Path object, not a string. I should probably handle that in the class itself and allow a string to be passed in. In the meantime, import pathlib.Path and wrap your file_path in Path().
from bcp.
Added path lib, the operation is still wrong, compared to the bcp command line, found that Python BCP originally lacked the database option -d.
currently it is solved by directly adjusting the bcp command line through python.
hope there is time to change the readme. Thank you!
from bcp.
close issue temporarily
from bcp.
@ericwang321 I don't understand how to specify the database option either.
Added path lib, the operation is still wrong, compared to the bcp command line, found that Python BCP originally lacked the database option -d.
currently it is solved by directly adjusting the bcp command line through python.
This doesn't really clear it up for me.
Python directly calls the external command /opt/mssql-tools/bin/bcp....
What exactly do I need to do in order to specify the database?
Edit: Never mind. I see in the tests that you're specifying it as part of the table name database.schema.table
. This could probably be made clearer in the docs though.
from bcp.
Related Issues (10)
- Change license to Apache 2.0 HOT 1
- Add encryption for writing/reading the data file
- Return values for dump() and load() are unnecessary, and could be misleading HOT 1
- Add database and schema as optional parameters for the Connection class HOT 1
- Setup CI/CD
- How to set batch_size,port,character paramter? HOT 4
- Missing `-o` option on Mac HOT 2
- subprocess.popen throws "File name too long" on Mac HOT 4
- Add "skip headers" argument (-F in BCP CLI)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcp.