Xcom pull for Integer type

I have a function to push XCom values like this:

ti.xcom_push(key='a', value=1)
ti.xcom_push(key='b', value=2)
ti.xcom_push(key='c', value='string_a')

Here’s your text with improved grammar:


I have a function to push XCom values like this:

python

Copy code

ti.xcom_push(key='a', value=1)
ti.xcom_push(key='b', value=2)
ti.xcom_push(key='c', value='string_a')

However, when I pass parameters with xcom_pull in an operator like this:

operator(
    args1="{{ ti.xcom_pull('task', key='a') }}",
    args2="{{ ti.xcom_pull('task', key='b') }}",
    args3="{{ ti.xcom_pull('task', key='c') }}"
)

The operator expects args1 and args2 to be of type int, and args3 to be of type str. The operator throws an error because xcom_pull for keys a and b returns strings instead of integers. How can I convert these values to integers after pulling them and pass them to the operator correctly? The operator I’m using is ClusterGenerator.
The error is: TypeError: bad argument type for built-in operation.
Already add render_template_as_native_obj=True,