MicrosoftDocs / Advertising-docs

Creative Commons Attribution 4.0 International
15 stars 59 forks source link

api returns invalid '--' result for AdRelevance although schema defines as arrayofints #803

Closed pentium10 closed 4 years ago

pentium10 commented 4 years ago

AdRelevance is defined as array of int but we still get '--' invalid results.

Error while reading data, error message: Could not parse '--' as DOUBLE for field AdRelevance (position 20) starting at location 267986


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

pentium10 commented 4 years ago

@eric-urban any feedback?

eric-urban commented 4 years ago

@pentium10 the data type depends on context e.g., the filter is more strict compared to the possible values described in KeywordPerformanceReportColumn value set. If you are attempting to filter by '--' we can consider a string data type in the future. Please let me know if you have any follow up questions or concerns.

pentium10 commented 4 years ago

More context.

We are doing a data export, and the CSV comes with invalid fields matching the schema. The schema was set as INT for AdRelevance but the CSV still returns "--" as values as seen in the output. The CSV is not requested from you.

image

We read that:

The value in the report will be "--" (double dash) if the score was not computed.

But that is impractical in real life. For example auto import the report to BigQuery as a database no longer works since this change. And defining the columns as string doesn't make sense. Why and empty value is not good enough?

Also if that is true, than the schema should be modified to STRING on your end not keep as ARRAYOFINTS?

eric-urban commented 4 years ago

@pentium10 I confirmed the possible values described in the KeywordPerformanceReportColumn value set are by design e.g., "--" (double dash) if the score was not computed. Since the filter is array of int, you could only filter by 1, 2, and 3. The filter data type does not support filtering by "--" (double dash). The feedback is great, and you raise a fair question why not just leave the field empty for this scenario. The change was implemented from v12 to v13, and we will consider how to make it more flexible in a future release.

pentium10 commented 4 years ago

there are a bunch of Business Insight tools that use autoSchema from CSV files all these tools now have struggle to import this kind of dataset

It should be reverted. This was a backward incompatible change.

pentium10 commented 4 years ago

On other notes, relaxing the schema of an existing database from int to string, looses the "long term storage" price benefits that people have acquired (where this db cost model applies).

eric-urban commented 4 years ago

@pentium10 I do see your point, and I agree "--" is not ideal. We are evaluating a new optional request parameter to return empty instead of "--". This is not yet confirmed, but I wanted to let you know discussions are active.

eric-urban commented 4 years ago

@pentium10 thanks again for the feedback and the team is tracking this for a future API version. Since there is no documentation bug/issue to track, I'll close this GitHub issue.