Error: Unsupported SMO DataType: numeric #9526
Unanswered
AndreKonijnendijk
asked this question in
Q&A
Replies: 1 comment 4 replies
-
can you run on the latest dbatools version with -Verbose ? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to import a csv file downloaded from an AS400.
But I keep getting an error "Unsupported SMO DataType: numeric".
Processing only alphanumeric fields is working fine, but when I try to import a numeric field, this error is thrown.
The strange thing is, the same script is working on one machine, but not on my local machine!!!!
Can you help me with solving this problem?
The Importfile is attached
Testimport.csv
The code for processing the import:
$index = 0
$Columnmap = New-Object System.Collections.Hashtable
Function Import-FktDbaCsv {
[cmdletbinding()]
Param
(
[Parameter(Mandatory = $true)]
[hashtable]$Parameters
)
# With splatting
# Note SqlBulkCopy is case sensitive e.g. with column names
# ENSURE all values for source column name are valid and case sensitive.
# ENSURE all values for destination column name are valid and case sensitive.
# MAKE the source case insensitive
Import-DbaCsv -SqlCredential (Get-FktUSoftCredential) -SqlInstance (Get-ServerName) -EnableException -NoHeaderRow -NoProgress @parameters
}
The Error I'm getting: error.txt
The columnmapping:
Colomnmap.log
Definition of the table:
table.txt
Beta Was this translation helpful? Give feedback.
All reactions