external Ids exist in SQLlite file but not in model derivative API

30 views Asked by At

I'm pulling the SQL lite file for models from ACC but am having a few issues.

        SELECT
                ids.id AS dbId,
                ids.external_id AS externalId,
                attrs.name AS attrName,
                attrs.display_name AS attrDisplayName,
                attrs.category as attrCategory,
                attrs.data_type as attrDataType,
                attrs.data_type_context as attrDataTypeContext,
                vals.value AS valValue,
                attrs.flags
            FROM _objects_eav map
                LEFT JOIN _objects_id ids ON map.entity_id = ids.id
                LEFT JOIN _objects_attr attrs ON map.attribute_id = attrs.id
                LEFT JOIN _objects_val vals ON map.value_id = vals.id

I'm using the above to seed data into a temp table. We're finding that when calling the model derivatives API we're not seeing all the external_Ids from this in the response from the API. link to API documentation

When we group the data

            SELECT DISTINCT
            ti.dbId
            ,ti.externalId
            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentName
            ,max(case when ti.attrName = ? then ti.valValue end) attrParent
            ,max(case when ti.attrName = ? then ti.valValue end) attrTypeId
            ,max(case when ti.attrName = ? then ti.valValue end) attrElementId

            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentSpace
            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentReference
            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentFloor
        FROM

on the above query, we're seeing rows that have distinct id's and external id's but their attrElementId isn't able to be viewed in the model when searching for it in the model derivative API the equivalent data is no where to be found suggesting that it's either a hidden attribute or data that has been deleted from the model but has persisted in it's SQL Lite file.

It would be useful to find out why there is a difference in behaviour as I'm trying to move over to using the SQL lite file over the model derivative in an attempt to reduce load on Autodesk servers.

Does anyone have any insight into the above?

0

There are 0 answers