Skip to content

Got MethodInvocationException when using mssql to parquet #13

Description

@CM-MaxHuang

Windows version: windows server 2022
Power shell version: 7.3.9
SQL Server version: SQL Server 2019 Standard

I'm trying to export parquet from MSSQL server using Export-ToParquet.ps1 with Parquet.Net dependency.

I got theses message when I export decimal type from MSSQL
MethodInvocationException: Exception calling ".ctor" with "3" argument(s): "scale cannot be less than 1 (Parameter 'scale')

but the job still complete after this exception.

Here's my table schema and config file
schema:

CREATE TABLE [dbo].[DM_BedsClothes_2017](

        [Site] [varchar](4) NOT NULL,

        [Emplid] [nvarchar](10) NOT NULL,

        [BedClothes] [char](1) NOT NULL,

        [ReceiveDate] [varchar](10) NOT NULL,

        [Prices] [decimal](18, 0) NOT NULL,

        [CreateBy] [varchar](10) NOT NULL,

        [CreateOn] [smalldatetime] NOT NULL,

        [ModifyBy] [varchar](10) NOT NULL,

        [ModifyOn] [smalldatetime] NULL

) ON [PRIMARY]

config file:

Enabled,Database,JobName,Query,FilePath
1,"quickstart_db","select_test_job","select * from DM_BedsClothes_2017",".\Output\test2.parquet"

Should I convert the data type or other solution to solve this issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions