diff --git a/.github/workflows/transformations_docs_deploy.yml b/.github/workflows/transformations_docs_deploy.yml index 5e51be88c..ff3c7585d 100644 --- a/.github/workflows/transformations_docs_deploy.yml +++ b/.github/workflows/transformations_docs_deploy.yml @@ -21,6 +21,7 @@ jobs: shard: [ 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10 ] timeout-minutes: 30 services: diff --git a/transformations/aws/asset-inventory-free/macros/aws_tables_dyn.sql b/transformations/aws/asset-inventory-free/macros/aws_tables_dyn.sql index 577831d1f..3f5f6358d 100644 --- a/transformations/aws/asset-inventory-free/macros/aws_tables_dyn.sql +++ b/transformations/aws/asset-inventory-free/macros/aws_tables_dyn.sql @@ -5,11 +5,11 @@ {% macro postgres__aws_tables_dyn() %} SELECT t.table_name, - MAX(CASE WHEN UPPER(c.column_name) = 'ARN' THEN 1 ELSE 0 END) AS ARN_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'ACCOUNT_ID' THEN 1 ELSE 0 END) AS ACCOUNT_ID_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'REQUEST_ACCOUNT_ID' THEN 1 ELSE 0 END) AS REQUEST_ACCOUNT_ID_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'REGION' THEN 1 ELSE 0 END) AS REGION_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'TAGS' THEN 1 ELSE 0 END) AS TAGS_EXIST + MAX(CASE WHEN UPPER(c.column_name) = 'ARN' THEN 1 ELSE 0 END) AS arn_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'ACCOUNT_ID' THEN 1 ELSE 0 END) AS account_id_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'REQUEST_ACCOUNT_ID' THEN 1 ELSE 0 END) AS request_account_id_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'REGION' THEN 1 ELSE 0 END) AS region_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'TAGS' THEN 1 ELSE 0 END) AS tags_exist FROM INFORMATION_SCHEMA.TABLES t LEFT JOIN @@ -27,11 +27,11 @@ HAVING {% macro snowflake__aws_tables_dyn() %} SELECT t.table_name as "table_name", - MAX(CASE WHEN UPPER(c.column_name) = 'ARN' THEN 1 ELSE 0 END) AS ARN_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'ACCOUNT_ID' THEN 1 ELSE 0 END) AS ACCOUNT_ID_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'REQUEST_ACCOUNT_ID' THEN 1 ELSE 0 END) AS REQUEST_ACCOUNT_ID_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'REGION' THEN 1 ELSE 0 END) AS REGION_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'TAGS' THEN 1 ELSE 0 END) AS TAGS_EXIST + MAX(CASE WHEN UPPER(c.column_name) = 'ARN' THEN 1 ELSE 0 END) AS "arn_exist", + MAX(CASE WHEN UPPER(c.column_name) = 'ACCOUNT_ID' THEN 1 ELSE 0 END) AS "account_id_exist", + MAX(CASE WHEN UPPER(c.column_name) = 'REQUEST_ACCOUNT_ID' THEN 1 ELSE 0 END) AS "request_account_id_exist", + MAX(CASE WHEN UPPER(c.column_name) = 'REGION' THEN 1 ELSE 0 END) AS "region_exist", + MAX(CASE WHEN UPPER(c.column_name) = 'TAGS' THEN 1 ELSE 0 END) AS "tags_exist" FROM INFORMATION_SCHEMA.TABLES t LEFT JOIN @@ -50,11 +50,11 @@ HAVING SELECT t.table_name, - MAX(CASE WHEN UPPER(c.column_name) = 'ARN' THEN 1 ELSE 0 END) AS ARN_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'ACCOUNT_ID' THEN 1 ELSE 0 END) AS ACCOUNT_ID_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'REQUEST_ACCOUNT_ID' THEN 1 ELSE 0 END) AS REQUEST_ACCOUNT_ID_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'REGION' THEN 1 ELSE 0 END) AS REGION_EXIST, - MAX(CASE WHEN UPPER(c.column_name) = 'TAGS' THEN 1 ELSE 0 END) AS TAGS_EXIST + MAX(CASE WHEN UPPER(c.column_name) = 'ARN' THEN 1 ELSE 0 END) AS arn_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'ACCOUNT_ID' THEN 1 ELSE 0 END) AS account_id_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'REQUEST_ACCOUNT_ID' THEN 1 ELSE 0 END) AS request_account_id_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'REGION' THEN 1 ELSE 0 END) AS region_exist, + MAX(CASE WHEN UPPER(c.column_name) = 'TAGS' THEN 1 ELSE 0 END) AS tags_exist FROM {{ full_table_name("INFORMATION_SCHEMA.TABLES") }} t INNER JOIN diff --git a/transformations/aws/asset-inventory-free/models/aws_resources.sql b/transformations/aws/asset-inventory-free/models/aws_resources.sql index 8d4435a54..8f5e76a0b 100644 --- a/transformations/aws/asset-inventory-free/models/aws_resources.sql +++ b/transformations/aws/asset-inventory-free/models/aws_resources.sql @@ -5,7 +5,7 @@ -- Generate dynamic SQL statements {% for row in run_query(aws_tables) -%} {% if row.table_name is not none and row.table_name != '' -%} - {{ aws_asset_resources(row.table_name, row.ARN_EXIST, row.ACCOUNT_ID_EXIST, row.REQUEST_ACCOUNT_ID_EXIST, row.REGION_EXIST, row.TAGS_EXIST) }} + {{ aws_asset_resources(row.table_name, row.arn_exist, row.account_id_exist, row.request_account_id_exist, row.region_exist, row.tags_exist) }} {% if not loop.last -%} UNION ALL {% endif -%} {%- endif %} {%- endfor %} \ No newline at end of file