ParquetSharp should take into account "isAdjustedToUTC" for Timestamps
See original GitHub issueQuality of life improvement.
ParquetSharp by default returns DateTimes with DateTime.Kind
equal to Unspecified
.
ParquetSharp can be a bit smarter and use isAdjustedToUTC
field from the Parquet Format to specify the DateTime.Kind
as DateTime.Utc
By default, ParquetSharp uses new DateTime()
which returns an DateTime.Kind.Unspecified
variant.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
ParquetSharp's UTC adjustment
I have tried changing the DateTime with argument LogicalType.Timestamp(isAdjustedToUtc: false) but this causes an exception as the original data ...
Read more >isAdjustedToUtc: false · Issue #272 · G-Research ...
To briefly summarize, I just want to take the DateTime values in the original database column and write them to the parquet file...
Read more >Parquet tools should indicate UTC parameter for time/ ...
Parquet-tools should indicate if a time/timestamp is UTC adjusted or timezone agnostic, the values written by the tools should take UTC ...
Read more >Parquet has both a date type and the datetime ...
“Parquet has both a date type and the datetime type (both sensibly recorded as integers in UTC).” What does it mean for a...
Read more >How to load logical type TIMESTAMP data from Parquet ...
Data in Parquet files that are of logical type TIMESTAMP with adjustedToUTC=false are not supported by Snowflake, and are loaded as "Invalid ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
HI @adamreeve
Just a small follow up… So I have been feeding you the wrong information before.
Azure Synapse Serverless only supports
isAdjustedToUTC=true
And we do actually save “locally adjusted” DateTime’s to Parquet, so gettingDateTimeKind.UTC
is kinda of a pain.For now I have implemented a workaround
And ill try and open up a ticket with Microsoft for an actual solution that will allow use to use
isAdjustedToUtc=false
Yes the proposed change only affects reading Parquet data into dotnet DateTime values. When writing DateTimes, we currently default to using
isAdjustedToUtc: true
, and there isn’t really a way to infer what this should be so we’re not suggesting changing how data is written.So from what you’re saying, it sounds like you already need to specify
isAdjustedToUtc: false
when writing files for compatibility with Azure Synapse Serverless. And there probably isn’t a need to make the default reading behaviour configurable then.