-
Notifications
You must be signed in to change notification settings - Fork 2
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
Delete column from Materialized View #65
Conversation
There is a problem with your git connection, take a look to the documentation, specially:
|
set -e | ||
|
||
tb deploy | ||
../utils/populate_with_backfill.sh "date" "analytics_sessions_mv_v1" "analytics_sessions_v1" "analytics_sessions_1" "analytics_sessions_mv" "" "timestamp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beware the double underscore in analytics_sessions_mv__v1
, since we use that suffix as convention for VERSION and we are about to deprecate it, I'd directly use a different .datasource name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted the double underscore and just kept a single one _v1
to just work as a new resource but I keep getting an error in the backfill that I'm not sure how to solve.
Looking at the action log, it's detecting the change as renames. I'm not sure if it's the issue but is not what I was trying to do:
renamed: delete_column_materialized_view/datasources/analytics_sessions_mv.datasource -> delete_column_materialized_view/datasources/analytics_sessions_mv_v1.datasource
renamed: delete_column_materialized_view/pipes/analytics_sessions.pipe -> delete_column_materialized_view/pipes/analytics_sessions_v1.pipe
And then at line 182 I'm getting a:
Pipe 'analytics_sessions_v1' not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To debug the issue I went to the Environment related to this PR tmp_ci__65
and I've seen the changes have not been deployed.
The reason is tb deploy
does not deploy renamed resources (we have an issue about it). Rename is tricky because one thing is renaming a resource that keeps the same content (schema or nodes) and a different thing is renaming a resource with a change which should be a new resource + drop the old one.
For now, if we don't support rename tb deploy
should raise an error.
I'm going to see if I can undo the rename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, and good to document it @alrocar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After creating new resources instead of renaming, fixture tests started to fail, it's because we are using a pre-release version of the CLI and we need to hide the version warning.
It can be done adding TB_VERSION_WARNING=0
as an env variable in the .tinyenv file, if you look at the previous version it had it, I guess tb release generate --semver
preserves content of .tinyenv file so maybe it was modified by hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you a lot.
332a7b8
to
52b48d5
Compare
One last comment Let me think how to make it work better for this specific case. |
Add a new use case to explain how to remove a column from a Materialized View.