Crazy debug idea
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Crazy debug idea
I've been editing my jobs adding debug code and debug outputs, and then deleting them afterwards because I don't want the overhead in the QA or production jobs. Then I have to add it back in again to test some change, and then delete it again.
I've had an idea how I can do this better.
All debug code is created in Shared Containers. Links go into the container, and nothing comes out. In the container are all the Sort/Aggregate/Lookup/Join/Sequential File stages. When the time comes to remove the debug code, the Shared Container stage in the job is deleted, and replaced with a similarly-named Shared Container with the same number of input links, but inside the Shared Container design, all the links are just terminated with Copy stages. When the job is compiled, I'm hoping that the links to these Copy stages should be optimized away into nothing. If the debug code needs to be reinstated, the Shared Container stage is deleted and replaced with the debug version.
Does this idea have legs?
I've had an idea how I can do this better.
All debug code is created in Shared Containers. Links go into the container, and nothing comes out. In the container are all the Sort/Aggregate/Lookup/Join/Sequential File stages. When the time comes to remove the debug code, the Shared Container stage in the job is deleted, and replaced with a similarly-named Shared Container with the same number of input links, but inside the Shared Container design, all the links are just terminated with Copy stages. When the job is compiled, I'm hoping that the links to these Copy stages should be optimized away into nothing. If the debug code needs to be reinstated, the Shared Container stage is deleted and replaced with the debug version.
Does this idea have legs?
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
I like that idea.... couldn't you also do this without having to edit the Job? What happens if you (first export it to .dsx) delete the "debug" container, then import the "dummy copy container" of the same name and re-compile?
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Yes, that should work. Thanks, that's a great improvement! Now I just need to decide, should all debug code for a job be in a single SC, or should I have multiple SCs each with a different bit of code in it?eostic wrote:I like that idea.... couldn't you also do this without having to edit the Job? What happens if you (first export it to .dsx) delete the "debug" container, then import the "dummy copy container" of the same name and re-compile?
Ernie
*Update*: Works like a dream!
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
That will still create the debug output files, although with no data. Is the env var check performed in a Transformer or a Filter? In either case, the check has to be performed once per row of data, so you're incurring a performance overhead that my method does not.trenicar wrote:I have done similar thing but instead of changing the SC I include a parameter/env variable that is turned off in prod and in the sc I check if the debug statements are needed, if not dont output!
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Another debug idea (only works at 8 though)...
I've been doing work at sites where NO changes are allowed in production. Everything must take the Dev->QA->Prod route. To help with debugging issues in production I've setup a parameter set called Debug that contains all the environment variables you'd ever want to use, with the debug settings turned off. Its inserted into every job so you can easily override the settings at runtime for problem diagnosis runs without having to modify and recompile.
It's also been a good educational tool because the developers are asking what specific variables in the set do and playing around with them. Its a good way for them to learn more about the architecture and execution of jobs.
I've been doing work at sites where NO changes are allowed in production. Everything must take the Dev->QA->Prod route. To help with debugging issues in production I've setup a parameter set called Debug that contains all the environment variables you'd ever want to use, with the debug settings turned off. Its inserted into every job so you can easily override the settings at runtime for problem diagnosis runs without having to modify and recompile.
It's also been a good educational tool because the developers are asking what specific variables in the set do and playing around with them. Its a good way for them to learn more about the architecture and execution of jobs.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: