error while using a custom macro

The problem I’m having

dbt not able to use macro I created.

The context of why I’m trying to do this

I created this macro to capture data change (CDC), there was no custom macro available

What I’ve already tried

I have created a macro using jinja and saved it in Macros folder, gave path in dbt_project.yml

Some example code or error messages

Runtime Error
  Compilation Error in model test_cdc (models\quark\gold\test_cdc.sql)
    'dbt.clients.jinja.MacroGenerator object' has no attribute 'source_diff_md5'. This can happen when calling a macro that does not exist. Check for typos and/or install package dependencies with "dbt deps

I think you’ll need to provide some more information in order to get help on this.
Are you sure the macro code compiles/works? from this it seems like your macro might not compile.

I’d do the troubleshooting step of taking everything out of the macro and making it some very simple thing you are positive compiles, and then slowly add functionality back in