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
Measurement converter #256
Comments
Basis for the converter could be https://github.com/metafacture/metafacture-core/blob/master/metamorph/src/main/java/org/metafacture/metamorph/functions/DateFormat.java and then it could be enhanced to support other kinds of measures, isos and units. |
For my transformation the java library https://www.joda.org/joda-time/ (java.time) could be used. Perhaps instead of creating a general measurement converter we start with a more simple dayTime-converter? |
Other scenario I need is to convert 14.24 MB into bytes |
The approach sketched here is pretty involved and will probably take some time to implement. To find a good starting point that addresses the actual use case, could you expand a bit about the background in OERSI that you need this for? Is it described in some OERSI issue? |
I remarked that a general measurement converter is probably to broad. First is convert incoming 83941 -> 01M24S (if I am not mistaken)
I could illustrate them on a more concrete level, since both are related to |
Example for duration: https://gitlab.com/oersi/oersi-etl/-/merge_requests/273 They fail since they are Example for size: https://gitlab.com/oersi/oersi-etl/-/merge_requests/274 ("contentSize": "492.08 MB" should be "515983278.08") |
Example for size: https://gitlab.com/oersi/oersi-etl/-/merge_requests/274 ("contentSize": "492.08 MB" should be "515983278.08") |
For a general approach in metafacture-fix, we might want to use the existing |
Unfortunately, this would not be compatible with the current format string parameter. |
In context of OERSI I need to transform ms into ISO 8601:2004-Format: https://www.iso.org/standard/40874.html
83941 -> 01M24S (if I am not mistaken)
Is there a way to introduce a measurement converter perhaps not only for day-time but for other measurement units and standards too?
unit_converter("duration",is: "ms", to:"ISO8601:2004")
The text was updated successfully, but these errors were encountered: