Skip to content

Tag: airflow

Why airflow is returning error while requesting Rest API?

I have a python code which is requesting a Rest API. The API has more than 5000+ pages so i tried to request it but always i am getting error at 2000th request. The error is: “df = pd.json_normalize(json_data[“items”]) KeyError: ‘items’” How can i solve this problem ? P.S. In loc…

Airflow DAG script print the value in logs

Actually I was passing JSON {“Column”: “ABC123”} in Airflow before triggering it and in DAG script I have written the code as below in DAG script Actually I want to print the value as 123 in Airflow logs but it is not printing in the logs…DAG runs successful but not able to print…

Decode UTF-8 encoded Xcom value from SSHOperator

I have two Airflow tasks that I want to communicate. The SSHOperator returns the last line printed, in this case, “remote_IP”. However, the SSHOperator’s return value is encoded using UTF-8. How can the SSHOperator Read_remote_IP return value non-encoded? Also, how can the BashOperator Read_…

How to install packages in Airflow (docker-compose)?

The question is very similar to the one already available. The only difference is that I ran Airflow in docker Step by step: Put docker-compose.yaml to PyCharm project Put requirements.txt to PyCharm project Run docker-compose up Run DAG and receive a ModuleNotFoundError I want to start Airflow using docker-c…