Skip to content

Import-DbaCsv failes with: RuntimeException: Unable to find type [Dataplat.Dbatools.Csv.Reader.CsvSchemaInference] #37

@andreasjordan

Description

@andreasjordan

The complete context "Context Type detection with SampleRows and DetectColumnTypes" of "Import-DbaCsv.Tests.ps1" fails:

Context Type detection with SampleRows and DetectColumnTypes
   [-] creates table with inferred types using SampleRows 191ms (184ms|6ms)
    RuntimeException: Unable to find type [Dataplat.Dbatools.Csv.Reader.CsvSchemaInference].
    at Get-InferredSchema, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:724
    at Import-DbaCsv<Process>, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:1098
    at <ScriptBlock>, C:\GitHub\dbatools\tests\Import-DbaCsv.Tests.ps1:731
   [-] creates table with inferred types using DetectColumnTypes (full scan) 179ms (178ms|1ms)
    RuntimeException: Unable to find type [Dataplat.Dbatools.Csv.Reader.CsvSchemaInference].
    at Get-InferredSchema, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:718
    at Import-DbaCsv<Process>, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:1098
    at <ScriptBlock>, C:\GitHub\dbatools\tests\Import-DbaCsv.Tests.ps1:767
   [-] infers varchar with correct max length instead of varchar(MAX) 181ms (181ms|1ms)
    RuntimeException: Unable to find type [Dataplat.Dbatools.Csv.Reader.CsvSchemaInference].
    at Get-InferredSchema, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:724
    at Import-DbaCsv<Process>, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:1098
    at <ScriptBlock>, C:\GitHub\dbatools\tests\Import-DbaCsv.Tests.ps1:798
   [-] detects nullable columns correctly 213ms (212ms|1ms)
    RuntimeException: Unable to find type [Dataplat.Dbatools.Csv.Reader.CsvSchemaInference].
    at Get-InferredSchema, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:724
    at Import-DbaCsv<Process>, C:\GitHub\dbatools\public\Import-DbaCsv.ps1:1098
    at <ScriptBlock>, C:\GitHub\dbatools\tests\Import-DbaCsv.Tests.ps1:832

It failes both on AppVeyor and on my local lab.

All code that uses [Dataplat.Dbatools.Csv.Reader.CsvSchemaInference] fails. This class is called inside of New-SqlTableWithInferredSchema and Get-InferredSchema inside of Inside-DbaCsv.

Can you add that class back in?

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