Hi, What is the format for specifying an Enum's va...
# ingestion
o
Hi, What is the format for specifying an Enum's values in the MCE json file?
Bumping this up as this is quite a blocker /cc @mammoth-bear-12532
b
Enum's values in a JSON file are simply represented as an all caps string
For example, if we have the enum:
Copy code
enum FabricType {
     PROD
}
We'd do :
Copy code
fabricType: "PROD"
o
That's not sufficiently clear to me. How would the "field" object in the MCE Json look like, for your example? For example, the MapType has keyType and valueType, and ArrayType has nestedType. But the EnumType has no fields inside of it, and any extra keys I add into the JSON object it gets rejected as "extra_fields" by avrojson.py during "datahub ingest" command.
m
Hi @orange-flag-48535: just to remind us of what you are trying to do: Java program -> writes MCE-file -> use datahub ingest to send the event over to rest server ?
o
@mammoth-bear-12532 - that's exactly right. The input to the Java program is some internal Java APIs we have, from which I extract the necessary fields and their type information.
@big-carpet-38439 Any examples of Enum you can share from an MCE file? /cc @mammoth-bear-12532
Thanks for clarifying this during Office Hours last week and for considering adding this. Is there a bug/issue regarding this in your Github? Will help us find out when it gets addressed.
b