Can't use timeframes
What is the current bug behavior?
The frontend crashes with a backtrace when I try to use timeframes
Note: Timeframes may only existing in the carbon intensity model
What is the expected correct behavior?
The frontend renders timeframes (dimension groups)
Steps to reproduce
My table _computed.exchanges
schema:
Column | Type | Modifiers | Storage | Description
-----------------+-----------------------------+-----------+----------+-------------
block_id | bigint | | plain |
block_signed_at | timestamp without time zone | | plain |
exchange | text | | extended |
token | text | | extended |
val | integer | | plain |
In your table definition:
{
sql_table_name = "_computed.exchanges"
name = "uniswap_exchanges"
columns {
block_signed_at {
label = Block Signed At
type = time
sql = "{{table}}.block_signed_at"
}
exchange {
label = "Exchange"
type = string
sql = "{{table}}.exchange"
}
token {
label = "Token"
type = string
sql = "{{table}}.token"
}
}
timeframes {
block_signed_at {
hidden = false
label = "Signed At"
description = Selected from range in carbon data
type = time
periods = [{ name = week, label = Week, part = WEEK },
{ name = month, label = Month, part = MONTH },
{ name = year, label = Year, part = YEAR }]
convert_tz = no
sql = "{{table}}.block_signed_at"
}
}
aggregates {
total_count {
label = "Total count"
type = count
sql = "{{table}}.val"
}
}
}
Relevant logs and/or screenshots
The m5o files were parsed correctly and returned from the backend as seen in the response screenshot.
Possible fixes
Not sure how to debug Vue templates.
Further regression test
Ensure we automatically catch similar issues in the future
-
Write additional adequate test cases and submit test results -
Test results should be reviewed by a person from the team
Edited by Danielle Morrill