question

Joshua avatar image
Joshua asked

Accessing player data of all users export to csv

Hi,

I'm trying to export a particular key "PlayerWinnings" from all players in player data in a particular segment to a csv file that is accessable either through playfab or externally.

Currently my plan was to run a scheduled task on all players in the segment and update a title data key each time with a '+='.

Is there some other approach which is better than either of those?

Thanks

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

·
Ivan Cai avatar image
Ivan Cai answered

Exporting title player data of all users is not supported, as that if Millions of players will cause performance problems in the data table. However, if you want to export the specific key/value of certain players(a small amount) in a particular segment to accumulate count, I think your second type of run scheduled task is better. The only problem is that title data cannot be used for counting, and it is generally not used for frequent modification. Because title data is a sharded and cached resource with a significant TTL. So from when you update it, there will be a period of time where not all sharded endpoints have the latest information. So, the player will not get the latest data in time. In general, it can't be updated as a result of a player operation. You should use a variable to store count in cloudscript, but please note that "Execution time " limit. When you need larger execution time, you might use playfab cloudscript using Azure Function. For more about it, you can refer to PlayFab CloudScript using Azure Functions.

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.

Joshua avatar image Joshua commented ·

Thanks @Ivan Cai, how in cloudscript can I make a static variable which can hold all the player data key/value and then once the segment has been run through it adds that value to title data, so that title data is only modified the once during this call?

0 Likes 0 ·
Ivan Cai avatar image Ivan Cai ♦ Joshua commented ·

I have edited my answer.Please note that title data cannot be updated as a result of a player operation.You can get all players' playfabIds in segment via calling GetPlayersInSegment API. Then traverse the "PlayerWinnings" value of each player and use a variable to accumulate. The above operation is in a cloudscript function.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]