Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text, next, timestamp, rowversion data type support #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Function Export-Table
$sqlDataTypes += [SqlDataTypes]::bit
continue
}
{$_ -in @("nvarchar", "varchar", "nchar", "char") } {
{$_ -in @("nvarchar", "varchar", "nchar", "char", "ntext", "text") } {
$dataType = [string]
$column = [ParquetSharp.Column[string]]::new($columnName)
$sqlDataTypes += [SqlDataTypes]::string
Expand Down Expand Up @@ -330,13 +330,13 @@ Function Export-Table
$sqlDataTypes += [SqlDataTypes]::decimal
continue
}
{$_ -in @("binary", "varbinary") } {
{$_ -in @("binary", "varbinary","rowversion","timestamp") } {
$dataType = [byte[]]
$column = [ParquetSharp.Column[byte[]]]::new($columnName)
$sqlDataTypes += [SqlDataTypes]::binary
continue
}
Default { throw "Not Implemented" }
Default { throw "Data Type ""$_"" Not Implemented" }
}

$columnsArray.Add($column) | Out-Null
Expand Down Expand Up @@ -394,7 +394,7 @@ Function Export-Table
[DateTimeOffset]$dto = $reader.GetDateTimeOffset($i)
$val = $dto.ToString("yyyy-MM-dd HH:mm:ss.fffffff zzz", [cultureinfo]::InvariantCulture) }
}
else { throw "Not Implemented" }
else { throw "Data Type ""$sqlDataType"" Not Implemented" }

[void]$data[$columnNames[$i]].Add($val)
}
Expand Down Expand Up @@ -460,4 +460,4 @@ if ($DebugMode) {
Write-Host "Program Start Time: ", $startTime -ForegroundColor Green
Write-Host "Program Finish Time: ", $finishTime -ForegroundColor Green
Write-Host "Program Elapsed Time: ", ($finishTime-$startTime) -ForegroundColor Green
}
}