Skip to main content
Question

mismatch in instance filter in data model filter and other places (transformation, rest api and graphql api)


We wanted to use view filter to implement a new view in a datamodel with a subset of data. we wanted to filter on a property with external id “WELL”
 


we tried this in a few models, and we get only 70 instances, but when we try to query instances with same filter in transformations sql query, graphql query or rest api endpoint for filtering instances we get 71.
even in data modeling ui, when same filter is applied on original model, it shows 71 instances but one fo them shows up as empty
 



UPDATE:
the one that was missing in data model UI is because that well instance doesn’t exist in that space (only 70 wella in that right space). but when we query the same data model instances from rest api , it gives that well from different space as well (71 wells). it gives well instance along with WELL type from other space which actually does not exist

4 replies

  • Author
  • Seasoned
  • 16 replies
  • January 31, 2025

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img

@Sangavi M can you please share the SQL code and the API request to compare?


  • Author
  • Seasoned
  • 16 replies
  • February 4, 2025


sQL:
 

select
      *
    from
      cdf_data_models(
        "sdm_examples",
        "SDM_model_All_entities_with_well_Timeseries_and_scalar_data",
        "1",
        "SDMEntity"
      )
    where
      entityType.externalId = 'WELL'

api end point: /models/instances/list


 

{
	"includeTyping": false,
	"sources": [
		{
			"source": {
				"type": "view",
				"space": "sdm_examples",
				"externalId": "SDMEntity",
				"version": "d87edb8c602c9e"
			}
		}
	],
	"limit": 1000,
	"filter": {
		"nested": {
			"scope": [
				"sdm_examples",
				"SDMEntity/d87edb8c602c9e",
				"entityType"
			],
			"filter": {
				"equals": {
					"property": [
						"node",
						"externalId"
					],
					"value": "WELL"
				}
			}
		}
	}
}

 


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img

@Arild Eide any idea regarding this? 


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings