This article describes what happens when you CHANGE an existing view that contains data.
However, if you don’t want to worry about this, simply create a new view and start using that, and then later remove the old view. Then you do not have to worry about what happens when you change an existing view.
However, sometimes you may want to change an existing view and this article will explain what happens when you do.
Even when you change a view, behind the scenes, a new view is created with the same name. For up to one minute, the old view may still be found when requesting data, but from then on, the new view will be found.
When a view is added, data is processed from the base data into the new view. The time it takes to populate a new view varies greatly. The two most important factors are the amount of data, of course, and the amount of partitions being written to the new view. The fewer partitions, the faster the new view will be created.
In broad strokes, the new view will be populated by a 1000 rows every 2-3 seconds. As mentioned, it may take significantly longer if you have many partitions in the view. If 1000 rows has a 1000 partitions, it could take about 30 seconds to add a 1000 rows.
While this is happening, the data in your view is incomplete. That means any queries against the view will simply not find all the data. Depending on the data volume, this may take a while. If you have one million rows in your base data, that would be 1000 times 3 seconds which is almost one hour. This gives you a ballpark idea about for how long your view will be incomplete.
Do not worry about new data being added to your base data in the meantime. It will be correctly processed and added to the new view, even if the new view is still being built.
If you don’t want your view to lack data while it is being rebuilt, you can take a different approach.
Instead of changing your existing view, create a new view (with a new name). Wait for it to be built and then start using the new view instead of the old view. When you are no longer using the old view, you can delete it.