Closed BumbleFlash closed 3 years ago
Thanks for opening this @BumbleFlash. As we work on the tool, we need to keep in mind that we will continuously add data to be collected, so we need to make sure the export tool is robust enough to handle this. So we should be able to run the tool and export all records, even if some of them are null
. So as @BumbleFlash says, you may need to null
check variables to make sure the application handles the case where that variable doesn't exist. This is typical in No-SQL databases like Firebase when you don't have a well-defined schema and fields can change over time.
Thanks for adding the schema. From database I'm getting a object named albumArtist Can you provide the properties of that object
Hi @BumbleFlash As mentioned above AlbumData is a property of AlbumArtistData class. But If you see the database it doest not follow the class hierarchy AlbumData and AlbumArtistData are a part of Main class. for e.g if you check user ""izHkj6cCdDcF6EMZ9XG5xXIClZl1" and its ui-event id "51-dd2f09b8-7b4b-49d6-bc42-4d405e9a7d1b".
For Genre data : Im getting numSongs as well as numSong Which one should I use?
@pradeepsalunke I'd store whatever you get from the Firebase Firestore as is. You can differentiate with different models of data using the traditional null checks or just checking what type of UiEvent it is. For example, PLAY_ALBUM_ARTIST
will always populate the AlbumArtist
parameter.
For Genre data : Im getting numSongs as well as numSong Which one should I use?
@pradeepsalunke I don't understand how you're getting two numSongs
. Could you please give me the UID and record_ID for the PLAY_GENRE
event that's having two numSongs
?
But If you see the database it doest not follow the class hierarchy AlbumData and AlbumArtistData are a part of Main class. for e.g if you check
The AlbumData
class is populated when we capture a PLAY_ALBUM
event and the AlbumArtistData
class is populated when we capture PLAY_ALBUM_ARTIST
event. The primary purpose of the AlbumArtistData
class would be to store the artist's name with the list of albums published under their name, while the AlbumData
class would store the details of the album.
I didn't quite understand what you were trying to say but I hope this clears things up. Feel free to reach out if you had any further questions.
Per discussion to our meeting, we have gone ahead and added three new UI events
PLAY_ALBUM
,PLAY_ALBUM_ARTIST
, andPLAY_GENRE
each of them having a new model classAlbumData
,AlbumArtistData
,GenreData
. Only one of them is populated at a time and while the other isnull
. You may want to handle the null cases and populate data accordinglyAlbumArtistData
class looks like this:AlbumData
class looks like this:Artist
looks like this:Genre
looks like this: