-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Partial impletmentation of sql and schemas
- Loading branch information
keegansmith21
committed
May 14, 2024
1 parent
f05526c
commit db2424e
Showing
27 changed files
with
252 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"mode": "REQUIRED", | ||
"name": "ISBN13", | ||
"type": "STRING", | ||
"description": "13 Digit ISBN of the book." | ||
}, | ||
{ | ||
"mode": "REQUIRED", | ||
"name": "month", | ||
"type": "DATE", | ||
"description": "Start date for period of analytics info." | ||
}, | ||
{ | ||
"mode": "REQUIRED", | ||
"name": "value", | ||
"type": "INTEGER", | ||
"description": "Measured value." | ||
}, | ||
{ | ||
"mode": "REQUIRED", | ||
"name": "release_date", | ||
"type": "DATE", | ||
"description": "The end date of the release month" | ||
} | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
[ | ||
{ | ||
"description": "The id of the book.", | ||
"mode": "NULLABLE", | ||
"name": "ID", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Publication year.", | ||
"mode": "NULLABLE", | ||
"name": "YEAR", | ||
"type": "INTEGER" | ||
}, | ||
{ | ||
"description": "Publication month.", | ||
"mode": "NULLABLE", | ||
"name": "MONTH", | ||
"type": "INTEGER" | ||
}, | ||
{ | ||
"description": "Resource type.", | ||
"mode": "NULLABLE", | ||
"name": "RESOURCE_TYPE", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Resource id.", | ||
"mode": "NULLABLE", | ||
"name": "RESOURCE_ID", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "ISBN of the book on MUSE.", | ||
"mode": "NULLABLE", | ||
"name": "ISBN", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Title of the book.", | ||
"mode": "NULLABLE", | ||
"name": "RESOURCE", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "URL of the book.", | ||
"mode": "NULLABLE", | ||
"name": "RESOURCE_URL", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Date of launch.", | ||
"mode": "NULLABLE", | ||
"name": "RESOURCE_LAUNCH", | ||
"type": "DATE" | ||
}, | ||
{ | ||
"description": "Author of the book.", | ||
"mode": "NULLABLE", | ||
"name": "AUTHOR", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Title of the chapter.", | ||
"mode": "NULLABLE", | ||
"name": "FULLTEXT_TITLE", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "URL of the chapter.", | ||
"mode": "NULLABLE", | ||
"name": "FULLTEXT_URL", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Date of fulltext launch.", | ||
"mode": "NULLABLE", | ||
"name": "FULLTEXT_LAUNCH", | ||
"type": "DATE" | ||
}, | ||
{ | ||
"description": "Issue.", | ||
"mode": "NULLABLE", | ||
"name": "ISSUE", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Format.", | ||
"mode": "NULLABLE", | ||
"name": "FORMAT", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Access type.", | ||
"mode": "NULLABLE", | ||
"name": "ACCESS", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Country Name.", | ||
"mode": "NULLABLE", | ||
"name": "COUNTRY", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Institution name.", | ||
"mode": "NULLABLE", | ||
"name": "INSTITUTION", | ||
"type": "STRING" | ||
}, | ||
{ | ||
"description": "Number of requests.", | ||
"mode": "NULLABLE", | ||
"name": "REQUESTS", | ||
"type": "INTEGER" | ||
}, | ||
{ | ||
"mode": "REQUIRED", | ||
"name": "release_date", | ||
"type": "DATE", | ||
"description": "Last day of the release month. Table is partitioned on this column." | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/book_metrics_altmetrics.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.altmetrics.total_downloads) AS altmetrics |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.amazon.total_downloads) AS amazon |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/book_metrics_amazon_ltd.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.amazon_ltd.total_downloads) AS amazon_ltd |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/book_metrics_internet_archive.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.internet_archive.total_downloads) AS internet_archive |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/book_metrics_scholarcommons_ltd.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.scholarcommons_ltd.total_downloads) AS scholarcommons_ltd |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/book_metrics_scholarspace_downloads.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.scholarspace_downloads.total_downloads) AS scholarspace_downloads |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/book_metrics_scholarspace_views.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.scholarspace_views.total_downloads) AS scholarspace_views |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STRUCT(month.sci_open.total_downloads) AS sci_open |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_altmetrics.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
altmetrics_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ altmetrics_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_amazon.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
amazon_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ amazon_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_amazon_ltd.sql.jinja
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
amazon_ltd_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ amazon_ltd_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_internet_archive.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
internet_archive_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ internet_archive_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_scholarcommons_ltd.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
scholarcommons_ltd_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ scholarcommons_ltd_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_scholarspace_downloads.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
scholarspace_downloads_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ scholarspace_downloads_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_scholarspace_views.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
scholarspace_views_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ scholarspace_views_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
11 changes: 11 additions & 0 deletions
11
dags/oaebu_workflows/sql/shmp_pilot/book_product_body_sci_open.sql.jinja2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
altmetrics_metrics as ( | ||
SELECT | ||
ISBN13, | ||
release_date, | ||
value, | ||
FROM | ||
`{{ altmetrics_table_id }}` | ||
GROUP BY | ||
ISBN13, | ||
release_date | ||
), |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.altmetrics IS NOT NULL |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.amazon IS NOT NULL |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.amazon_ltd IS NOT NULL |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/month_null_internet_archive.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.internet_archive IS NOT NULL |
Empty file.
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/month_null_scholarspace_commons_ltd.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.scholarspace_commons_ltd IS NOT NULL |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/month_null_scholarspace_downloads.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.scholarspace_downloads IS NOT NULL |
1 change: 1 addition & 0 deletions
1
dags/oaebu_workflows/sql/shmp_pilot/month_null_scholarspace_views.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.scholarspace_views IS NOT NULL |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
month.sci_open IS NOT NULL |