0

How do you put in a relationship a collection imported in bigquery with a subcollection imported in bigquery as in the example of a firestore document:

 users:
   user_id_1
       user_name
       photos
         |-----photo_1
         |-----      url: "url-1"
         |-----photo_2
         |-----      url: "url-2"

I've imported in firestore both the collection users and all the subcollection users/{userID}/photos

In the photos_view table in BigQuery, although I only have two fields which are document_id (photo_1, photo_2 in the example above) and document_name (database/users/user_id_1/photos/photo_1, database/users/user_id_1/photos/photo_2 in the example above).

How do you put in a relationship those 2 tables knowning which photo document is referred to which user_id ???

0 Answers0