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

Kotlin: support streaming #1341

Open
tjbanghart opened this issue Jul 17, 2023 · 0 comments
Open

Kotlin: support streaming #1341

tjbanghart opened this issue Jul 17, 2023 · 0 comments
Labels
enhancement New feature request kotlin Kotlin SDK issues p3 Priority 3

Comments

@tjbanghart
Copy link
Member

tjbanghart commented Jul 17, 2023

LookerSDKStream methods do not begin a true stream from a Looker instance to a client. The Transport class uses HttpResponse#receive which reads all contents of the response synchronously. This can cause issues for query task endpoints that may return millions of rows e.g. run_sql_query.

I purpose that LookerSDKStream methods take an optional execution block that would allow for true streamed responses. The example in the Ktor docs is nice. I'd like to be able to do something like this:

      sdk.stream.run_sql_query(querySlug, RESULT_FORMAT) { httpResponse ->
          val channel: ByteReadChannel = httpResponse.body()
          <write_bytes_to_some_output_buffer>
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request kotlin Kotlin SDK issues p3 Priority 3
Projects
None yet
Development

No branches or pull requests

2 participants