I have an AIP Logic function that accepts an Ontology object as input. I have an Application SDK that exposes both the Ontology object set and the AIP Logic function. When I query the Object set to select a single object and pass that object into the AIP Logic function remotely, I get the following serialization error:
Object of type Ace is not JSON serializable
File "/home/user/data-at-acke-transformations/python/automation/ace_model_conversion/convert_ace_to_dbt.py", line 13, in convert_ace_model_to_dbt_model
dbt_model = client.ontology.queries.cconver_ace_to_dbt_beta(ace_model=foundry_ace_model)
File "/home/user/data-at-acme-transformations/python/automation/ace_model_conversion/execute.py", line 5, in <module>
convertAceToDbt.convert_ace_model_to_dbt_model()
TypeError: Object of type Ace is not JSON serializable
Hi @Natrix! I think I’ve found the bug. The fix probably won’t be in until next week. in the meantime, can you try inputing the primary_key of the object to your query instead of the object itself?
e.g. client.ontology.queries.cconver_ace_to_dbt_beta(ace_model=foundry_ace_model.get_primary_key())
Thanks @jzhang. I tried to use the primary key like you suggested as am now getting this internal error. I am unable to see the actual error. (See Below)
Is the function able to execute in AIP Logic for some example object? Like, have you been able to execute the function before using the UI?
Also, how did you construct your client? (get_foundry_client() ) Was this based off the docs in developer console? Are you using ConfidentialClientAuth?