G2Engine Why

Why

whyEntityByRecordID() and whyEntityByEntityID() determine why records belong to their resolved entities.

whyRecords determines if any two records can or cannot resolve together, or if they relate.

whyRecords

whyRecords() determines if any two records can or cannot resolve together, or if they relate.

g2_engine.whyRecords(data_source_code_1, record_id_1, data_source_code_2, record_id_2, response_bytearray, g2_engine_flags)
Parameters
  • data_source_code_1: The RECORD_ID for the first entity.
  • record_id_1: The RECORD_ID for the second entity.
  • data_source_code_2: The RECORD_ID for the first entity.
  • record_id_2: The RECORD_ID for the second entity.
  • response_bytearray: (bytearray) Object to store the output of the method.
  • g2_engine_flags: (int [optional]) One or more flags used to determine response document content. Applicable flags are listed here why* flags)
Click to expand whyRecords() example

whyEntityByRecordID

whyEntityByRecordID() determines why records resolved to an ENTITY_ID by a RECORD_ID. Returns a JSON document that gives the results of the record analysis.

It has a “WHY_KEY”, which is similar to a match key, in defining the relevant connected data. It shows candidate keys for features that initially cause the records to be analyzed for a relationship, plus a series of feature scores that show how similar the feature data was.

The response JSON document also contains a separate ENTITIES section, with the full information about the resolved entity.

The recommended composite flag is G2_WHY_ENTITY_DEFAULT_FLAGS. Additional recommended flags are G2_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES and G2_ENTITY_OPTION_INCLUDE_FEATURE_STATS, which provide detailed feature data that is useful for understanding the WHY_RESULTS data.

g2_engine.whyEntityByRecordID(data_source_code, record_id, response_bytearray, g2_engine_flags)
Parameters
  • data_source_code: (str) The data source for the record to be analyzed.
  • record_id: (str) The RECORD_ID for the record to be analyzed
  • response_bytearray: (bytearray) Object to store the output of the method.
  • g2_engine_flags: (int [optional]) One or more flags used to determine response document content. Applicable flags are listed here why* flags)
Click to expand whyEntityByRecordID() example

whyEntityByEntityID

whyEntityByEntityID() determines why records resolved to an ENTITY_ID. Returns a JSON document that gives the results of the record analysis.

It has a “WHY_KEY”, which is similar to a match key, in defining the relevant connected data. It shows candidate keys for features that initially cause the records to be analyzed for a relationship, plus a series of feature scores that show how similar the feature data was.

The response JSON document also contains a separate ENTITIES section, with the full information about the resolved entity.

The recommended composite flag is G2_WHY_ENTITY_DEFAULT_FLAGS. Additional recommended flags are G2_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES and G2_ENTITY_OPTION_INCLUDE_FEATURE_STATS, which provide detailed feature data that is useful for understanding the WHY_RESULTS data.

g2_engine.whyEntityByEntityID(entity_id, response_bytearray, g2_engine_flags)
Parameters
  • entity_id (str) The ENTITY_ID for the entity to be analyzed.
  • response_bytearray: (bytearray) Object to store the output of the method.
  • g2_engine_flags: (int [optional]) One or more flags used to determine response document content. Applicable flags are listed here why* flags)
Click to expand whyEntityByEntityID() example

Why (not)

whyEntities() determines why entities did not resolve or why they do relate.

g2_engine.whyEntities(entity_id_1, entity_id_2, response_bytearray, g2_engine_flags)

whyEntities

whyEntities() determines why entities did not resolve or why they do relate.

Parameters
  • entity_id_1: The entity ID for the first entity.
  • entity_id_2: The entity ID for the second entity.
  • response_bytearray: (bytearray) Object to store the output of the method.
  • g2_engine_flags: (int [optional]) One or more flags used to determine response document content. Applicable flags are listed here why* flags)
Click to expand `whyEntities()` example