CS 327E Class 11 November 25, 2019 Announcements Milestone 12: - - PowerPoint PPT Presentation

cs 327e class 11
SMART_READER_LITE
LIVE PREVIEW

CS 327E Class 11 November 25, 2019 Announcements Milestone 12: - - PowerPoint PPT Presentation

CS 327E Class 11 November 25, 2019 Announcements Milestone 12: What: Group Presentations. When: Week of Dec. 9th. M-F 6:00pm - 8:00pm. Where: TBD. Requested Action: Email me your preferred times by EOD tomorrow. 1) In


slide-1
SLIDE 1

CS 327E Class 11

November 25, 2019

slide-2
SLIDE 2

Announcements

Milestone 12:

  • What: Group Presentations.
  • When: Week of Dec. 9th. M-F 6:00pm - 8:00pm.
  • Where: TBD.
  • Requested Action: Email me your preferred times by EOD tomorrow.
slide-3
SLIDE 3

1) In Airflow, a workflow is modeled as a _______ ?

A. Undirected Cyclic Graph B. Directed Acyclic Graph C. Directed Graph

slide-4
SLIDE 4

2) How is a DAG defined in Airflow?

A. Standard SQL file B. Jinja template file C. Standard Python file

slide-5
SLIDE 5

3) How is a task executed in Airflow?

A. The unit of work is executed by a single Operator B. The unit of work is executed by multiple Operators C. The unit of work is executed by a SubDag

slide-6
SLIDE 6

4) What does the statement t1 >> t2 mean where t1 and t2 each represent a task?

A. t1 runs first and t2 runs second B. t2 runs first and t1 runs second C. t1 and t2 must run in parallel D. t1 and t2 do not have an ordering

slide-7
SLIDE 7

5) A trigger rule specifies the conditions under which the tasks can _______.

A. execute B. sleep C. succeed D. fail

slide-8
SLIDE 8

Airflow System

slide-9
SLIDE 9

Basic Commands

airflow test <dag_name> <task_name> <yyyy-mm-dd> airflow backfill <dag_name> -s <yyyy-mm-dd> -e <yyyy-mm-dd> airflow clear <dag_name> -s <yyyy-mm-dd> -e <yyyy-mm-dd> airflow list_tasks <dag> --tree airflow list_dags # requires scheduler to be running

slide-10
SLIDE 10

Airflow Setup

https://github.com/cs327e-fall2019/snippets/wiki/Airflow-Setup

slide-11
SLIDE 11

Hands-on Exercise

git clone https://github.com/cs327e-fall2019/snippets.git

  • r

git pull origin master to pull down the latest code 6 Relevant Files: 01_oscar_workflow.py - 04_oscar_workflow.py

  • scars_Winning_Actors.py + oscars_Winning_Actresses.py
slide-12
SLIDE 12

Practice Problem

Run and fix 04_oscar_workflow.py

slide-13
SLIDE 13

Practice Problem

Run and fix 04_oscar_workflow.py

What is the cause of the error: Relationships can

  • nly be set between Operators; received

str? A. Incorrect use of BashOperator B. Task is missing from DAG C. Invalid SQL syntax

slide-14
SLIDE 14

Milestone 11

http://www.cs.utexas.edu/~scohen/milestones/Milestone11.pdf