Last active
July 19, 2021 02:06
-
-
Save voycey/a89de679c26c185bcf19240ff5d731c1 to your computer and use it in GitHub Desktop.
NEM12 Transformation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapped_readings = ApplyMapping.apply(frame=datasource, mappings=[ | |
("meter_id", "string", "meter_id", "string"), | |
("period_start", "string", "period_start", "string"), | |
("period_end", "string", "period_end", "string"), | |
("e1", "double", "export_interval.e1", "double"), | |
("e2", "double", "export_interval.e2", "double"), | |
("e3", "double", "export_interval.e3", "double"), #NB: this can technically have many more circuits | |
("quality_method", "string", "quality_method", "string"), | |
("event", "string", "event", "string"), | |
("b1", "double", "import_interval.b1", "double"), | |
("b2", "double", "import_interval.b2", "double"), | |
("k1", "double", "import_reactive.k1", "double"), | |
("k2", "double", "import_reactive.k2", "double"), | |
("q1", "double", "export_reactive.q1", "double"), | |
("q2", "double", "export_reactive.q2", "double") | |
], transformation_ctx="mapped_readings") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment