-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix/sources yml dbt2 compatibility #816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Derrick-Ryan-Giggs
wants to merge
7
commits into
DataTalksClub:main
Choose a base branch
from
Derrick-Ryan-Giggs:fix/sources-yml-dbt2-compatibility
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8561655
fix: remove freshness and loaded_at_field from sources.yml for dbt 2.…
Derrick-Ryan-Giggs 8964c92
Merge pull request #1 from Derrick-Ryan-Giggs/fix/sources-yml-dbt2-co…
Derrick-Ryan-Giggs e6bd6c4
fix: add 2019-2020 date filter to staging models for homework require…
Derrick-Ryan-Giggs b07ae27
Merge branch 'DataTalksClub:main' into fix/sources-yml-dbt2-compatibi…
Derrick-Ryan-Giggs ba84a14
Merge branch 'main' of https://github.com/Derrick-Ryan-Giggs/data-eng…
Derrick-Ryan-Giggs 75769b9
feat: add FHV tripdata source and staging model for 2019 data
Derrick-Ryan-Giggs 6079e82
Merge pull request #2 from Derrick-Ryan-Giggs/fix/sources-yml-dbt2-co…
Derrick-Ryan-Giggs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
19 changes: 19 additions & 0 deletions
19
04-analytics-engineering/taxi_rides_ny/models/staging/stg_fhv_tripdata.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| with source as ( | ||
| select * from {{ source('raw', 'fhv_tripdata') }} | ||
| ), | ||
|
|
||
| renamed as ( | ||
| select | ||
| 802E dispatching_base_num, | ||
| cast(pickup_datetime as timestamp) as pickup_datetime, | ||
| cast(dropOff_datetime as timestamp) as dropoff_datetime, | ||
| cast(PUlocationID as integer) as pickup_location_id, | ||
| cast(DOlocationID as integer) as dropoff_location_id, | ||
| SR_Flag as sr_flag | ||
| from source | ||
| where dispatching_base_num is not null | ||
| and pickup_datetime >= '2019-01-01' | ||
| and pickup_datetime < '2020-01-01' | ||
Derrick-Ryan-Giggs marked this conversation as resolved.
Show resolved
Hide resolved
Derrick-Ryan-Giggs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ) | ||
|
|
||
| select * from renamed | ||
Derrick-Ryan-Giggs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| packages: | ||
| - name: dbt_utils | ||
| package: dbt-labs/dbt_utils | ||
| version: 1.3.3 | ||
| - name: codegen | ||
| package: dbt-labs/codegen | ||
| version: 0.14.0 | ||
| sha1_hash: 01f31e0d658d76121f50e62b998342ebf138df11 | ||
| - package: dbt-labs/codegen | ||
| name: codegen | ||
| version: 0.14.0 | ||
| - package: dbt-labs/dbt_utils | ||
| name: dbt_utils | ||
| version: 1.3.3 | ||
| sha1_hash: 41a9a95a7d1e8d4dff67de764f3b1b8e9094807c |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.