forked from datacontract/datacontract-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support logical Types in Avro Export (datacontract#199)
* Support logical Types in Avro Export - Map Datacontracts date-type fields to avro logical types - date: `int/date` - timestamp, timestamp_tz: `long/timestamp-millis` - timestamp_ntz: `long/local-timestamp-millis` * Update CHANGELOG
- Loading branch information
1 parent
63ddf0f
commit 15e3e40
Showing
5 changed files
with
126 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
dataContractSpecification: 0.9.2 | ||
id: orders | ||
info: | ||
title: Orders | ||
version: 0.0.1 | ||
description: Order messages as generated by Confluent Datagen Source Adapter | ||
servers: | ||
production: | ||
type: kafka | ||
host: pkc-7xoy1.eu-central-1.aws.confluent.cloud:9092 | ||
topic: orders.avro.v1 | ||
format: avro | ||
models: | ||
orders: | ||
type: table | ||
description: My Model | ||
namespace: com.example.checkout | ||
fields: | ||
orderdate: | ||
type: date | ||
description: My Field | ||
order_timestamp: | ||
type: timestamp | ||
delivery_timestamp: | ||
type: timestamp_ntz | ||
orderid: | ||
type: int | ||
itemid: | ||
type: string | ||
orderunits: | ||
type: double | ||
address: | ||
type: object | ||
fields: | ||
city: | ||
type: string | ||
state: | ||
type: string | ||
zipcode: | ||
type: long | ||
quality: | ||
type: SodaCL | ||
specification: | ||
checks for orders: | ||
- row_count >= 5000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"type": "record", | ||
"name": "orders", | ||
"doc": "My Model", | ||
"namespace": "com.example.checkout", | ||
"fields": [ | ||
{ | ||
"name": "orderdate", | ||
"doc": "My Field", | ||
"type": "int", | ||
"logicalType": "date" | ||
}, | ||
{ | ||
"name": "order_timestamp", | ||
"type": "long", | ||
"logicalType": "timestamp-millis" | ||
}, | ||
{ | ||
"name": "delivery_timestamp", | ||
"type": "long", | ||
"logicalType": "local-timestamp-millis" | ||
}, | ||
{ | ||
"name": "orderid", | ||
"type": "int" | ||
}, | ||
{ | ||
"name": "itemid", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "orderunits", | ||
"type": "double" | ||
}, | ||
{ | ||
"name": "address", | ||
"type": { | ||
"type": "record", | ||
"name": "address", | ||
"fields": [ | ||
{ | ||
"name": "city", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "state", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "zipcode", | ||
"type": "long" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters