2022-10-17 23:32:28 +00:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
2023-07-18 20:04:21 +00:00
|
|
|
# set default target
|
2023-09-09 01:50:28 +00:00
|
|
|
DBT_TARGET ?= dev
|
2023-08-23 19:13:40 +00:00
|
|
|
AWS_LAMBDA_ROLE ?= aws_lambda_flow_api_dev
|
2023-07-18 20:04:21 +00:00
|
|
|
|
2022-10-17 23:32:28 +00:00
|
|
|
dbt-console:
|
|
|
|
|
docker-compose run dbt_console
|
|
|
|
|
|
2023-07-18 20:04:21 +00:00
|
|
|
.PHONY: dbt-console
|
|
|
|
|
|
|
|
|
|
sl-flow-api:
|
|
|
|
|
dbt run-operation create_aws_flow_api \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt/
|
|
|
|
|
|
|
|
|
|
udfs:
|
2023-07-24 16:24:52 +00:00
|
|
|
dbt run-operation create_udfs \
|
|
|
|
|
--vars '{"UPDATE_UDFS_AND_SPS":True}' \
|
2023-07-18 20:04:21 +00:00
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
2023-07-31 19:54:18 +00:00
|
|
|
--profiles-dir ~/.dbt/
|
|
|
|
|
|
2023-09-09 01:50:28 +00:00
|
|
|
|
|
|
|
|
udf_2:
|
|
|
|
|
dbt run-operation create_udf_bulk_grpc_us_east_2 \
|
|
|
|
|
--vars '{"UPDATE_UDFS_AND_SPS":False}' \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt/
|
|
|
|
|
|
2023-08-16 22:57:04 +00:00
|
|
|
complete:
|
|
|
|
|
dbt run \
|
|
|
|
|
--vars '{"STREAMLINE_INVOKE_STREAMS":True, "STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES": True}' \
|
|
|
|
|
-m 1+models/silver/streamline/core/complete \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt
|
|
|
|
|
|
|
|
|
|
|
2023-07-31 19:54:18 +00:00
|
|
|
grant-streamline-privileges:
|
|
|
|
|
dbt run-operation grant_streamline_privileges \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt/ \
|
|
|
|
|
--args '{role: $(AWS_LAMBDA_ROLE)}'
|
|
|
|
|
|
2023-08-16 22:57:04 +00:00
|
|
|
streamline: sl-flow-api udfs grant-streamline-privileges streamline_bronze
|
|
|
|
|
|
|
|
|
|
streamline_bronze:
|
|
|
|
|
dbt run \
|
2023-08-23 19:13:40 +00:00
|
|
|
--vars '{"STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES": True}' \
|
2023-08-16 22:57:04 +00:00
|
|
|
-m 1+models/silver/streamline/bronze \
|
|
|
|
|
--profiles-dir ~/.dbt \
|
|
|
|
|
--target $(DBT_TARGET) \
|
2023-08-23 19:13:40 +00:00
|
|
|
--profile flow
|
|
|
|
|
|
|
|
|
|
blocks_history:
|
|
|
|
|
dbt run \
|
|
|
|
|
--vars '{"STREAMLINE_INVOKE_STREAMS":True, "STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES": True}' \
|
|
|
|
|
-m 1+models/silver/streamline/core/history/blocks/streamline__get_blocks_history_mainnet22.sql \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt
|
|
|
|
|
|
|
|
|
|
collections_history:
|
|
|
|
|
dbt run \
|
|
|
|
|
--vars '{"STREAMLINE_INVOKE_STREAMS":True, "STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES": True}' \
|
|
|
|
|
-m 1+models/silver/streamline/core/history/collections/streamline__get_collections_history_mainnet22.sql \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt
|
|
|
|
|
|
|
|
|
|
tx_history:
|
|
|
|
|
dbt run \
|
|
|
|
|
--vars '{"STREAMLINE_INVOKE_STREAMS":True, "STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES": True}' \
|
|
|
|
|
-m 1+models/silver/streamline/core/history/transactions/streamline__get_transactions_history_mainnet22.sql \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt
|
|
|
|
|
|
|
|
|
|
tx_results_history:
|
|
|
|
|
dbt run \
|
|
|
|
|
--vars '{"STREAMLINE_INVOKE_STREAMS":True, "STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES": True}' \
|
|
|
|
|
-m 1+models/silver/streamline/core/history/transaction_results/streamline__get_transaction_results_history_mainnet22.sql \
|
|
|
|
|
--profile flow \
|
|
|
|
|
--target $(DBT_TARGET) \
|
|
|
|
|
--profiles-dir ~/.dbt
|