-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Feature Request: Specific select filters to run for source table #316
Comments
In the MySQL support we have the The main limitation I have for MS SQL support (bug fixes and enhancement) is having a working test environment with a database to play with containing real data etc. If you are in a position to provide the pgloader projet with that it would help tremendously! |
Thanks Dimitri, That materialized views feature is exactly what I need! I understand from reading the info about it why you cant just do aribtrary SQL. I tried to use the materialized view option against a MSSQL database and got the following parsing error, is that option available when used against MS SQL as opposed to MYSQL?
|
The option is now only available for MySQL, I will see what it takes to make it available for MS SQL. Always nervous about adding code I can't test myself... |
Cool thanks! Im not able to give you a database with data to test with, but if you do the work on a branch, I am more than happy to test it before you merge it to master? Just let me know on this issue and I can give it a go. |
Will do that then, next week tho, early week-end here ;-) |
Hi Dimitri, Just checking in to see if you have had any luck adding the views option to SQL Server, or if there is any code you want me to test yet? Thanks. |
No luck yet, still on my list, might have to wait another couple of weeks. I intend on delivering the feature on a branch for you to test, and when it's all good, to merge to master! |
In order to share more code in between the different source types, finally have a go at the quite horrible mess of anonymous data structures floating around. Having a catalog and schema instances not only allows for code cleanup, but will also allow to implement some bug fixes and wishlist items such as mapping tables from a schema to another one. Also, supporting database sources having a notion of "schema" (in between "catalog" and "table") should get easier, including getting on-par with MySQL in the MS SQL support (materialized views has been asked for already). See #320, #316, #224 for references and a notion of progress being made. In passing, also clean up the copy-databases methods for database source types, so that they all use a fetch-metadata generic function and a prepare-pgsql-database and a complete-pgsql-database generic function. Actually, a single method does the job here. The responsibility of introspecting the source to populate the internal catalog/schema representation is now held by the fetch-metadata generic function, which in turn will call the specialized versions of list-all-columns and friends implementations. Once the catalog has been fetched, an explicit CAST call is then needed before we can continue. Finally, the fields/columns/transforms slots in the copy objects are still being used by the operative code, so the internal catalog representation is only used up to starting the data copy step, where the copy class instances are then all that's used. This might be refactored again in a follow-up patch.
Could you test the current sources again? they don't contain the |
Thanks, I have tried to run it on current master branch and am getting this error on boot:
I ran the command: It does not even start loading data - it is happening on boot up. Let me know if you need more info. |
Also here is how I got all the views for a database:
|
In the previous refactoring patch that option mistakenly went away, although it is still needed for MS SQL and it is planned to make use of it in the other source types too... See #316 for reference.
This commit should fix the immediate problem, I fear some more will need an hand. If your next feedback contains another comparable mistake I will then fire my MS SQL testing environment (that tests only some schema definitions, but that's already that)... About the views query, can you test the |
Thanks! Re the query, I have played with that query, and it looks like all I had to do was filter the |
With the new build on master I am now getting the following error when I boot up:
Is this something I am doing wrong? |
Looks like it failed to find and load libssl now? |
It seems weird because it is the same docker image I am running it in when it was working before these changes. Here is the Dockerfile I am using, can you see any reason why it wouldnt work when libssl-dev is already installed?
|
In the meantime I did add a Dockerfile in pgloader: https://github.com/dimitri/pgloader/blob/master/Dockerfile; feel free to use it! I think you're missing the runtime support for SSL from the package |
hmmm, this is very weird, I have tried adding all your packages in your Dockerfile, including all the ssl ones, as well as updating my docker images caches and debian package caches and it still says:
Could it be something in my config file, or my connections? Im not sure what else has changed since it was working...
|
I just built an image docker from your docker file, just commenting out the two lines about freetds.conf, and it works well here:
|
See cl-plus-ssl/cl-plus-ssl#33 ; I guess the |
Added the “sponsor needed” tag. If you want Materialize View option for MS SQL, consider sponsoring the project thanks to its Moral License available here: http://pgloader.io/pgloader-moral-license.html. Send me an email (see my github's profile) to see about the details. |
HI there,
It would be great if there was some way to specify extra select where clauses that are executed on the source tables, either globally or for specific tables.
We have a ms sql server db with some huge tables, and the db seems to hang when trying to run a select across the whole table. We dont even need all the data, it would be great to just select rows that have been updated in the last year for certain tables...
Thanks.
The text was updated successfully, but these errors were encountered: