GrpcOperator

gRPC

Calls a gRPC endpoint to execute an action

View on GitHub

Last Updated: Oct. 23, 2022

Access Instructions

Install the gRPC provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

stub_classRequiredThe stub client to use for this gRPC call
call_funcRequiredThe client function name to call the gRPC endpoint
grpc_conn_idThe connection to run the operator against
dataThe data to pass to the rpc call
interceptorsA list of gRPC interceptor objects to be used on the channel
custom_connection_funcThe customized connection function to return channel object. A callable that accepts the connection as its only arg.
streamingA flag to indicate if the call is a streaming call
response_callbackThe callback function to process the response from gRPC call, takes in response object and context object, context object can be used to perform push xcom or other after task actions
log_responseA flag to indicate if we need to log the response

Documentation

Calls a gRPC endpoint to execute an action

Was this page helpful?