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

Ingest processor and fields resolving #975

Open
nablaone opened this issue Nov 12, 2024 · 0 comments
Open

Ingest processor and fields resolving #975

nablaone opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nablaone
Copy link
Member

Ingest processor doesn't use schema to resolve fields into column names. It relies on table definition and field mangling. This is fine when Quesma manages the table definition, but it can lead to confusion when a human manages the table.

Here is an example:

  1. Let's create a table
CREATE TABLE test (
`@timestamp` DateTime64(3) DEFAULT now64() COMMENT 'quesmaMetadataV1:fieldName=%40timestamp',
`attributes_values` Map(String, String),
`attributes_metadata` Map(String, String),
`foo` Nullable(String)  COMMENT 'quesmaMetadataV1:fieldName=bar'
)
ENGINE = MergeTree
ORDER BY `@timestamp`
SETTINGS index_granularity = 8192 COMMENT 'created by Quesma'

  1. Insert some data
insert into test(foo) values ('a')('b')('c')
  1. Query Quesma
POST localhost:8080/test/_search

{}
  1. It's fine for now. We've got 3 rows.
  2. Let's ingest
POST localhost:8080/test/_doc

{
  "bar":  "xxx"
}
  1. And query again:
POST localhost:8080/test/_search

{}
  1. We've 'lost' some data
  2. The table looks like
Screenshot 2024-11-12 at 13 37 24 9. Schema Screenshot 2024-11-12 at 13 38 29
@nablaone nablaone added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant