Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka queues do not support special characters in source field names #2836

Closed
5 tasks done
djklim87 opened this issue Dec 10, 2024 · 7 comments
Closed
5 tasks done

Kafka queues do not support special characters in source field names #2836

djklim87 opened this issue Dec 10, 2024 · 7 comments
Assignees
Labels

Comments

@djklim87
Copy link
Contributor

djklim87 commented Dec 10, 2024

Bug Description:

When creating a source to read from Kafka queues, we need to iterate through the fields of the incoming message (JSON). In JSON, it’s acceptable for keys to contain $ or other special characters, but such characters are completely prohibited in Manticore fields. This needs to be handled appropriately

CREATE SOURCE wiki_source (id bigint, $schema json) 
type='kafka' 
broker_list='kafka:9092' 
topic_list='wikimedia' 
consumer_group='ms_wikimedia' 
num_consumers='4' 
batch=200

Manticore Search Version:

6.3.8

Operating System Version:

Any

Have you tried the latest development version?

None

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation reviewed
  • Changelog updated
@djklim87 djklim87 added the bug label Dec 10, 2024
@djklim87
Copy link
Contributor Author

@djklim87
Copy link
Contributor Author

djklim87 commented Dec 26, 2024

@djklim87 djklim87 self-assigned this Dec 26, 2024
@djklim87
Copy link
Contributor Author

djklim87 commented Jan 5, 2025

We decided to use the syntax:

new_name 'original_name' type
  • new_name: A Manticore-compatible field name.
  • original_name: The original key from the JSON syntax, which may include special characters. If you need to use an apostrophe within the name, it should be escaped using \'

@djklim87
Copy link
Contributor Author

@sanikolaev The Windows tests failed here. Please assign this issue to someone from the core team (my changes can't affect this)

https://github.com/manticoresoftware/manticoresearch/actions/runs/12745846202

@djklim87 djklim87 assigned sanikolaev and djklim87 and unassigned djklim87 and sanikolaev Jan 13, 2025
@djklim87
Copy link
Contributor Author

implemented in #2926

djklim87 pushed a commit that referenced this issue Jan 14, 2025
djklim87 pushed a commit that referenced this issue Jan 14, 2025
djklim87 pushed a commit that referenced this issue Jan 14, 2025
djklim87 pushed a commit that referenced this issue Jan 14, 2025
djklim87 pushed a commit that referenced this issue Jan 14, 2025
djklim87 added a commit that referenced this issue Jan 15, 2025
* #2836 Kafka source mapping support

---------

Co-authored-by: djklim87 <[email protected]>
@djklim87
Copy link
Contributor Author

tests and docs updated #2927

sanikolaev pushed a commit that referenced this issue Jan 15, 2025
* #2836 Kafka source mapping support

---------

Co-authored-by: djklim87 <[email protected]>
@sanikolaev
Copy link
Collaborator

Suggested docs improvements here #2940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants