question

drewdough avatar image
drewdough asked

How to query player and other data?

Hi,

How can I query my player and custom data? Is there a standard way to do this?

One thought is to export all the data myself and put it into a SQL DB, but I noticed I also couldn't find anything in the docs for exporting data?

The only thing I found was for getting all the player data, but it would send an email? I need a way to regularly extract all the data in my data store so I can put it into my BI tools / Data Warehouse and also just run arbitrary queries on it.

How are others solving this problem?

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andy avatar image
Andy answered

We have two primary ways of gaining access to data for BI purposes: S3 archives and Snowflake. In both cases, you're not directly querying player data, but player actions in the form of events. Things like player statistic events and purchase events can be used to construct dimensions that represent the current state of a player. The actual player data is stored in such a way that it's not suitable for offline querying or aggregation.

If you'd like to dig into this topic further with specific questions, let me know.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

drewdough avatar image drewdough commented ·

Thanks Andy.

So will that event data allow me to query certain things like player level? Such as aggregating players by level and seeing the frequency and commonality of certain levels?

Also, what about in the cloud script / scheduled tasks? I have a requirement in my games social piece to display the players "rank". There are 25 ranks in the game and they are based on the relative player XP.

So imagine theres 50 players in the game. The player with the highest XP would be rank 1, and the next two players with the next 2 highest XP would be tied for Rank 2, and so on.

To do this I'd need to aggregate players based on PlayerXP in real time in cloud script on a regular interval or driven by an event. Piping the data out to S3 or a BI tool would probably be too late and take too long.

Is this possible to do in PlayFab? If not directly, how are users of PlayFab getting around this to implement features which need aggregate data in real time?

Thanks again!

0 Likes 0 ·
Andy avatar image Andy ♦♦ drewdough commented ·

A lot of what you describe sounds like our Stats and Leaderboards features. You might want to have a look at some of the documentation in the Tournaments section here: https://api.playfab.com/docs/tutorials

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.