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

[BUG] ConnectedAssetUniverse not gathering all asset properties #7505

Closed
LeeVi3w opened this issue Mar 9, 2023 · 1 comment
Closed

[BUG] ConnectedAssetUniverse not gathering all asset properties #7505

LeeVi3w opened this issue Mar 9, 2023 · 1 comment
Labels
bug Something isn't working no-issue-activity Issues automatically marked as stale because they have not had recent activity. triage New bug/issue which needs checking & assigning

Comments

@LeeVi3w
Copy link
Contributor

LeeVi3w commented Mar 9, 2023

Existing/related issue?

No response

Current Behavior

Inside the context of a Java application, I want to use the ConnectedAssetUniverse class from the ocf-metadata-client to retrieve the properties of an asset using its GUID.

After creating a ConnectedAssetUniverse object using an asset's GUID, the resulting object contains null values for fields that are otherwise present in the AssetResponse retrieved from the OMAS.

Some of the missing attributes which are found inside the AssetResponse but not inside the ConnectedAssetUniverse object after processing are:

  • Classifications
  • qualifiedName
  • GUID
  • AssetType

The ConnectedAssetUniverse is supposed to gather the SchemaAttributes of a SchemaType (if present), which are also missing, along with the base attributes of the Asset class (and some attributes higher in the hierarchy).

Expected Behavior

The object should contain the same attributes that are returned when calling the assetUniverse API through a tool such as Postman, as well as some extra attributes specific to the functionality of the client (i.e. SchemaAttributes).

Steps To Reproduce

Creating the asset

The asset was created following these steps:

  1. Create simple CSVFile asset using the Asset Manager OMAS
    (/access-services/asset-manager/users/{{user-id}}/data-assets)
{
    "class": "DataAssetRequestBody",
    "elementProperties": {
        "class": "DataAssetProperties",
        "typeName": "CSVFile",
        "qualifiedName": "Synthetic Financial Datasets For Fraud Detection",
        "guid": "paysim-csv"
    },
    "metadataCorrelationProperties": {
        "assetManagerGUID" : "4b202442-77ca-473e-89da-40d3806fb4ad"
    }
}
  1. Create simple TabularSchemaType using the Asset Manager OMAS
    (/access-services/asset-manager/users/{{user-id}}/schema-types)
{
    "class": "SchemaTypeRequestBody",
    "elementProperties": {
        "class": "SchemaTypeProperties",
        "typeName": "TabularSchemaType",
        "qualifiedName": "paysim-csv-schema-type"
    },
    "metadataCorrelationProperties": {
        "assetManagerGUID" : "1458cce2-8c6f-4126-8eb2-95a90922158f"
    }
}
  1. Link SchemaType to Asset using the AssetManager OMAS
    (/access-services/asset-manager/users/{{user-id}}/parents/{{asset-id}}/CSVFile/schema-types/{{schema-id}})
{
    "class": "AssetManagerIdentifiersRequestBody",
    "assetManagerGUID" : "1458cce2-8c6f-4126-8eb2-95a90922158f"
}
  1. Create several TabularFileColumn attributes, specifying the schema type as the one created above
    (access-services/asset-manager/users/{{user-id}}/schema-elements/{{schema-id}}/schema-attributes)
{
    "class": "SchemaAttributeRequestBody",
    "elementProperties": {
        "class": "SchemaAttributeProperties",
        "typeName": "TabularFileColumn",
        "qualifiedName": "newbalanceOrig",
        "technicalName": "newbalanceOrig",
        "schemaType": {
            "class": "SchemaTypeProperties",
            "typeName": "TabularSchemaType",
            "qualifiedName": "paysim-csv-schema-type"
        }
    },
    "metadataCorrelationProperties": {
        "assetManagerGUID": "1458cce2-8c6f-4126-8eb2-95a90922158f"
    }
}

Reproducing the issue

Use the ConnectedAssetUniverse object found inside the ocf-metadata-client package to retrieve the asset in the context of an application. The resulting object should have unexpected null values such as guid, qualifiedName, schemaAttributes (field of the schema property) etc.

Environment

- Egeria: 3.15
- OS: MacOS
- Java: 17

Any Further Information?

Possible explanations

1. Missing base Asset properties

From what I have managed to figure out from the logic behind the AssetResponse processing, the base properties seem to be missing due to simply not being assigned to the newly created ConnectedAssetUniverse object. The whole logic behind the assignment of fields from the response seems to take place inside the processAssetResponse function, which appears to not assign most of them.

2. Missing SchemaAttributes

This issues appears to be related to the attributesCount field found inside the AssetResponse response, which is always set to 0. This has the effect of not triggering the creation of a ConnectedSchemaAttributes object that seems to be responsible with an API call used to gather the attributes of the asset's schema type.

@LeeVi3w LeeVi3w added bug Something isn't working triage New bug/issue which needs checking & assigning labels Mar 9, 2023
@github-actions
Copy link

github-actions bot commented May 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label May 9, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity Issues automatically marked as stale because they have not had recent activity. triage New bug/issue which needs checking & assigning
Projects
None yet
Development

No branches or pull requests

1 participant