Closed benelser closed 1 year ago
To add further clarity, the cloud.google.com/go/spanner/spansql
package supports basic view functionality, but does not seem to support more advanced view syntax. When parsing generated view DDL from spanner, the spansql.ParseDdlStmt
fails.
A few possibilities:
[Views]: We are checking with feature team and will get back on it.
[External Contribution]: External contributions are not supported in current infrastructure, but we encourage contribution and would be happy if you contribute to make the emulator better. You can follow the following guidelines when making contributions:
For our team, support full support for views would be really important! Would love to see it soon :+1:
I am also interested in views in Spanner emulator. Just tried something like this:
CREATE VIEW myView AS (SELECT * FROM myTable);
and received the following error message:
UNIMPLEMENTED: `CREATE` for INVOKER RIGHTS views is not supported.
I've read that views are not supported in the Readme "Features not currently available: - Views". However, I was hopeful that they are supported since Tag v1.5.1. It says: "New Features: [...] Invoker Rights Views Support." Can you provide an example or explain what this feature is about?
@LeonStoldt it seems to be behind a feature flag of some kind https://github.com/GoogleCloudPlatform/cloud-spanner-emulator/blob/bf500538c354a9d57023105f32699f93c51f017c/backend/schema/updater/schema_updater.cc#L430-L433 . Trying to figure out a way to enable it since it seems relatively supported in code
I built a docker image with the enable_views flag turned on, but looks like it isn't fully ready yet - querying views in the emulator causes it to just hang indefinitely. Looking forward to when we can use this feature!
INVOKER rights views were enabled in release 1.5.6.
Please start accepting external contributions and implementing “view” functionality. This known limitation, along with Wrench's inability to parse “views”, presents a significant obstacle for users seeking rapid adoption of Spanner.
My specific problem:
i have a test phase which uses the emulator to validate ddl etc. This works great until I implement “views”. This is forcing me to stand up a “test” spanner instance to do this. If there are better known approaches please let me know.
I believe that addressing these concerns will not only enhance the overall user experience but also contribute to the furthering of Spanner’s widespread adoption and success by reducing unnecessary friction.