-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk Loaders and Exports #571
Comments
I've previously used In this instance I've got a bit of Refs:
|
Can you give me some more insight on what made bcp feel icky? My current usage does feel like a hack, but just curious if you had more details on that. I'll look into MS-TDS. Sounds like an interesting opportunity, I'll be curious to consider the scale since you mentioned it being a big project. Today I implemented an mssql CopyToCSV, that said I'm not in love with it. It works, but it feels like a hack, a lot of that is the bcp component. startup.py
odo/backends/sql.py
So there are a lot of reasons I don't like this. First it doesn't actually use sqlalchemy for anything but to be part of the compile decorated function pattern that's already present. Because of that it feels hacky, and I have to use the connection string to build up the bcp command. It's also just issuing a command on What is nice is that for somebody using odo for sql -> to csv for a table export it's very fast, the usage is still just odo(mssql_source, csv_dest) and it routes with the sqlalchemy compiler which makes the discovery the same as the other sql.py CopyToCSV database functions. That said this was a first pass for me today just digging into the odo internals a bit more and seeing if I could get this working. I need to spend more time working with the odo graph and it's arrival at the If you have any suggestions or concerns please let me know as I'm not married to this, but want to provide some form of working sql server bulk operation for odo. That may be MS-TDS I'll look into that this week and see what it is all about as well as exploring of sqlalchemy already has some MS-TDS extension available. |
Writing anything to disk is slow. Since there's no reason why you should have to do that it's not a great solution IMHO (except in the fact that it works and gives a good performance boost). If |
It's a perfectly good solution - I just think implementing the TDS protocol directly would be a better solution, but also a lot more work so this is a good improvement on what's currently available. NB: I'd probably use |
Got it, that makes a lot of sense. Thank you for all the references, insight and feedback. I'll dig into these and see if I can figure something different out this week. |
Like I say - this is a good fit for now - |
Understood. I'll work on a bcp in function for |
There's pymssql/pymssql#279 requesting bulk load support, which points to another library (https://github.com/zillow/ctds), which implements bulk insert, though it does not yet have fully working SQLAlchemy integration (zillow/ctds#6). |
I don't think much is happening with odo today. I'll checkout the referenced pymssql issue and the zillow implementation. Thanks @nickolay |
Hi,
I've used odo in some of my smaller projects and enjoy it, but with others the current data migrations I do use pyodbc and calls to utilities like bcp and nzload due to the size of the data I am importing/exporting.
I don't see much documentation around utilities like these in Odo, but I did see that pg_bulkload was not implemented yet.
I was wondering if there was any movement in this space and if there is on boarding documentation for somebody that might like to assist or work on some contributions relating to these bulk import/export utilities? If that doesn't fit the project any ideas or suggestions for somebody interested in creating an extension library for Odo with these utilities?
Thanks.
The text was updated successfully, but these errors were encountered: