From e593eb27cb1ae80bca94c4d207a4858df2210dd2 Mon Sep 17 00:00:00 2001 From: WHYTEWYLL <49686519+WHYTEWYLL@users.noreply.github.com> Date: Fri, 29 Sep 2023 19:45:56 +0200 Subject: [PATCH] add: ephit (#187) --- .github/workflows/dbt_dev_activity_daily_weekly.yml | 2 +- .github/workflows/dbt_dev_activity_yearly.yml | 2 +- macros/api_udf/request_repo_data.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dbt_dev_activity_daily_weekly.yml b/.github/workflows/dbt_dev_activity_daily_weekly.yml index c236142..b7d5b8d 100644 --- a/.github/workflows/dbt_dev_activity_daily_weekly.yml +++ b/.github/workflows/dbt_dev_activity_daily_weekly.yml @@ -36,5 +36,5 @@ jobs: - name: Run DBT Jobs run: | - dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: '${{ secrets.GB_TOKEN }}', frequency: ['daily', 'weekly']}" + dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'GB_TOKEN', frequency: ['daily', 'weekly']}" dbt run --model silver__github_activity diff --git a/.github/workflows/dbt_dev_activity_yearly.yml b/.github/workflows/dbt_dev_activity_yearly.yml index 135189f..cac46dc 100644 --- a/.github/workflows/dbt_dev_activity_yearly.yml +++ b/.github/workflows/dbt_dev_activity_yearly.yml @@ -36,5 +36,5 @@ jobs: - name: Run DBT Jobs run: | - dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: '${{ secrets.GB_TOKEN }}', frequency: ['last_year']}" + dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'GB_TOKEN', frequency: ['last_year']}" dbt run --model silver__github_activity diff --git a/macros/api_udf/request_repo_data.sql b/macros/api_udf/request_repo_data.sql index ebb2615..2957f30 100644 --- a/macros/api_udf/request_repo_data.sql +++ b/macros/api_udf/request_repo_data.sql @@ -47,7 +47,7 @@ CREATE OR REPLACE PROCEDURE {{ target.database }}.bronze_api.get_github_api_repo WITH api_call AS ( SELECT project_name, - livequery_dev.live.udf_api('GET', CONCAT('https://api.github.com', full_endpoint), { 'Authorization': CONCAT('token ', '${TOKEN}'), 'Accept': 'application/vnd.github+json' },{}) AS res, + livequery_dev.live.udf_api('GET', CONCAT('https://api.github.com', full_endpoint), { 'Authorization': CONCAT('token ', '{${TOKEN}}'), 'Accept': 'application/vnd.github+json'},{}, 'github_cred') AS res, CURRENT_TIMESTAMP AS _request_timestamp, repo_url, full_endpoint,