Skip to content

Commit d4f4f32

Browse files
committed
adding DDL for the iceberg table into the bronze layer
1 parent b209548 commit d4f4f32

File tree

2 files changed

+116
-2
lines changed

2 files changed

+116
-2
lines changed

readme.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# NAU ANALYTICS - External Entities data product #
2+
## Overview ##
3+
This repository contains all the necessary PySpark scripts, Dockerfile, and SQL queries used to create the data products for the External Entities domain within the NAU platform.
4+
5+
The orchestrator DAGs are maintained in a separate repository due to Kubernetes deployment requirements and organizational structure.
6+
7+
## Structure ##
8+
```
9+
root/
10+
├────.github/
11+
| ├── workflows/
12+
| ├── docker-build-push.yml
13+
|
14+
├───Docker/
15+
| ├─── Dockerfile
16+
|
17+
|
18+
├─── src/
19+
| ├─── bronze/
20+
| ├── python/
21+
| | ├────
22+
| ├── sql/
23+
| |
24+
| ├── utils/
25+
| ├─── __init__.py
26+
| ├─── config.py # dataclass for the necessary config objects
27+
| |
28+
|
29+
|
30+
```
Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,86 @@
1-
-- TDB --
2-
-- TABLE DDL FOR THE ICEBERG CATALOG --
1+
CREATE TABLE bronze_local.entidades.course_overviews_courseoverview (
2+
id STRING NOT NULL,
3+
4+
created TIMESTAMP NOT NULL,
5+
modified TIMESTAMP NOT NULL,
6+
version INT NOT NULL,
7+
8+
_location STRING NOT NULL,
9+
10+
display_name STRING,
11+
display_number_with_default STRING NOT NULL,
12+
display_org_with_default STRING NOT NULL,
13+
14+
start TIMESTAMP,
15+
end TIMESTAMP,
16+
17+
advertised_start STRING,
18+
course_image_url STRING NOT NULL,
19+
social_sharing_url STRING,
20+
end_of_course_survey_url STRING,
21+
22+
certificates_display_behavior STRING,
23+
certificates_show_before_end BOOLEAN NOT NULL,
24+
cert_html_view_enabled BOOLEAN NOT NULL,
25+
has_any_active_web_certificate BOOLEAN NOT NULL,
26+
27+
cert_name_short STRING NOT NULL,
28+
cert_name_long STRING NOT NULL,
29+
30+
lowest_passing_grade DECIMAL(5,2),
31+
days_early_for_beta DOUBLE,
32+
33+
mobile_available BOOLEAN NOT NULL,
34+
visible_to_staff_only BOOLEAN NOT NULL,
35+
36+
_pre_requisite_courses_json STRING NOT NULL,
37+
38+
enrollment_start TIMESTAMP,
39+
enrollment_end TIMESTAMP,
40+
enrollment_domain STRING,
41+
42+
invitation_only BOOLEAN NOT NULL,
43+
max_student_enrollments_allowed INT,
44+
45+
announcement TIMESTAMP,
46+
47+
catalog_visibility STRING,
48+
course_video_url STRING,
49+
effort STRING,
50+
short_description STRING,
51+
52+
org STRING NOT NULL,
53+
54+
self_paced BOOLEAN NOT NULL,
55+
marketing_url STRING,
56+
57+
eligible_for_financial_aid BOOLEAN NOT NULL,
58+
language STRING,
59+
60+
certificate_available_date TIMESTAMP,
61+
end_date TIMESTAMP,
62+
start_date TIMESTAMP,
63+
64+
banner_image_url STRING NOT NULL,
65+
66+
has_highlights BOOLEAN,
67+
68+
allow_proctoring_opt_out BOOLEAN NOT NULL,
69+
enable_proctored_exams BOOLEAN NOT NULL,
70+
71+
proctoring_escalation_email STRING,
72+
proctoring_provider STRING,
73+
74+
entrance_exam_enabled BOOLEAN NOT NULL,
75+
entrance_exam_id STRING NOT NULL,
76+
entrance_exam_minimum_score_pct DOUBLE NOT NULL,
77+
78+
external_id STRING,
79+
80+
force_on_flexible_peer_openassessments BOOLEAN NOT NULL,
81+
82+
ingestion_date TIMESTAMP NOT NULL,
83+
source_name STRING NOT NULL
84+
)
85+
USING ICEBERG
86+
PARTITIONED BY (days(ingestion_date))

0 commit comments

Comments
 (0)