Description
Describe the bug
I have enabled "validate_macro_args: True" in my project and I am getting these warning in my project. I would like to know if there warning are legitimate warnings or any issues with package macros.
{"data": {"macro_file_path": "macros/database_specific_helpers/generate_surrogate_key.sql", "macro_unique_id": "macro.dbt_artifacts.generate_surrogate_key",
"msg": "Argument field_list in the yaml for macro generate_surrogate_key has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument field_list in the yaml for macro generate_surrogate_key has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.683491Z"}}
{"data": {"macro_file_path": "macros/database_specific_helpers/get_relation.sql", "macro_unique_id": "macro.dbt_artifacts.get_relation",
"msg": "Argument get_relation_name in yaml for macro get_relation does not match the jinja definition."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument get_relation_name in yaml for macro get_relation does not match the jinja definition.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.685519Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_exposures.sql", "macro_unique_id": "macro.dbt_artifacts.upload_exposures",
"msg": "Argument exposures in the yaml for macro upload_exposures has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument exposures in the yaml for macro upload_exposures has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.691416Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_model_executions.sql", "macro_unique_id": "macro.dbt_artifacts.upload_model_executions",
"msg": "Argument models in the yaml for macro upload_model_executions has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument models in the yaml for macro upload_model_executions has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.692996Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_models.sql", "macro_unique_id": "macro.dbt_artifacts.upload_models",
"msg": "Argument models in the yaml for macro upload_models has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument models in the yaml for macro upload_models has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.694052Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_seed_executions.sql", "macro_unique_id": "macro.dbt_artifacts.upload_seed_executions",
"msg": "Argument seeds in the yaml for macro upload_seed_executions has an invalid type."}, "info": {"category": "", "code": "I076", "extra":
{}, "invocation_id": "", "level": "warn", "msg": "Argument seeds in the yaml for macro upload_seed_executions has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.695178Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_seeds.sql", "macro_unique_id": "macro.dbt_artifacts.upload_seeds", "msg":
"Argument seeds in the yaml for macro upload_seeds has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument seeds in the yaml for macro upload_seeds has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.696141Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_snapshot_executions.sql", "macro_unique_id": "macro.dbt_artifacts.upload_snapshot_executions",
"msg": "Argument snapshots in the yaml for macro upload_snapshot_executions has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument snapshots in the yaml for macro upload_snapshot_executions has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.697286Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_snapshots.sql", "macro_unique_id": "macro.dbt_artifacts.upload_snapshots", "msg":
"Argument snapshots in the yaml for macro upload_snapshots has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument snapshots in the yaml for macro upload_snapshots has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.698451Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_sources.sql", "macro_unique_id": "macro.dbt_artifacts.upload_sources",
"msg": "Argument sources in the yaml for macro upload_sources has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument sources in the yaml for macro upload_sources has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.699829Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_test_executions.sql", "macro_unique_id": "macro.dbt_artifacts.upload_test_executions",
"msg": "Argument tests in the yaml for macro upload_test_executions has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument tests in the yaml for macro upload_test_executions has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.700893Z"}}
{"data": {"macro_file_path": "macros/upload_individual_datasets/upload_tests.sql", "macro_unique_id": "macro.dbt_artifacts.upload_tests", "msg":
"Argument tests in the yaml for macro upload_tests has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument tests in the yaml for macro upload_tests has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.701968Z"}}
{"data": {"macro_file_path": "macros/upload_results/get_table_content_values.sql", "macro_unique_id": "macro.dbt_artifacts.get_table_content_values",
"msg": "Argument objects_to_upload in the yaml for macro get_table_content_values has an invalid type."}, "info": {"category": "", "code": "I076", "extra":
{}, "invocation_id": "", "level": "warn", "msg": "Argument objects_to_upload in the yaml for macro get_table_content_values has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.704915Z"}}
{"data": {"macro_file_path": "macros/upload_results/insert_into_metadata_table.sql", "macro_unique_id": "macro.dbt_artifacts.insert_into_metadata_table", "msg":
"Argument database_name in yaml for macro insert_into_metadata_table does not match the jinja definition."}, "info": {"category": "", "code": "I076", "extra":
{}, "invocation_id": "", "level": "warn", "msg": "Argument database_name in yaml for macro insert_into_metadata_table does not match the jinja definition.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.707938Z"}}
{"data": {"macro_file_path": "macros/upload_results/insert_into_metadata_table.sql", "macro_unique_id": "macro.dbt_artifacts.insert_into_metadata_table",
"msg": "Argument schema_name in yaml for macro insert_into_metadata_table does not match the jinja definition."}, "info": {"category": "", "code": "I076", "extra":
{}, "invocation_id": "", "level": "warn", "msg": "Argument schema_name in yaml for macro insert_into_metadata_table does not match the jinja definition.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.708563Z"}}
{"data": {"macro_file_path": "macros/upload_results/insert_into_metadata_table.sql", "macro_unique_id": "macro.dbt_artifacts.insert_into_metadata_table",
"msg": "Argument table_name in yaml for macro insert_into_metadata_table does not match the jinja definition."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument table_name in yaml for macro insert_into_metadata_table does not match the jinja definition.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.709041Z"}}
{"data": {"macro_file_path": "macros/upload_results/insert_into_metadata_table.sql", "macro_unique_id": "macro.dbt_artifacts.insert_into_metadata_table",
"msg": "The number of arguments in the yaml for macro insert_into_metadata_table does not match the jinja definition."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "The number of arguments in the yaml for macro insert_into_metadata_table does not match the jinja definition.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.709512Z"}}
{"data": {"macro_file_path": "macros/upload_results/upload_results.sql", "macro_unique_id": "macro.dbt_artifacts.upload_results", "msg":
"Argument results in the yaml for macro upload_results has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument results in the yaml for macro upload_results has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.711137Z"}}
Sample code where the macro has been used along with right datatype arguments:
{{ dbt_utils.generate_surrogate_key(
field_list = [
'yoy_grouped.PROVR_DURABLE_KEY',
'yoy_grouped.PRI_DEPMENT_DURABLE_KEY',
'yoy_grouped.APOINTMENT_STATUS_DSC',
'yoy_grouped.VSIT_METHOD_DSC',
'yoy_grouped.VSIT_TYPE_DSC',
'yoy_grouped.UNAVAILABLE_REASON_DC',
'yoy_grouped.METRIC_ID'
]
) }} AS VARCHAR(50)) COLLATE 'en-ci' AS ROW_HASH_ID
Request your help in reviewing the logs and let me know what are my next steps to fix these warnings
Steps to reproduce
set validate_macro_args: True in project.yml file
Expected results
Not sure if the warnings are legitimate warnings
Actual results
{"data": {"macro_file_path": "macros/database_specific_helpers/generate_surrogate_key.sql", "macro_unique_id": "macro.dbt_artifacts.generate_surrogate_key",
"msg": "Argument field_list in the yaml for macro generate_surrogate_key has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument field_list in the yaml for macro generate_surrogate_key has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.683491Z"}}
Screenshots and log output
{"data": {"macro_file_path": "macros/database_specific_helpers/generate_surrogate_key.sql", "macro_unique_id": "macro.dbt_artifacts.generate_surrogate_key",
"msg": "Argument field_list in the yaml for macro generate_surrogate_key has an invalid type."}, "info": {"category": "", "code": "I076", "extra": {},
"invocation_id": "", "level": "warn", "msg": "Argument field_list in the yaml for macro generate_surrogate_key has an invalid type.",
"name": "InvalidMacroAnnotation", "pid": 1832, "thread": "MainThread", "ts": "2025-06-27T17:49:34.683491Z"}}
System information
packages:
- package: dbt-labs/dbt_utils
version: "1.3.0" - package: calogica/dbt_date
version: [">=0.7.0", "<0.8.0"] - package: brooklyn-data/dbt_artifacts
version: 2.9.3
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version
:
Core:
- installed: 1.9.2
- latest: 1.10.2 - Update available!
Plugins:
- snowflake: 1.9.1 - Update available!
Additional context
{{ dbt_utils.generate_surrogate_key(
field_list = [
'yoy_grouped.PROVR_DURABLE_KEY',
'yoy_grouped.PRI_DEPMENT_DURABLE_KEY',
'yoy_grouped.APOINTMENT_STATUS_DSC',
'yoy_grouped.VSIT_METHOD_DSC',
'yoy_grouped.VSIT_TYPE_DSC',
'yoy_grouped.UNAVAILABLE_REASON_DC',
'yoy_grouped.METRIC_ID'
]
) }} AS VARCHAR(50)) COLLATE 'en-ci' AS ROW_HASH_ID
Are you interested in contributing the fix?
Yes