-
Notifications
You must be signed in to change notification settings - Fork 126
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
Google Big Query Connector #1566
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1566 +/- ##
==========================================
+ Coverage 85.46% 85.61% +0.15%
==========================================
Files 230 232 +2
Lines 45996 47014 +1018
==========================================
+ Hits 39309 40250 +941
- Misses 6687 6764 +77
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 2269936374
💛 - Coveralls |
Left to do:
|
trace_id: "".to_string(), | ||
rows: Some(append_rows_request::Rows::ProtoRows(ProtoData { | ||
writer_schema: Some(ProtoSchema { | ||
proto_descriptor: Some(mapping.descriptor().clone()), |
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.
this only needs to be provided upon the first request (after connect). We could store the full ProtoSchema
in an Option<ProtoSchema>
and extract it with a self.proto_schema.take()
here and have it be a None
all the time, saving 1 clone. :)
We could do the same with trace_id
if we would have it configured on the connector.
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 see that this is indeed what the docs say. But appraently it's not true:
[2022-04-29T11:47:12Z ERROR tremor_runtime::connectors::impls::gbq::writer::sink] BigQuery error: status: InvalidArgument, message: "Expect a user schema to be passed in Entity: projects/.../datasets/test/tables/streaming_test/streams/...", details: [], metadata: MetadataMap { headers: {}
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.
interesting, very interesting... :oldmanshakesfistatcloud:
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.
Could it be that the client we use under the hood close the connection for each request and that's why we need to re-send it? GRPC does favour long lived connections.
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 underlying client is tonic
, which is pretty good about handling long-lived connections, as far as I know. On the other hand - we're using HTTP here, so I expect the connection might not survive forever.
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.
Oh if it's HTTP not HTTP2 then that explains it, http will be counted as 1 connection per request, using http2/quick would probably solve that
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.
We should be able to use grpc status codes for this purpose - perhaps thats something worth investigating and optimising in a separate ticket ( this would impact otel similarly and in future other grpc endpoints )
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
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.
🚀
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
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.
LGTM 🛩️
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
Signed-off-by: Ramona Luczkiewicz <rluczkiewicz@wayfair.com>
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.
🚀 great work!
Signed-off-by: Ramona Luczkiewicz rluczkiewicz@wayfair.com
Pull request
Description
This of course is a very early prototype that does not do anything useful, except for writing the same row over and over.
You can get the token by running
gcloud auth print-access-token
(this will be replaced with proper google cloud auth).Related
Checklist
Performance