Issue with dbt Cloud behaving differently on a Job than on the develop IDE

Hi,
I’m having an issue that I can’t quite figure out what the dbt Job is doing to compile in a different way than what I get from the Develop IDE, which is doing the right thing.
I have this model that has a macro that fetches the right source according to the macro on the FROM part of the query, that is compiling correctly on the develop IDE and always was running correctly when I developed on dbt-core on my machine. Now that I’m running a Job through dbt Cloud the compilation instead of making the change according with the macro is just switching to dbt for the source schema, and I can’t understand why. Project is the same, connection is the same and the git branch is the same. Only change is the environment that needs to be a deployment environment to run jobs.

Is the dataset what causing a macro to switch to dbt on the source? The Dataset is the target and it should work that way.
Did anyone had this problem before? I’m really not understanding what is causing this, it just doesn’t make much sense.

Really appreciate any help you can give on this!
Best regards,
Bruno

Well, don’t know exactly if this what solved it, the target on the job needs to be something else and not default. I think this is what solved my issue but I don’t recall if this was the only thing that changed this time that I re-created all the steps → Create environment and job.
Hope this helps anyone that may find the some weird behavior.

1 Like

changing the target from default to “target” works for me