You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Is there an option to return execute_sql results as a list of dictionaries? #958
right now the results returned from snapshot.execute_sql() gets returned as a list of arrays. Is there an existing configuration to change the return format of the StreamedResultSet object?
I would like to use keys instead of row indices when pulling values out for further processing. If i ever had to update the running query I would have to make sure my indices are correct. I can easily convert the row to dictionary but want to see if there's a configuration i'm missing.
hi @yaozhang09, currently we don't. If you like we can add an additional function which you can use on the result returned. But we won't be able to change the existing functionality as it will be breaking change. Let me know 😊
Activity
asthamohta commentedon Jun 12, 2023
hi @yaozhang09, currently we don't. If you like we can add an additional function which you can use on the result returned. But we won't be able to change the existing functionality as it will be breaking change. Let me know 😊
yaozhang09 commentedon Jun 12, 2023
that would be great if another function that would allow us to return the results in a different format, thanks for letting me know!
asthamohta commentedon Jun 21, 2023
Sure give me some time. Thanks
asthamohta commentedon Aug 17, 2023
Hi @yaozhang09, can you check if this is as requested? https://github.com/googleapis/python-spanner/pull/1003/files
yaozhang09 commentedon Sep 25, 2023
sorry just following up, this LGTM