-
Notifications
You must be signed in to change notification settings - Fork 40
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
DATA-3444 Add exportTabularData to data client #428
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failing test needs to be addressed, otherwise lgtm!
src/app/data-client.ts
Outdated
resourceName: string; | ||
resourceSubtype: string; | ||
methodName: string; | ||
timeCaptured: Date; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per failing tests, I think this needs to be Date | undefined
since it's possible no timeCaptured
exists on the response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize we had to account for that with protobuf! Noted
methodName: string, | ||
startTime?: Date, | ||
endTime?: Date | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuqdog Wondering if I should change this to return AsyncIterableIterator<TabularDataPoint>
. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I suspect we need to be await
ing ourselves either way to convert into a TabularDataPoint
(or get into some funky async functional mapping). I guess that might be useful if someone just wants to stream all tabular data as it continues to come in? That seems like it adds more complexity/work to users so my thought is no, but there may be a use case I'm not thinking about (could someone use that to tail all data as it comes in? is that a use case we expect to be common?).
tl;dr weakly I support keeping as-is but open to being convinced otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of the use case where someone wants to retrieve a lot of data. Possibly even download it as a file
This PR adds the new Data endpoint ExportTabularData to the typescript SDK.