Demo Code showing Terraform, AWS Athena, dbt and elementary.
Terraform Account and Cli:
- https://app.terraform.io/public/signup/account
- https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
AWS Account and Cli:
-
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
make install-terraform make install-awscli
# Set AWS Access Key ID and AWS Secret Access Key
aws configure
# Check credentials
aws configure list
vi ~/.aws/credentials
# Othewise use #HardCodedAWSCredentials
# Create new python env
python3 -m venv py_env_dbt
source py_env_dbt/bin/activate
# Edit file with your credentials and environment variables
vi setenv.sh
# Setup environment variables and config files (terraform, dbt)
source ./setenv.sh
- https://www.datamesh-architecture.com/
- https://github.com/datamesh-architecture/terraform-aws-dataproduct-aws-athena
-
AWS S3 Bucket
-
AWS Athena
-
AWS Glue
-
AWS Lambda
make build-all
-
-
https://docs.getdbt.com/docs/core/connect-data-platform/athena-setup
make dbt-config
CITY=lisboa make call-api
make dbt-load-raw TABLE=raw.idealista_lisboa_sale_homes
make dbt-run-all
make deploy-all-docs
# Destroy Infrastructure: AWS S3, AWS Athena, AWS Glue
make destroy-all