Skip to content
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

Spanner: Documentation missing for PROTO BUNDLE #1916

Open
SanjayVas opened this issue Feb 15, 2025 · 2 comments · Fixed by #1918 · May be fixed by #1912
Open

Spanner: Documentation missing for PROTO BUNDLE #1916

SanjayVas opened this issue Feb 15, 2025 · 2 comments · Fixed by #1918 · May be fixed by #1912
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API.

Comments

@SanjayVas
Copy link

There doesn't appear to be any documentation on how to deal with CREATE PROTO BUNDLE or ALTER PROTO BUNDLE DDL statements using the JDBC driver. There appears to be a PROTO_DESCRIPTORS variable that can be set.

SET PROTO_DESCRIPTORS = 'CvYCCgxzaW5nZXIucHJvdG8SFmV4YW1wbGVzLnNwYW5uZXIubXVzaWMi6gEKClNpbmdlckluZm8SIAoJc2luZ2VyX2lkGAEgASgDSABSCHNpbmdlcklkiAEBEiIKCmJpcnRoX2RhdGUYAiABKAlIAVIJYmlydGhEYXRliAEBEiUKC25hdGlvbmFsaXR5GAMgASgJSAJSC25hdGlvbmFsaXR5iAEBEjgKBWdlbnJlGAQgASgOMh0uZXhhbXBsZXMuc3Bhbm5lci5tdXNpYy5HZW5yZUgDUgVnZW5yZYgBAUIMCgpfc2luZ2VyX2lkQg0KC19iaXJ0aF9kYXRlQg4KDF9uYXRpb25hbGl0eUIICgZfZ2VucmUqLgoFR2VucmUSBwoDUE9QEAASCAoESkFaWhABEggKBEZPTEsQAhIICgRST0NLEANCKQoYY29tLmdvb2dsZS5jbG91ZC5zcGFubmVyQgtTaW5nZXJQcm90b1AAYgZwcm90bzM=';

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner-jdbc API. label Feb 15, 2025
olavloite added a commit that referenced this issue Feb 15, 2025
Adds a sample for using PROTO columns with the JDBC driver.

Fixes #1916
olavloite added a commit that referenced this issue Feb 15, 2025
Adds a sample for using PROTO columns with the JDBC driver.

Fixes #1916
@release-please release-please bot linked a pull request Feb 16, 2025 that will close this issue
@SanjayVas
Copy link
Author

Thanks for the very quick turnaround! I noticed that this doesn't document the PROTO_DESCRIPTORS or PROTO_DESCRIPTORS_FILE_PATH variables though, which would be how one would interact with the PROTO BUNDLE over pure DDL. This is necessary for schema management systems like Liquibase.

@olavloite
Copy link
Collaborator

@SanjayVas The SET PROTO_DESCRIPTORS and SET PROTO_DESCRIPTORS_FILE_PATH are the SQL equivalent of the setProtoDescriptors method. Meaning that instead of this method call, you can also execute:

SET PROTO_DESCRIPTORS_FILE_PATH='/path/to/descriptors.pb'

or

SET PROTO_DESCRIPTORS='<base64 encoded contents of the descriptor file>'

I'll try to add sample for the above as well some time in the coming days.

@olavloite olavloite reopened this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API.
Projects
None yet
2 participants