question

David Li avatar image
David Li asked

JSON Query for Custom Event,Playfab Customevent JSON Query

I have a custom event "lobby_search" with the following properties:

{

  "PlayFabEnvironment": {
    "Application": "mainservercloudscriptint",
    "Vertical": "master",
    "Commit": "4781025",
    "Cloud": "main"
  },
  "EventNamespace": "title.8E611",
  "EntityType": "player",
  "SourceType": "GameServer",
  "EventName": "lobby_search",
  "Timestamp": "2020-09-30T02:10:11.6012007Z",
  "EntityId": "BA65C2F3319A9776",
  "Username": "Ken",
  "GameType": "1v1",
  "TitleId": "8E611",
  "EventId": "54878f419b6e4af8ba9174f2e78f2ce7",
  "Source": "8E611",
  "Region": "us-east-2"
}

I want to search for all custom events "lobby_search" where "Username" == "Ken" and "Timestamp" > "2020-09-23"

,

I created a custom event "lobby_search" with the following JSON property
{

  "PlayFabEnvironment": {
    "Application": "mainservercloudscriptint",
    "Vertical": "master",
    "Commit": "4781025",
    "Cloud": "main"
  },
  "EventNamespace": "title.8E611",
  "EntityType": "player",
  "SourceType": "GameServer",
  "EventName": "lobby_search",
  "Timestamp": "2020-09-30T02:10:11.6012007Z",
  "EntityId": "BA65C2F3319A9776",
  "Username": "Ken",
  "GameType": "1v1",
  "TitleId": "8E611",
  "EventId": "54878f419b6e4af8ba9174f2e78f2ce7",
  "Source": "8E611",
  "Region": "us-east-2"
}

I want to search for "lobby_search" where all "Username" == "Ken", and Timestamp > "2020-09-23", how do I do that?

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

·
Seth Du avatar image
Seth Du answered

You may search it in Explorer with:

['events.all']
|where FullName_Name == "lobby_search"
|where EventData.Username == "Ken"
|where Timestamp > datetime("2020-09-23")

Please refer to the documentation on: https://docs.microsoft.com/en-us/gaming/playfab/features/insights/explorer/quickstart

In addition, to know more about KQL, please refer to the documentation on: https://docs.microsoft.com/en-us/azure/data-explorer/write-queries

10 |1200

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

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.