-
Notifications
You must be signed in to change notification settings - Fork 2
1.7.2 #191
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
Merged
Merged
1.7.2 #191
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
28780b5
adding EC2 instructions
digitalghost-dev ba8fb1a
updating subnet groups
digitalghost-dev 9d8fe15
initial commit
digitalghost-dev 7c764b1
initial commit
digitalghost-dev 1bd01ec
adding HCP cloud
digitalghost-dev 08527a4
updating workspace name
digitalghost-dev fe3c34e
updating variable name
digitalghost-dev 118e479
adding non-root user
digitalghost-dev ac4418f
removing private subnets
digitalghost-dev 0bce206
adding schedule for pricing_data
digitalghost-dev e4f477c
updating test data
digitalghost-dev 321c4d5
updating test data
digitalghost-dev d991b6f
Merge remote-tracking branch 'origin/1.7.2' into 1.7.2
digitalghost-dev 6ee6a86
updating egg group names to modern equivalents (#190)
digitalghost-dev adf217e
fixing accidental duplicate code (#190)
digitalghost-dev 7592556
updating version numbers
digitalghost-dev 724ab7f
fixing hyperlink
digitalghost-dev 3c7fde0
updating version numbers
digitalghost-dev 463f283
fixing formatting
digitalghost-dev 488d96e
fixing typo
digitalghost-dev 7210fc8
refactor load_pricing_data for explicit asset dependency
digitalghost-dev 9f0af93
introduce pricing_pipeline_job and update schedule
digitalghost-dev 812c234
Merge remote-tracking branch 'origin/1.7.2' into 1.7.2
digitalghost-dev 7033297
fixing imports
digitalghost-dev ec9d28c
renaming function
digitalghost-dev fccbd45
adding asset key to pricing_data source
digitalghost-dev bd9cf97
simplifying file, reducing code
digitalghost-dev 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
Some comments aren't visible on the classic Files Changed page.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
| resource "aws_instance" "tfer--i-01dbf82e21c0da38f_dagster-webserver" { | ||
| ami = "ami-0326baaa98cf958ed" | ||
| instance_type = "t4g.small" | ||
| key_name = "dagster-vm-key-pair" | ||
| subnet_id = "subnet-04fe6e100221b27d4" | ||
| vpc_security_group_ids = ["sg-04c2a30cb05044ad6", "sg-026cc204887184c98"] | ||
| ebs_optimized = true | ||
| monitoring = false | ||
|
|
||
| root_block_device { | ||
| delete_on_termination = true | ||
| } | ||
|
|
||
| tags = { | ||
| Name = "dagster-webserver" | ||
| } | ||
|
|
||
| tags_all = { | ||
| Name = "dagster-webserver" | ||
| } | ||
| } | ||
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,3 @@ | ||
| output "aws_instance_tfer--i-01dbf82e21c0da38f_dagster-webserver_id" { | ||
| value = "${aws_instance.tfer--i-01dbf82e21c0da38f_dagster-webserver.id}" | ||
| } |
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,20 @@ | ||
| provider "aws" { | ||
| region = "us-west-2" | ||
| } | ||
|
|
||
| terraform { | ||
| cloud { | ||
| organization = "digitalghost-dev" | ||
|
|
||
| workspaces { | ||
| project = "poke-cli" | ||
| name = "ec2" | ||
| } | ||
| } | ||
| required_providers { | ||
| aws = { | ||
| source = "hashicorp/aws" | ||
| version = "~> 6.7.0" | ||
| } | ||
| } | ||
| } |
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 |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ terraform { | |
|
|
||
| workspaces { | ||
| project = "poke-cli" | ||
| name = "poke-cli" | ||
| name = "rds" | ||
| } | ||
| } | ||
| required_providers { | ||
|
|
||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
| output "aws_vpc_tfer--vpc-0f9d6a37031fa6597_id" { | ||
| value = "${aws_vpc.tfer--vpc-0f9d6a37031fa6597.id}" | ||
| } |
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,20 @@ | ||
| provider "aws" { | ||
| region = "us-west-2" | ||
| } | ||
|
|
||
| terraform { | ||
| cloud { | ||
| organization = "digitalghost-dev" | ||
|
|
||
| workspaces { | ||
| project = "poke-cli" | ||
| name = "vpc" | ||
| } | ||
| } | ||
| required_providers { | ||
| aws = { | ||
| source = "hashicorp/aws" | ||
| version = "~> 6.7.0" | ||
| } | ||
| } | ||
| } |
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 @@ | ||
| resource "aws_vpc" "tfer--vpc-0f9d6a37031fa6597" { | ||
| assign_generated_ipv6_cidr_block = "false" | ||
| cidr_block = "10.0.0.0/20" | ||
| enable_dns_hostnames = "true" | ||
| enable_dns_support = "true" | ||
| enable_network_address_usage_metrics = "false" | ||
| instance_tenancy = "default" | ||
| region = "us-west-2" | ||
digitalghost-dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| tags = { | ||
| Name = "poke-cli-vpc" | ||
| project = "poke-cli" | ||
| } | ||
|
|
||
| tags_all = { | ||
| Name = "poke-cli-vpc" | ||
| project = "poke-cli" | ||
| } | ||
| } | ||
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,27 +1,34 @@ | ||
| from pathlib import Path | ||
|
|
||
| from dagster import definitions, load_from_defs_folder | ||
| from dagster_dbt import DbtCliResource, DbtProject, dbt_assets | ||
|
|
||
| import dagster as dg | ||
|
|
||
| from .defs.extract.extract_pricing_data import build_dataframe | ||
| from .defs.load.load_pricing_data import load_pricing_data | ||
|
|
||
|
|
||
| @definitions | ||
| def defs(): | ||
| return load_from_defs_folder(project_root=Path(__file__).parent.parent) | ||
|
|
||
| dbt_project_directory = Path(__file__).absolute().parent / "poke_cli_dbt" | ||
| dbt_project = DbtProject(project_dir=dbt_project_directory) | ||
|
|
||
| dbt_resource = DbtCliResource(project_dir=dbt_project) | ||
|
|
||
| # Compiles the dbt project & allow Dagster to build an asset graph | ||
| dbt_project.prepare_if_dev() | ||
|
|
||
| # Yields Dagster events streamed from the dbt CLI | ||
| @dbt_assets(manifest=dbt_project.manifest_path) | ||
| def dbt_models(context: dg.AssetExecutionContext, dbt: DbtCliResource): | ||
| yield from dbt.cli(["build"], context=context).stream() | ||
|
|
||
| # Dagster object that contains the dbt assets and resource | ||
| defs_dbt = dg.Definitions(assets=[dbt_models], resources={"dbt": dbt_resource}) | ||
| # load_from_defs_folder discovers dbt assets from transform_data.py | ||
| folder_defs = load_from_defs_folder(project_root=Path(__file__).parent.parent) | ||
| return dg.Definitions.merge(folder_defs, defs_pricing) | ||
|
|
||
| # Define the pricing pipeline job that materializes the assets and downstream dbt model | ||
| pricing_pipeline_job = dg.define_asset_job( | ||
| name="pricing_pipeline_job", | ||
| selection=dg.AssetSelection.assets(build_dataframe, load_pricing_data).downstream(include_self=True), | ||
| ) | ||
|
|
||
| price_schedule = dg.ScheduleDefinition( | ||
| name="price_schedule", | ||
| cron_schedule="31 21 * * *", | ||
| target=pricing_pipeline_job, | ||
| execution_timezone="America/Los_Angeles", | ||
| ) | ||
|
|
||
| defs_pricing = dg.Definitions( | ||
| assets=[build_dataframe, load_pricing_data], | ||
| jobs=[pricing_pipeline_job], | ||
| schedules=[price_schedule], | ||
| ) |
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,5 +1,5 @@ | ||
| name: 'poke_cli_dbt' | ||
| version: '1.7.0' | ||
| version: '1.7.2' | ||
|
|
||
| profile: 'poke_cli_dbt' | ||
|
|
||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.