1
votes

I have been wondering if it is possible to make big query queries on the datastore using joins based on keys. e.g i have two entities programmes and departments . If i store a department i generate a department key and attach it to a programme . However at the point of retrieval how do i convert that programme to its real entity with the relevant fields?. Lets say department has code , name fields and programmes has department_key , id , name e.t.c . When programmes is saved it carries a department key how do i do a join in big query to fetch the department data based on the saved department key in programme entity .

1

1 Answers

0
votes

Please i got the answer correctly now , I didn't notice that the dataset tables had its own representations of the keys by having its own __key__.id which can be used to actualize the join .All objects with keys are represented fully with the _key_name,_key_path , e.t.c . In summary if you come across this simply explore the dataset.table and check for the underlying id of the entities key you intend to join. Thanks.