How to Set do_xcom_push=False for all tasks of a dag


We need to set do_xcom_push=False for all task of a dag.
Is there any way to do it?

Currently we are doing it at task level by setting do_xcom_push=False for required task. but we have a lot of dags/task, so wanted to know if we can do it at dag level.

We are doing this as getting below error for few tasks.

sqlalchemy.exc.DataError: (MySQLdb._exceptions.DataError) (1406, "Data too long for column 'value' at row 1")
[SQL: INSERT INTO xcom (`key`, value, timestamp, execution_date, task_id, dag_id) VALUES (%s, %s, %s, %s, %s, %s)]
[parameters: ('return_value', b'"aGRmc19maWxlX2NvdW50IGlzIDogIDIyNApDb3BpbmcgZmlsZSBmcm9tIGhkZnMgdG8gbG9jYWwuLi4KL3VzZXIvc2lwam03aGl2ZWV0bC9kYXRhL2luZ2VzdC9mZl9lbmMvb3V0Ym91bmQvY21 ... (323445 characters truncated) ... ZSBtb3ZlIHN1Y2Nlc3MgZm9yIGZpbGUgL0RBVEEvT1VUQk9VTkQvU0RMX1BST0QvU0RMX09CRC9OR09CRF9KUFYyQ09SUE9SQVRFUFJFUEFJRE5DVF9IWURfMjAyMzA0MDZfMDcyMjIyLnR4dAo="', datetime.datetime(2023, 4, 6, 4, 46, 2, 391428), datetime.datetime(2023, 4, 5, 1, 45), 'file_enc_obd_sh', 'mcr_cmp_rvr_mobility_5g_sim_upgrade_1239')]

You can use

DAG( ... , default_args={"do_xcom_push": False,  .....  }, .... ) as dag:


Thanks a lot for your response.
Will implement it and check.