Configure VS Code to Develop Airflow DAGs with Docker at ease!

Configure VS Code to Develop Airflow DAGs with Docker at ease!
🏆 BECOME A PRO WITH AIRFLOW: www.udemy.com/course/the-comp...
In this video, you will learn to configure Visual Studio Code with Apache Airflow running in Docker.
You will discover:
✅ How to remove warnings and import errors with Airflow and VS Code
✅ How to enable autocompletion with Airflow and VS Code
✅ How to create a Dev Container to develop DAGs easily
✅ Differences between the Airflow Docker Compose file and the Astro CLI
And more!
Step up with your local development environment, and enjoy writing DAGs with VS Code!
00:00 Introduction
00:27 Prerequisites
01:11 Install Dev Containers
01:42 No auto-completion and warnings
01:52 The purpose of Dev Containers
02:10 Create your Dev Container
03:16 Enable the auto-completion
04:19 Auto-completion with a new provider
04:36 How to do it with the Astro CLI
07:31 How to do it with the Airflow Docker Compose file
07:41 Create the Dockerfile
08:17 Create and configure the Dev Container
09:40 How to open a local terminal
10:07 Use the Dockerfile in the Docker compose file
10:31 How to close and reopen the container

Пікірлер: 20

  • @2998sebastian
    @2998sebastian7 ай бұрын

    Great video! Just what I was waiting for!

  • @carloslepe4191
    @carloslepe41917 ай бұрын

    Since I watched the lesson in the astro airflow 101 where you configured pycharm i tried to do the same in VScode, now with this, that is possible, thanks!

  • @BikeNatureExplorer

    @BikeNatureExplorer

    5 ай бұрын

    And I couldn't do it with PyCharm Pro according to the video from 101. It doesn't see any packages.

  • @user-c3p0-zk1mr
    @user-c3p0-zk1mr7 ай бұрын

    Almost the perfect tutorial to Airflow/Docker with VS Code. What does your devcontainer.json file look like? How did you set it up? Which command did you use to run it? Basic stuff missing 😞

  • @MarcLamberti

    @MarcLamberti

    6 ай бұрын

    You actually do nothing. The VS extension creates this file for you. But I agree, I should have covered that 😞

  • @cellentmaya1533
    @cellentmaya15337 ай бұрын

    Hi Marc, "Add Dev Container Configuration Files" from Dockerfile is not there anymore (at least for me!) Has it changed? Thanks

  • @user-my8fv4lu5h
    @user-my8fv4lu5h5 ай бұрын

    Hello Marc, thank you for showing and explaining airflow for beginners. You doing a great service for the python community. Do you have a recommendation how to add oracle libs? I want to connect to a oracle db in my local astro airflow instance. I use docker Desktop on windows. The connection only works with cx_oracle in thick mode. I dont know how to add the oracle lib or build dependencies for cx_oracle in my docker. :)

  • @user-nq5ro4kb7o
    @user-nq5ro4kb7o6 ай бұрын

    Nice thanks

  • @roguegalaxi1
    @roguegalaxi17 ай бұрын

    Hai Marc, I've watch your video almost most of it and it's really great to help me understand the airflow. Somehow i have a very big question. Do you have any idea or video recommendation to make me understand how to deploy the DAG using github or another method ?

  • @MarcLamberti

    @MarcLamberti

    7 ай бұрын

    Thank you for your support. You mean CICD?

  • @roguegalaxi1

    @roguegalaxi1

    7 ай бұрын

    Yes .. kinda like DAG deployment@@MarcLamberti

  • @satisfyingly1
    @satisfyingly17 ай бұрын

    Hi Marc, Do you have any idea how to connect with Amazon MWAA database. Not able to see any db in RDS.

  • @unspellable1988
    @unspellable19887 ай бұрын

    Hey! Noob here. After opening vscode in a Dev Container, and using the bash terminal instead (as you showed in the video with /bin/bash), the terminal does not recognize astro commands anymore. I did install the CLI locally, so I guess I need to do so again inside the container? I did not see any step regarding this in the video why I got a bit confused. At the end you're showing how to open a local terminal, am I right to assume that this is the terminal to use for astro CLI? My understanding is this: - Open vscode remotely inside the docker container to edit files. This allows us to get the auto-completion, syntax highlighting, great stuff. - Open a terminal locally from the docker container which allows us to be back on our machine again and have access to things like the astro CLI. - The docker container created has bind mounts, which means that edited files will be synced between the local machine and the container, meaning that everything it doesn't really matter *where* you edit, but it makes the developer experience better to do so from a dev container.

  • @MarcLamberti

    @MarcLamberti

    6 ай бұрын

    Yes, that’s because you are in the container. You must reopen a terminal on your machine. Here the answer to your question stackoverflow.com/questions/71145541/how-to-open-local-terminal-when-running-vscode-in-a-dev-container

  • @MrLGrossman
    @MrLGrossman7 ай бұрын

    Thanks for great video. But what about debug DAG file, before put it to Aipflow? Please show us!

  • @MarcLamberti

    @MarcLamberti

    7 ай бұрын

    Will do 😉

  • @MrLGrossman

    @MrLGrossman

    2 ай бұрын

    @@MarcLamberti stiil waiting ;)

  • @slords
    @slords3 ай бұрын

    Doing the following in the Dockerfile should put the required modules in the right place: USER root COPY requirements.txt . RUN pip install --no-cache -r requirements.txt && rm requirements.txt

  • @almostworthy2973
    @almostworthy29735 ай бұрын

    version: '3' services: prady1900-airflow: build: context: "." volumes: - ./airflow:/opt/airflow ports: - "8080:8080" command: airflow standalone When I try to open dev container using the following docker-compose.yml the container starts and then disconnects automatically. Can someone help on how to use docker-compose to start an dev container? Error: Command failed: F:\VS Code\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node