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

Export datatype mapping defaults not appropriate #33842

Open
packfan73 opened this issue May 22, 2024 · 6 comments
Open

Export datatype mapping defaults not appropriate #33842

packfan73 opened this issue May 22, 2024 · 6 comments

Comments

@packfan73
Copy link

When performing an export of tables between RDBMS's the datatype choices are very odd and can cause issues when trying to do a large group of tables and allowing DBeaver to create the table.

A couple examples:

Oracle LONG RAW, BLOB or CLOB will select the varbinary(1) or varchar(1) when creating the column and not the varbinary(max) or varchar(max) option when transferring to SQL Server.

Oracle number(38) becomes just an integer column on the SQL Server side when it probably should be something like numeric(38).

I would like a way to define these myself, the defaults changed or a way to provide an override to these choices. I have done some searching on this and haven't found anything in the menu's or settings that would do it. Perhaps I am missing it.

@E1izabeth
Copy link
Member

It is configurable. Please refer to our documentation for more information: https://dbeaver.com/docs/dbeaver/Data-Migration/#column-mapping

@packfan73
Copy link
Author

Hi,

I have used the way shown in the documents to click the configure button and then modify the target datatypes. What I am looking at is a way to edit the way datatypes are chosen. As in my example the Oracle table has LONG RAW and many NUMBER (X,X) tables. If we want to say select 100 tables for export to a SQL Server I would like the mapping to be globally edited to be NUMBER(38,0) -> NUMERIC(38,0) and LONG RAW -> VARBINARY(MAX).

I don't see any global place to change that, just the individual table editing of columns, which may be many columns in a table over many tables.

Is that something that requires using the commercial version to get or is there some other way to do it I am totally missing(very possible).

Thanks for your time.

@E1izabeth
Copy link
Member

Currently there is no global mapping

@packfan73
Copy link
Author

Thanks. How is the target DDL created? Are those determined by the DB drivers used? There must be something that tells DBeaver to map a certain datatype to the datatype on the destination that it uses to generate the create table DDL.

Thanks again.

@E1izabeth
Copy link
Member

We rely on the data kind, name and length to map the data types.

@arhayka arhayka added this to the 24.1.5 milestone Jun 12, 2024
@arhayka
Copy link
Member

arhayka commented Jun 12, 2024

Thank you for the idea!
We decided to add the ability to define a mapping on data transfer for certain data types for certain databases.

@arhayka arhayka modified the milestones: 24.1.5, 24.2.3 Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants