open-metadata / OpenMetadata

OpenMetadata is a unified metadata platform for data discovery, data observability, and data governance powered by a central metadata repository, in-depth column level lineage, and seamless team collaboration.
https://open-metadata.org
Apache License 2.0
5.3k stars 998 forks source link

search indexing failure for firstname.lastname in dbt tests #16771

Closed geoHeil closed 2 months ago

geoHeil commented 3 months ago

Affected module search indexing

Describe the bug search indexing failure for firstname.lastname in dbt tests

 [message]: OpenSearchException[OpenSearch exception [type=document_parsing_exception, reason=[1:334] failed to parse field [updatedBy] of type [text] in document with id 'd5825400-62d1-4c32-9a9f-b5ad01de8392'. Preview of field's value: '{deleted=false, displayName=ingestion-bot, name=ingestion-bot, id=38dda5c7-d381-4477-b6dd-cc8f14cf797c, type=user, fullyQualifiedName=ingestion-bot}']]; nested: OpenSearchException[OpenSearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:170]];
  [3]:
    [entity]: 3
    [message]: OpenSearchException[OpenSearch exception [type=document_parsing_exception, reason=[1:221] failed to parse field [updatedBy] of type [text] in document with id 'cbcdbce7-12aa-47a3-9c02-4e3487e51c1e'. Preview of field's value: '{type=User, fullyQualifiedName=firstname.lastname}']]; nested: OpenSearchException[OpenSearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:170]];
  [4]:
    [entity]: 4
    [message]: OpenSearchException[OpenSearch exception [type=document_parsing_exception, reason=[1:745] failed to parse field [updatedBy] of type [text] in document with id '8ee7f5d8-67a5-45c2-b9f3-30730a2507f3'. Preview of field's value: '{deleted=false, displayName=firstname.lastname, name=firstname.lastname, id=4550617d-4b99-488e-9cdb-0f504251219b, type=user, fullyQualifiedName="firstname.lastname"}']]; nested: OpenSearchException[OpenSearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:577]];
  [5]:
    [entity]: 5
    [message]: OpenSearchException[OpenSearch exception [type=document_parsing_exception, reason=[1:385] failed to parse field [updatedBy] of type [text] in document with id 'ef908d31-bdd8-46d6-a48c-953e8804a50f'. Preview of field's value: '{type=User, fullyQualifiedName=other_firstname.other_lastname}']]; nested: OpenSearchException[OpenSearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:335]];
  [6]:
    [entity]: 6
    [message]: OpenSearchException[OpenSearch exception [type=document_parsing_exception, reason=[1:335] failed to parse field [updatedBy] of type [text] in document with id '892e0322-e5a9-4af3-a6ea-3daf0798343f'. Preview of field's value: '{deleted=false, displayName=other_firstname.other_lastname, name=other_firstname.other_lastname, id=0d40b9c7-3e65-4fe9-8592-06e75f7f429c, type=user, fullyQualifiedName="other_firstname.other_lastname"}']]; nested: OpenSearchException[OpenSearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:170]];
  [7]:
    [entity]: 7
    [message]: OpenSearchException[OpenSearch exception [type=document_parsing_exception, reason=[1:334] failed to parse field [updatedBy] of type [text] in document with id 'e38d7481-01c7-4fa4-bde5-f5f798c2287a'. Preview of field's value: '{deleted=false, displayName=ingestion-bot, name=ingestion-bot, id=38dda5c7-d381-4477-b6dd-cc8f14cf797c, type=user, fullyQualifiedName=ingestion-bot}']]; nested: OpenSearchException[OpenSearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:170]];
[submittedCount]: 8

To Reproduce

dbt schema yaml with

  - name: my_dbt_model
    description: 'my description'
    +tags: "foo_tag"

    meta:
      owner: "firstname.lastname"
      openmetadata:
        tier: 'Tier.Tier2'
      my_custom_meta: mymeta
    columns:
      - name: id
        description: "A starter dbt model: which demonstrates an update on a column comment"
        tests:
          - unique
          - not_null

Expected behavior

indexing should not fail for user identifiers which include a dot (.)

Version:

harshach commented 3 months ago

@sonika-shah can you check here

sonika-shah commented 3 months ago

@harshach seems to be an issue on ingestion side, the updatedBy field is of type text but it seems to be receiving a JSON object like this: [{deleted=false, displayName=firstname.lastname, name=firstname.lastname, id=4550617d-4b99-488e-9cdb-0f504251219b, type=user, fullyQualifiedName="firstname.lastname"}']]

harshach commented 3 months ago

Thanks @sonika-shah . @OnkarVO7 lets address this.

OnkarVO7 commented 3 months ago

I'll take a look

OnkarVO7 commented 2 months ago

Hi @geoHeil tried to reproduce this but was unable to do so. Can you please share the steps to reproduce it.

Also since this is being cause by dbt test, will you be able to share the test details which test is causing it? Also if you can share the snippet from run_results.json it'll be helpful

geoHeil commented 2 months ago

I fear after a recent change at my company in the last days I will not be able to hand this out any more. Worst case we will have to close this bug here for now

OnkarVO7 commented 2 months ago

Got it thanks. Closing the issue we can reopen if the issue happens again