Skip to content

Commit

Permalink
feat(tippecanoe): add command line to airflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisig committed Dec 11, 2024
1 parent cc1ff49 commit d4bb488
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
13 changes: 13 additions & 0 deletions airflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
FROM quay.io/astronomer/astro-runtime:11.8.0

ENV DATA_DIR=data_tiles

RUN mkdir -p $DATA_DIR

# Install tippecanoe
RUN git clone https://github.com/mapbox/tippecanoe.git /home/astro/tippecanoe
USER root
WORKDIR /home/astro/tippecanoe
RUN make && make install
USER astro
WORKDIR /usr/local/airflow

RUN mkdir /home/astro/.dbt
COPY ./dbt_profile.yml /home/astro/.dbt/profiles.yml
21 changes: 21 additions & 0 deletions airflow/dags/tippecanoe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from airflow.decorators import dag, task
from pendulum import datetime


@dag(
start_date=datetime(2024, 1, 1),
schedule="@once",
catchup=False,
doc_md=__doc__,
max_active_runs=1,
default_args={"owner": "Alexis Athlani", "retries": 3},
)
def tippecanoe_test():
@task.bash
def test_command() -> str:
return "tippecanoe --help"

test_command()


tippecanoe_test()
7 changes: 7 additions & 0 deletions airflow/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ g++
wget
p7zip-full
postgresql-client
cmake
wget
git
ca-certificates
build-essential
libsqlite3-dev
zlib1g-dev

0 comments on commit d4bb488

Please sign in to comment.