Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Analytic QNA works with real data (no more Q&A) #8

Merged
merged 6 commits into from
Aug 11, 2023

Conversation

nir-schleyen
Copy link
Collaborator

@nir-schleyen nir-schleyen commented Aug 11, 2023

Motivation and Context

  • Real reports are pulled into the in-memory vectorized memory rather than mocked up data
  • To do so, extended the settings to take additional parameters such as the titleid (for which we want to ask questions) as well as connection to the backend reports container.

At this point I kept the full example in a single file, but it has grown enough that I'd need to split it.
In next PR I'm going to move our examples to a new project.

Description

Contribution Checklist

string[] questions = new string[]
{
"Is my daily active users better or worse than it was last week?",
"If the number of monthly active players in France increases by 30%, what would be the percentage increase to the overall monthly active players?",
"What is my 2-days retention average? Was my 2-days retention in the last few days was better or worse than that?",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be reviewing these sorts of questions for grammatical correctness as well more natural phrasing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please, any suggestion for improvement is welcomed!

if (!latestReports.ContainsKey("EngagementMetricsRollupReportCSV"))
{
GameReport gameEngagementRollupReport = (await reportDataFetcher.FetchByQueryAsync(
$"SELECT TOP 1 * FROM c WHERE c.TitleId='{titleId}' and c.ReportName='EngagementMetricsRollupReportCSV' ORDER BY c.ReportDate DESC",
Copy link
Collaborator

@rosireddyr rosireddyr Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The below query data already should be part of the previous query. Not sure making one more query will help anything.

$"SELECT TOP 1 * FROM c WHERE c.TitleId='{titleId}' #Pending

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this one always has the ReportDate set to the first day of the month. Checking...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed this is needed, since this report data is always the first date of the month

{
source = source.Substring(0, source.Length - wordToRemove.Length);
Console.WriteLine($"Error: {ex.Message}");
return new List<GameReport>();
Copy link
Collaborator

@rosireddyr rosireddyr Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we return something to the user, when there is no data? After the exception, there is no data, so we can't proceed to next steps. #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, I'll just let it throw in this case

public class DailyOverviewReportRecord
{
public static string GetHeader() =>
"Timestamp,TotalLogins,UniqueLogins,UniquePayers,Revenue,Purchases,TotalCalls,TotalSuccessfulCalls,TotalErrors,Arpu,Arppu,AvgPurchasePrice,NewUsers";
Copy link
Collaborator

@rosireddyr rosireddyr Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these classes even after getting data from cosmos database? #Pending

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly I am talking about GetHeader

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since CosmodDB doesn't give headers or description. It has properties in the non-csv report which are like the properties names of this class

@nir-schleyen nir-schleyen merged commit d745cfb into main Aug 11, 2023
6 of 16 checks passed
@nir-schleyen nir-schleyen deleted the nirsch/fetchrealdata branch August 11, 2023 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants