troubleshooting
How to access nested protobuf schemas in Risingwave SQL?
I am trying to access multiple nested protobuf schemas in Risingwave SQL but it seems they are not resolved. Do I need a special syntax for this? The documentation is not clear. Can you provide an example of how to access nested protobuf schemas in Risingwave SQL?
Ya
Yannick Koechlin
Asked on Sep 29, 2023
- To access nested protobuf schemas in Risingwave SQL, you can use the following syntax:
(struct_name).field_name
For example, to access the url
field within the site
structure, you would use (site).url
.
- If you want to learn more about the internal schema structure, you can use the
describe
statement in Risingwave SQL:
describe table_or_source_name;
This will list the columns and their data types, giving you insights into the schema.
- When working with field names in protobuf, it is recommended to use snake_case. If you encounter issues with casing, always double quote the names to ensure compatibility with Risingwave SQL's case folding. For example, if the field name in protobuf is
url
, using a quotedUrl
might fail due to case sensitivity.
Sep 29, 2023Edited by