Missing Fields from Metadata while using TRINO Helical Insight 5.0

Hello Team,

I am using Helical Insight version 5.0. I am using TRINO to connect to my MONGO DB. But while creating a metadata, i see that many columns are missing in listing of metadata which are present in my mongo db. Please provide fix for this.

Thank you,
Netta.

Hello Netta,

  • We have done R&D on Trino side and found out that Trino guesses the schema
    (column/field names) based on initial record of your collection. It’s their internal
    algorithm to guess the schema name and list the fields.
    Currently in your case whatever fields which are missing in mongodb (instance) →
    (DB) → (collection) are because of their NULL nature in first record/document
    itself.
    Based on the guess of the schema from collection, trino creates a new collection
    within your db called “_schema”. This collection is used by Trino to list the fields.
    Since this _schema is used for listing the columns/fields and since it doesn’t have
    entries for those NULL datatype fields, it is not getting listed down in metadata of
    Helical Insight as well. This is trino’s capability that it guesses all the schema but if
    there is any discrepancy in any of the fields like we have of NULL datatypes and
    not getting listed out. Then it allows us to change in that _schema and hence we
    have to add those manually in _schema.
    We have to manually add info in the fields section of _schema → table
Sample as below :  
{ 
    "name" : "field_name_which_is_missing", 
    "type" : "varchar", 
    "hidden" : false 
}

after adding the same into field of _schema collection, clear / delete all the cache
of Helical insight application from Home page. Again go to metadata page and
expand the collection, you will start seeing the missing fields and you can create
reports on top of it.

NOTE : Here field_name_which_is_missing is taken just for an example and for any
other fields which is missing from _schema because of NULL or any other issue,
has to be added the same way. Clear the HI application cache and create the
metadata.

Thank you,
Helical Insight.