Data Scripts

One of the unfortunate things that we have to do in my job is write data scripts. These are small SQL insert or update queries which will change data in ways that the application does not support. I have only worked on a few such scripts and it is normally with another person (since I am still relatively new).

Today I worked on one and learned a valuable unintended lesson. Do not trust that the person you are working with to know everything. We found the data and wrote the script initially by the dates that we saw in the application. In the finished product, we left these date queries rather than changing them to IDs. I was a bit uncomfortable with this (you could hit unintended results), but I expected that the person I was working with was correct. Of course, we ended up having to go back and change it. Thankfully we did have to look at it more in-depth when doing this because I discovered that we had changed the wrong rows in the initial script because of a miscommunication about what the various Effective and Expiration dates were supposed to be in the ones we were changing.

Anyway, I successfully fixed the problem and the script is complete as far as I know.

I guess the point of this post is that you should not be afraid to speak up if you think someone is doing something incorrect even if they have more experience. Of course, some people get really mad if they think you are telling them how to do their job so it is a delicate balance…