Skip to content

DATA-3443: Add export_tabular_data to data client #800

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

Merged
merged 12 commits into from
Dec 17, 2024

Conversation

katiepeters
Copy link
Member

@katiepeters katiepeters commented Dec 11, 2024

This PR adds the new Data endpoint ExportTabularData to the python SDK.

@katiepeters katiepeters marked this pull request as ready for review December 12, 2024 17:14
@katiepeters katiepeters requested a review from a team as a code owner December 12, 2024 17:14
request = ExportTabularDataRequest(
part_id=part_id, resource_name=resource_name, resource_subtype=resource_subtype, method_name=method_name, interval=interval
)
return await self._data_client.ExportTabularData(request, metadata=self._metadata)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExportTabularDataResponse has a lot of data in it that is maybe not needed? Which fields on the response would the user actually care about? Is it only the payload? Or also tags?

payload is a proto.Struct, which has really bad UI. We should avoid using that where we can, so we should determine what's actually important to return

Copy link
Member Author

@katiepeters katiepeters Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a note in the scope to optionally only return the payload in the future. As for the comment regarding proto.Struct, probably best for us to talk in person, so I'll wander over to your area again at some point!

@katiepeters katiepeters requested review from vijayvuyyuru, a team and purplenicole730 and removed request for a team December 12, 2024 19:06
@katiepeters katiepeters requested a review from njooma December 12, 2024 23:04
Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

tags: List[str]
"""A list of tags associated with the data point"""

payload: Mapping[str, Any]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this payload is coming from a proto.Struct, you might want to make this Mapping[str, ValueTypes] (from viam.utils import ValueTypes)

Copy link
Member

@vijayvuyyuru vijayvuyyuru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me, but will defer to anything the SDK team says on this. Thanks Katie!

@katiepeters katiepeters merged commit 0128ba8 into viamrobotics:main Dec 17, 2024
11 of 12 checks passed
@katiepeters katiepeters deleted the DATA-3443 branch December 17, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants