-
Notifications
You must be signed in to change notification settings - Fork 1
Users should be able to define their own schema namespace #46
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, users have their namespace automatically created for them at python.kafka.modelname
Lines 66 to 80 in 14d82e5
| @staticmethod | |
| def schema_extra(schema: Dict[str, Any], | |
| model: Type['KafkaRecord']) -> None: | |
| schema['type'] = 'record' | |
| schema['name'] = schema.pop('title') | |
| schema['namespace'] = (f'python.kafka.' | |
| f'{schema["name"].lower()}') | |
| schema = process_properties(schema) | |
| schema.pop('properties') | |
| # Dynamically generated schemas might not have this field, | |
| # which is removed anyway. | |
| if 'required' in schema: | |
| schema.pop('required') | |
| update_optional_schema(schema=schema, model=model) |
We should allow users to define their own namespace.
something like,
class MyRecord(KafkaRecord):
name: str
@property
def namespace():
return 'my.name.space'or as an argument to PandasToRecordsTransformer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request