I have two tables within a CosmosDB database that hold key:value documents within their containers.T1 and T2
T1Id: 111ems_featurecategory: 1234ems_name: "win"
T2feature_category: "win"feature_category: "hello"
I wish to query cosmosdb so that I:
Return the value from T1 ems_featurecategory key if the ems_name value from T1 matches the feature_category value from T2.
So since the ems_name key's value from T1 matches the featurecategory's key's value from T2
ems_name: "win"featurecategory: "win",
the value that will be returned will be: 1234
JOIN the two tables and perform a query such as:
SELECT c.emsfeaturecategory, c.ems_name, f.feature_categoryFROM cJOIN f in c.idWHERE array_contains(['',''],c.id,true)AND c.ems_name = featurecategory...
I am not sure how to write this query out successfully. Any suggestions or advice is helpful.
Not really related to Power Automate 🙂 but here goes - I would use an INNER JOIN to get records from T1 which are found in T2 - like this:
SELECT T1.ems_featurecategory, T1.ems_name, T2.feature_categoryFROM T1INNER JOIN T2 ON T1.ems_name = T2.feature_category
Kind regards, John
Check out the on demand sessions that are available now!
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.