Use Logical type instead type in generate #231
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Chr.Avro supports mapping the To customize your generated schemas, you can use the We’d be open to supporting |
Beta Was this translation helpful? Give feedback.
-
Thanks!
From: Dan Stelljes ***@***.***>
Sent: Monday, April 17, 2023 6:03 AM
To: ch-robinson/dotnet-avro ***@***.***>
Cc: Kring, Tom ***@***.***>; Comment ***@***.***>
Subject: [EXTERNAL] Re: [ch-robinson/dotnet-avro] Use Logical type instead type in generate (Discussion #231)
Try using "type": "long" instead of "type": "int" for your timestamp field. "timestamp-millis" only applies to longs. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented. Message
ZjQcmQRYFpfptBannerStart
Warning! This email comes from outside the company.
This message came from outside of Itron, if you suspect it to be spam, please delete it or if you suspect a phishing attempt, please report it using the Phish Alert Report button. Be careful and think before you click.
ZjQcmQRYFpfptBannerEnd
Try using "type": "long" instead of "type": "int" for your timestamp field. "timestamp-millis" only applies to longs.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/ch-robinson/dotnet-avro/discussions/231*discussioncomment-5636905__;Iw!!F7jv3iA!0OeGMXs-K_UnwuRMvpASefGQNXpmVHc7A1qfVqwGc3TsZi-6sXr-GfcSuSIa82mpkL3ZpQ8FACtkZ-jHXJL47jU$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AAJJQ23QEXMDDW6CYMQQLRLXBU5O3ANCNFSM6AAAAAAQSOIECE__;!!F7jv3iA!0OeGMXs-K_UnwuRMvpASefGQNXpmVHc7A1qfVqwGc3TsZi-6sXr-GfcSuSIa82mpkL3ZpQ8FACtkZ-jHUj5xRn8$>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
Chr.Avro supports mapping the
"timestamp-millis"
and"timestamp-micros"
logical types toDateTime
, so you could use one of those. It doesn’t support mapping"date"
toDateTime
due to the lack of a time component (see the docs).To customize your generated schemas, you can use the
--temporal-behavior
flag on the CLI or thetemporalBehavior
parameter onSchemaBuilder
.We’d be open to supporting
"date"
with the newDateOnly
type, but we don’t have that functionality presently.