Skip to content
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

TypeError from mssql to mysql, using column_schema_transformation_file #35

Open
agustincl opened this issue May 28, 2018 · 2 comments
Open

Comments

@agustincl
Copy link

agustincl commented May 28, 2018

Hello there,

I'm trying to use the tool to move some data from mssql to mysql with a transformation on some columns.

To simplify the case I'm using just one table.

Here the code.

# coding: utf-8
from etlalchemy import ETLAlchemySource, ETLAlchemyTarget
from os import getcwd
from tomoney import *
import os

mssql_db_source = ETLAlchemySource(
    conn_string="mssql+pymssql://user:[email protected]:51870/Test",
    included_tables=['Clients'],
    column_schema_transformation_file=getcwd() + "/column_mappings.csv",
)

mysql_db_target = ETLAlchemyTarget("mysql://root:[email protected]/test", drop_database=True)
mysql_db_target.addSource(mssql_db_source)
mysql_db_target.migrate()
  1. For a transformation from varchar(25) to text

Here column_mappings.csv

Column Name,Table Name,New Column Name,New Column Type,Delete
Username,Clients,,Text,False

And the response

TypeError: unbound method _compiler_dispatch() must be called with Text instance as first argument (got MySQLTypeCompiler instance instead)

And no matter how I configure the column_mappings.csv I get this error always.

Some help will be appreciated.

@mdubit
Copy link

mdubit commented Sep 3, 2018

Hi,

Have you solved this problem ? I have exactly the same. Except with the PostgreSQL driver:

TypeError: unbound method dialect_impl() must be called with TEXT instance as first argument (got PGDialect_psycopg2 instance instead)

@agustincl
Copy link
Author

@mdubit No solution until now. But using SQLAlchemy directly has been quite good. I have some code to share if you need it!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants