question

drew avatar image
drew asked

How to query player data in aggregate?

Does PlayFab have anyway to query all the players data in aggregate? For example if I am tracking a players stats in a PlayerStats key in Player title data, is there a way I can query across all players data to get metrics on player stats across the board? If not, is the only work-around to use Cosmos instead of PlayFab for storage?

Player Data
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

·
Neils Shi avatar image
Neils Shi answered

PlayFab does not support query all players data. If you want to query all the players data in aggregate, as you mentioned, you may need to use an external database to complete it.

4 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.

drew avatar image drew commented ·

@Neils Shi is there a work-around for doing this by using PlayStream events and the PowerBI/Microsoft Fabric integration?

0 Likes 0 ·
Neils Shi avatar image Neils Shi drew commented ·

As PlayFab and Microsoft Fabric Real-Time Analytics (RTA) for game creators - PlayFab | Microsoft Learn mentions that you can use PlayFab's Data Connections service to distribute game events to Fabric Real-Time Analytics Database so that you can have real-time analytics for your game, which means it allows you to analyze PlayFab events in real-time. But in your case, you want to query all player data in aggregate, which is not supported. Since PlayFab does not support query data in aggregate, you may use an external database to complete it.

0 Likes 0 ·
drew avatar image drew commented ·

Thanks @Neils Shi . Is there a recommended way to connect a external database to playfab data? Do you mean to replace playfab entities and user data with Cosmos or some other alternative, or is there a way to export all of the playfab player data so I can continue using Playfab for these things but export the data I need to run queries?

0 Likes 0 ·
Neils Shi avatar image Neils Shi drew commented ·

Currently, PlayFab does not support exporting all the player data, and there is no tutorial showing how PlayFab works with the external database. Theoretically, any database service that supports Web API should integrate with PlayFab well, because PlayFab supports making Webhook calls through Cloud Script. You can decide whether to use only the external database or also store the data in PlayFab player data at the same time with the external database based on your needs.

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.