Trying to get details from object and want to save it to SQL table.
$GetFiles `
| Select-Object -Property Name, Type `
| Write-SqlTableData -ServerInstance $SQLServer -DatabaseName $SQLDatabase -SchemaName $SQLSchema -TableName $SQLTable -Credential $SQLCredential -Force
Que.1. Above code fails with error. Removing Type column works. But any way to cast Type property to string?
Write-SqlTableData : A mapping between .Net type 'Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+FileType' and SQL type for column 'Type' was not found. Consider removing the column with that type and repeat the operation.
Que.2. I also want to add an extra column say RowInsertedDate which will have current timestamp and one more hardcoded column say LoadStatus having value "Started". How to add it select clause?
Que.3. Anyway to truncate this table and then write data to it?