Change enum on history events to str#1379
Change enum on history events to str#1379samredai wants to merge 3094 commits intoDataJunction:mainfrom
Conversation
…on-0.0.1a79 Bump DataJunction version to 0.0.1a79
Make measures derived from metrics unique based on the expression
Support displaying markdown in node descriptions in the UI
…on-0.0.1a80 Bump DataJunction version to 0.0.1a80
Add is_hidden to DimensionAttributeOutput
…on-0.0.1a81 Bump DataJunction version to 0.0.1a81
…instead of overusing DJException
Co-authored-by: GitHub Actions Bot <>
* Add metric formatting metadata like significant digits and controls for using scientific notation * Add tests for sig figs * Add UI support for editing metric sigfigs * Fix client * Fix lint
Co-authored-by: GitHub Actions Bot <>
* Fix bug where editing a cube node with a materialization configured can error out based on there being no lookback_window * Fix and add new tests * Lint
…ed characters in the name (DataJunction#1363) * Include measures columns even when they contain reserved character sequences * Change logic to handle cases where there is a _DOT_ in the measure column name
* Add support for surfacing primary key in GQL * Speed up loading of the edit metric UI by retrieving only relevant fields via GQL * Fix lint and add test * Fix unit tests * Remove console.log
Co-authored-by: GitHub Actions Bot <>
* Support setting necessary levels for measures with DISTINCT aggregations * Add tests for decomposing to necessary levels for measures with DISTINCT aggregations * Make sure that preaggregate SQL generation takes into account measures levels * Add tests for distinct pre-agg handling
* Cache metrics list endpoint * Test that cache is hit on multiple calls to /metrics * Add a sleep to let background task cache finish in test * detect cache hit by counting list_nodes calls * Use mocker from pytest_mock * Switch to using standard module__client fixture * fix test
* Add support to execute database statement with retry logic for transient errors * Add support to execute database statement with retry logic for transient errors
Co-authored-by: GitHub Actions Bot <>
* node button cleanup & watch button * tag event type not create * lint * yarn lint * on_conflict_do_update * Fix unique key on notification preferences table * fix tests * lint * lint --------- Co-authored-by: samredai <sredai@netflix.com>
* Add detailed history for cube node changes * Add more metadata to cube updates
* Display multiple dimension links in node columns tab * Fix lint * Remove extraneous * Support ability to link (or unlink) multiple simple dimension links * Clean up * Fix unit tests * Fix missing set prototype difference func * Fix missing set prototype difference func
Co-authored-by: GitHub Actions Bot <>
* Add limit to findNodes GQL query * Add test coverage
Co-authored-by: GitHub Actions Bot <>
✅ Deploy Preview for thriving-cassata-78ae72 canceled.
|
| with op.batch_alter_table("history", schema=None) as batch_op: | ||
| batch_op.alter_column( | ||
| "entity_type", | ||
| existing_type=postgresql.ENUM( |
There was a problem hiding this comment.
Should this also drop the enum types from Postgres? Maybe with something like:
batch_op.execute("DROP TYPE IF EXISTS entitytype")
batch_op.execute("DROP TYPE IF EXISTS activitytype")
| entity_type: Mapped[Optional[EntityType]] = mapped_column( | ||
| Enum(EntityType), | ||
| entity_type: Mapped[Optional[str]] = mapped_column( | ||
| String(20), |
There was a problem hiding this comment.
No reason, I just thought that the postgres default of infinite length seemed unnecessary for what will just be a string representation of an enum value. Should I make this larger? Or maybe don't specify the length at all?
Good idea, let me populate it with enum values locally then run a migration and see what happens to the data. |
|
@samredai is this still on your radar? That seems like a good idea. |
|
@agorajek thanks for the reminder comment. Time was tight this past week but I'll try to do this testing soon and get this in. |
Summary
This changes the enum type for activity type and entity type to a string, only in the database model. This will let us modify/extend the history events in the source code more easily without having to do database migrations.
Test Plan
make checkpassesmake testshows 100% unit test coverageDeployment Plan