基于apache avro构建的通用功能
data_pipeline_avro_util的Python项目详细描述
#数据管道avro util
它是什么?
——
数据管道avro实用程序包提供了一个pythonic接口,用于读取和写入avro模式。它还为元数据提供了枚举类
,我们发现这些元数据有助于包含在架构中。
测试
```
````
用法
-
使用avro架构生成器:
````
_builder.开始记录(
name=“test_name”,
namespace=“test_namespace”,
doc=“test_doc”
)
avro_builder.add_field(
name=“key1”,
typ=“string”,此字段的数据类型为string
doc=“test_doc1”,
元数据={
avrometadatakeys.primary嫒key:1 first primary key
}
)
avro_builder.add_field(
name=“key2”
typ=“string”
doc=“test_doc2”
record_json=avro_builder.end()
print record_json
{
“type”:“record”,
“namespace”:“test_namespace”,
“name”:“test_name”,
“doc”:“test_doc”,
“fields”:[
{“type”:“string”,“doc”:“test_doc1”,“name”:“key1”,“pkey”:true},
{“type”:“string”,“doc”:“test_doc2”,“name”:“key2”}
]
}
````
运行代码并与其他应用程序集成可能需要额外的工作。
许可证
----
数据管道avro util是在apache许可证下获得许可的,版本2.0:http://www.apache.org/licenses/license-2.0
contribution
----
鼓励每个人通过分叉github存储库并发出拉取请求或打开问题来贡献数据管道avro-util。
documentation
-
(datapipe-2030 abrar):将服务文档上载到公共服务器。
history
----
0.1.0(2015-01-29)
+++++++++++++++
它是什么?
——
数据管道avro实用程序包提供了一个pythonic接口,用于读取和写入avro模式。它还为元数据提供了枚举类
,我们发现这些元数据有助于包含在架构中。
测试
```
````
用法
-
使用avro架构生成器:
````
_builder.开始记录(
name=“test_name”,
namespace=“test_namespace”,
doc=“test_doc”
)
avro_builder.add_field(
name=“key1”,
typ=“string”,此字段的数据类型为string
doc=“test_doc1”,
元数据={
avrometadatakeys.primary嫒key:1 first primary key
}
)
avro_builder.add_field(
name=“key2”
typ=“string”
doc=“test_doc2”
record_json=avro_builder.end()
print record_json
{
“type”:“record”,
“namespace”:“test_namespace”,
“name”:“test_name”,
“doc”:“test_doc”,
“fields”:[
{“type”:“string”,“doc”:“test_doc1”,“name”:“key1”,“pkey”:true},
{“type”:“string”,“doc”:“test_doc2”,“name”:“key2”}
]
}
````
运行代码并与其他应用程序集成可能需要额外的工作。
许可证
----
数据管道avro util是在apache许可证下获得许可的,版本2.0:http://www.apache.org/licenses/license-2.0
contribution
----
鼓励每个人通过分叉github存储库并发出拉取请求或打开问题来贡献数据管道avro-util。
documentation
-
(datapipe-2030 abrar):将服务文档上载到公共服务器。
history
----
0.1.0(2015-01-29)
+++++++++++++++