Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies of data types #91

Open
bhadley opened this issue Aug 5, 2024 · 4 comments
Open

Inconsistencies of data types #91

bhadley opened this issue Aug 5, 2024 · 4 comments
Assignees

Comments

@bhadley
Copy link
Contributor

bhadley commented Aug 5, 2024

Takuro Okada, from Nomura Research Institute, Ltd. has raised the following remark:

Properties that have Number in the Type column, such as version and pcf.exemptedEmissionsPercent, should be defined as JSON Number type, right?

However, even though pcf.dqi.technologicalDQR has Number in the Type column, the Specification says that it must be a Decimal type (in other words, a JSON String type), which is inconsistent.

Could you please change the Type of the pcf.dqi.*DQR properties to String? To be more consistent, the Property should be written as "technologicalDQR : Decimal".

@bhadley
Copy link
Contributor Author

bhadley commented Aug 5, 2024

I have raised a PACT backlog item for this feedback, see https://flat-dollar-c04.notion.site/Inconsistencies-of-Data-Types-in-Tech-Specs-faec9b0b7ded407caa2a2ee176536967

We will address these inconsistencies in the preparation of v3 (as data type changes will be backwards breaking changes). Gertjan Schuurmans (@schuur ) who recently joined the PACT team also noted data type inconsistencies, and is investigating these. He will share more when we have a proposal / corresponding ADR.

For now, consider all "Number" datatypes the JSON datatype number, meaning an integer or floating point expressed as a number (not string). Thus pcf.dqi.technologicalDQR should be encoded as a Number (not string), as seen in the below screenshot of Example 9 from the tech specs (https://wbcsd.github.io/data-exchange-protocol/v2/#elementdef-dataqualityindicators)

Screenshot 2024-08-05 at 10 52 44

@mill6-plat6aux
Copy link
Collaborator

Thank you for registering the issue I contacted you about!

I understand that you will address this issue in v3. Are you planning to redefine pcf.dqi.*DQR as a JSON String (Decimal type) in v3?

@bhadley
Copy link
Contributor Author

bhadley commented Aug 6, 2024

Thanks @mill6-plat6aux - let's await @schuur to return from OOO to indicate a proposed direction, and ultimately the PACT Tech WG will form consensus regarding the approach (which you are invited to be part of). So, more to come in September!

@schuur
Copy link
Contributor

schuur commented Aug 28, 2024

Thanks @bhadley and @mill6-plat6aux! We will indeed address these in v3 of the spec. I will make a proposal for the September workgroup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants