File tree Expand file tree Collapse file tree 3 files changed +40
-17
lines changed
cookbook/integrations/gcp/bigquery Expand file tree Collapse file tree 3 files changed +40
-17
lines changed Original file line number Diff line number Diff line change 1+ FROM python:3.8-slim-buster
2+ LABEL org.opencontainers.image.source https://github.com/flyteorg/flytesnacks
3+
4+ WORKDIR /root
5+ ENV VENV /opt/venv
6+ ENV LANG C.UTF-8
7+ ENV LC_ALL C.UTF-8
8+ ENV PYTHONPATH /root
9+
10+ RUN apt-get update && apt-get install -y build-essential curl
11+
12+ WORKDIR /opt
13+ RUN curl https://sdk.cloud.google.com > install.sh
14+ RUN bash /opt/install.sh --install-dir=/opt
15+ ENV PATH $PATH:/opt/google-cloud-sdk/bin
16+ WORKDIR /root
17+
18+ ENV VENV /opt/venv
19+ # Virtual environment
20+ RUN python3 -m venv ${VENV}
21+ ENV PATH="${VENV}/bin:$PATH"
22+
23+ # Install Python dependencies
24+ COPY bigquery/requirements.txt /root
25+ RUN pip install -r /root/requirements.txt
26+
27+ # Copy the makefile targets to expose on the container. This makes it easier to register
28+ COPY in_container.mk /root/Makefile
29+ COPY bigquery/sandbox.config /root
30+
31+ # Copy the actual code
32+ COPY bigquery/ /root/bigquery
33+
34+ # This tag is supplied by the build script and will be used to determine the version
35+ # when registering tasks, workflows, and launch plans
36+ ARG tag
37+ ENV FLYTE_INTERNAL_IMAGE $tag
Original file line number Diff line number Diff line change @@ -2,17 +2,3 @@ PREFIX=bigquery
22include ../../../common/common.mk
33include ../../../common/leaf.mk
44
5- .PHONY : docker_build
6- docker_build : ;
7-
8- .PHONY : docker_push
9- docker_push : ;
10-
11- .PHONY : register
12- register : ;
13-
14- .PHONY : serialize
15- serialize : ;
16-
17- .PHONY : docker_push
18- docker_push : ;
Original file line number Diff line number Diff line change 2020 name = "sql.bigquery.no_io" ,
2121 inputs = {},
2222 query_template = "SELECT 1" ,
23- task_config = BigQueryConfig (ProjectID = "flyte" , Location = "us-west1-b" ),
23+ task_config = BigQueryConfig (ProjectID = "flyte" ),
2424)
2525
2626
@@ -46,8 +46,8 @@ def no_io_wf():
4646 # Define inputs as well as their types that can be used to customize the query.
4747 inputs = kwtypes (version = int ),
4848 output_structured_dataset_type = DogeCoinDataset ,
49- task_config = BigQueryConfig (ProjectID = "flyte" , Location = "us-west1-b" ),
50- query_template = "SELECT * FROM `bigquery-public-data.crypto_dogecoin.transactions` WHERE @ version = 1 LIMIT 10;" ,
49+ task_config = BigQueryConfig (ProjectID = "flyte" ),
50+ query_template = "SELECT * FROM `bigquery-public-data.crypto_dogecoin.transactions` WHERE version = 1 LIMIT 10;" ,
5151)
5252
5353
You can’t perform that action at this time.
0 commit comments