Add Looker SDK and streaming support#2
Conversation
b407594 to
1e914b6
Compare
wnob
left a comment
There was a problem hiding this comment.
Leaving some general readability comments for now. Will think harder about this later. Since this is going to be a permanent "fixup" commit, we should be pretty careful about making sure it remains easy to rebase on master for every bump, so good to think about exactly how to break it into smaller commits for easy maintenance in posterity.
| dependencies { | ||
| "implementation"(platform(project(":bom"))) | ||
| // Add the locally bundled LookerSDK fat jar | ||
| "implementation"(files("../libs/looker-kotlin-sdk-f91f8ad.jar")) |
There was a problem hiding this comment.
Feels like we should file a cleanup bug to make this integration easier and throw it in the backlog for now.
There was a problem hiding this comment.
Yeah definitely - we will be building this jars locally for the foreseeable future. There was talk of getting this on maven and tied to official releases but I don't think that will happen soon.
|
|
||
| @Test | ||
| public void driverThrowsAuthExceptionForBlankProperties() throws SQLException { | ||
| Properties props = new Properties(); |
There was a problem hiding this comment.
http://go/unit-test-practices#structure
I find the arrange - act - assert structure does a lot for test readability. Just put some blank space in between each section. It's OK if some tests are more like arrange - act - assert - act - assert.
|
Thanks for the review @wnob! I am still exploring what we would need to have upstream, but my hope is that we can keep all meaningful changes in That said, response streaming into a series of IMO, Avatica has been open enough that we have not had to modify existing classes extensively. Any areas where this PR has done such modifications highlight potential Jira cases for upstream. |
78906b2 to
aa93bd9
Compare
dc7ec93 to
24e2532
Compare
b53d4d6 to
d9826eb
Compare
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
* Initial Looker SDK branch commit * Streaming LookerIterator * True streaming support * Make a specific Driver class and 'jdbc:looker:' protocol support * Add read timeout for stream * SQL Interface API endpoints * Use BlockingQueue of FrameEnvelopes rather than IO pipes * Fix illegal cast for queries with a single column * Stub driver for LookerRemoteMetaTest * Address feedback * Handle null values in stream * Rename driver to LookerDriver * Better error handling from API response * Support userAgent and make LookerResponseParser public for testing
# This is the 1st commit message: trigger ci # This is the commit message #2: Updating to support new Kotlin SDK with IAP suport and updating Kotlin SDK shadow jar packaged in libs # This is the commit message #3: Updating Kotlin Jar for java 8 # This is the commit message #4: Removing redundant code in createSdk # This is the commit message #5: Adding new Jar and IAP functionality Adding test Added additional tests to LookerSdkFactoryTest.java Updating testing Fixing checkstyle Fixing checkstyle Fixing checkstyle Fixing styling based on PR comments and adding props size to hashmap in createSdk adding update to assert message Updating tests for IAP Updating tests for IAP removed unneeded email decode check removed unneeded email decode check
Adds functionality described in go/scaling-avatica-looker-api.
To enable the the Looker SDK use
jdbc:looker(as opposed tojdbc:avatica:remote) as the JDBC URL protocol.NOTE: This is awaiting changes from b/288031194. Don't expect this to work properly without that work completed.
TODOs:
sql_interfaceendpoints.AuthTokens rather than raw header.metadatafromjson_biresult format. We currently skip right torows.Preparethen laterExecute. Currently we only overridePrepareAndExecute