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

Support logicalTypes #27

Open
smyrman opened this issue Apr 10, 2019 · 0 comments
Open

Support logicalTypes #27

smyrman opened this issue Apr 10, 2019 · 0 comments

Comments

@smyrman
Copy link

smyrman commented Apr 10, 2019

Support setting logicalTypes in scema, e.g.:

var floatAvroSchema = avro.MustParseSchema(`{
		"type": "record",
		"name": "FloatRecord",
		"fields": [
			{ "name": "time",  "type": "long", "logicalType": "timestamp-micros"},
			{ "name": "value",  "type": "double"}
		]
}`)

Cutrrently, when parsed, the "logicalType" key is dropped, as there is no field for it in SchemaField.

This is useful e.g. when importing data to Google BigQuery with --use_avro_logical_types:
https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-avro#logical_types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant