Materializing Metrics using Python
Materializations are invoked through the interfaces and scheduled to run at a cadence. The configuration for the materialization must already exist in your Transform configurations in order for you to run this command. For more information on Materializations, see here.
#
Usage#
ExamplesThe materialization-name should map to the one committed in your Transform directory. If you don't provide a start and end-time, the materialization will run across all available data, which can be very expensive.
mql.materialize("my_materialization") # synchronous
mql.create_materialization("my_materialization") # asynchronous
Providing a start and end time will bound the data for the materialization.
mql.materialize("my_materialization", start_time="2020-01-01", end_time="2020-01-31")
By default, the materialization will write to the Transform schema and any other location you've specified in the destinations for your configuration. Optionally provide a specific schema and table to write the materialization to. Note this won't be managed by Transform once it's written outside of our cache.
mql.materialize("my_materialization", start_time="2020-01-01", end_time="2020-01-31", output_table=<my_schema>.<my_table>)