Description Usage Arguments Value Examples
Convenience function for ensuring that Avro type schemas are declared exactly once. It returns a function that yields a full type declaration the first time it is invoked and just a name on subsequent times.
1 |
... |
key-value pairs of Avro type schemas |
a function that yields Avro type schemas or just their names
1 2 3 4 5 6 7 8 | tm <- avro_typemap(
MyType1 = avro_record(list(one = avro_int, two = avro_double, three = avro_string)),
MyType2 = avro_array(avro_double)
)
tm("MyType1") # produces the whole declaration
tm("MyType1") # produces just "MyType1"
tm("MyType2") # produces the whole declaration
tm("MyType2") # produces the declaration again because this is not a named type
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.