Skip to content

Failing test on sql server datatypes #751

@Peterdha

Description

@Peterdha

This issue seems similar to [https://github.com//issues/662] but for sqlserver
Using the product table from sql server Adventureworks sample database I generated DDL.
Already there needed to do some edits as it didn't recognize the 'money' datatype.

CREATE TABLE [SalesLT].[Product]( [ProductID] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](50) NOT NULL, [ProductNumber] [nvarchar](25) NOT NULL, [Color] [nvarchar](15) NULL, [StandardCost] [decimal](8, 2) NOT NULL, [ListPrice] [decimal](8, 2) NOT NULL, [Size] [nvarchar](5) NULL, [Weight] [decimal](8, 2) NULL, [ProductCategoryID] [int] NULL, [ProductModelID] [int] NULL, [SellStartDate] [datetime] NOT NULL, [SellEndDate] [datetime] NULL, [DiscontinuedDate] [datetime] NULL, [ThumbNailPhoto] [varbinary](max) NULL, [ThumbnailPhotoFileName] [nvarchar](50) NULL, [rowguid] [uniqueidentifier] NOT NULL, [ModifiedDate] [datetime] NOT NULL )

Then imported the CREATE TABLE statement and wrote out the datacontract:
tst_dc = DataContract().import_from_source(format='sql',source='product_DDL.sql',dialect='tsql')

Image

Testing the generated contract against the same table yields below failures:

Image

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