This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass | |
| @dataclass | |
| class SimpleDataObject(object): | |
| ''' | |
| In this case, | |
| __init__, __repr__, __eq__, will all be generated automatically. | |
| ''' | |
| field_a: int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| A DAG docstring might be a good way to explain at a high level | |
| what problem space the DAG is looking at. | |
| Links to design documents, upstream dependencies etc | |
| are highly recommended. | |
| """ | |
| from datetime import datetime, timedelta | |
| from airflow.models import DAG # Import the DAG class | |
| from airflow.operators.sensors import NamedHivePartitionSensor | |
| from airflow.operators.hive_operator import HiveOperator |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Table information like sortkeys, unsorted percentage | |
| -- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html | |
| SELECT * FROM svv_table_info; | |
| -- Table sizes in GB | |
| SELECT t.name, COUNT(tbl) / 1000.0 AS gb | |
| FROM ( | |
| SELECT DISTINCT datname, id, name | |
| FROM stv_tbl_perm | |
| JOIN pg_database ON pg_database.oid = db_id |