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

Issues with numeric datatype while dumping data from mssql to postgress #1619

Open
4 of 7 tasks
fwt-parth-jariwala opened this issue Oct 28, 2024 · 1 comment
Open
4 of 7 tasks

Comments

@fwt-parth-jariwala
Copy link

fwt-parth-jariwala commented Oct 28, 2024

Thanks for contributing to pgloader by reporting an
issue! Reporting an issue is the only way we can solve problems, fix bugs,
and improve both the software and its user experience in general.

The best bug reports follow those 3 simple steps:

  1. show what you did,
  2. show the result you got,
  3. explain how the result is not what you expected.

In the case of pgloader, here's the information I will need to read in your
bug report. Having all of this is a big help, and often means the bug you
reported can be fixed very efficiently as soon as I get to it.

Please provide the following information:

  • pgloader --version

    3.6.1
    
  • did you test a fresh compile from the source tree?

    Compiling pgloader from sources is documented in the
    README, it's
    easy to do, and if patches are to be made to fix your bug, you're going
    to have to build from sources to get the fix anyway…

  • did you search for other similar issues?

  • how can I reproduce the bug?

    Incude a self-contained pgloader command file.

    If you're loading from a database, consider attaching a database dump to
    your issue. For MySQL, use mysqldump. For SQLite, just send over your
    source file, that's easy. Maybe be the one with your production data, of
    course, the one with just the sample of data that allows me to reproduce
    your bug.

    When using a proprietary database system as a source, consider creating
    a sample database on some Cloud service or somewhere you can then give
    me access to, and see my email address on my GitHub profile to send me
    the credentials. Still open a public issue for tracking and as
    documentation for other users.

--
-- pgloader.conf
--

LOAD DATABASE
    FROM mssql://userName:password@mssqlHostName:1433/mssqlDBName
    INTO postgresql://userName:password@postgressHostName:5433/postgresDBName
ALTER SCHEMA 'dbo' RENAME TO 'public'
CAST
    type decimal to decimal using float-to-string,
    type numeric to numeric using float-to-string
SET work_mem to '16MB', maintenance_work_mem to '512MB';
  • pgloader output you obtain
PASTE HERE THE OUTPUT OF THE PGLOADER COMMAND
  • data that is being loaded, if relevant
PASTE HERE THE DATA THAT HAS BEEN LOADED
  • How the data is different from what you expected, if relevant

in mssql my datatype is numeric(18,4) and value is 19942031.0000
while after dumping datatbase same column's datataype is numeric(18,4) and its value is 19942032.0000
and many more value got rounding up and down

mssql:

image

postgress:

image

@inoa-dmpassy
Copy link

Basically the same as me:
#1615

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