Little tools can help mitigate project delays .
My experience working in IT project for around two decades comes to a conclusion that irrespective of perfect planning, strategy, time estimates and hours allocated …you know the whole drill :) , its the non-technological communication of the technical and non-technical personalities that makes the big difference. Finding the right resources and departments to approach for answers and solutions is part of the work. Then there are unavailability issues due to personal or profession situations. These are just a few!
It may be impossible to improve the pace in some situations, however there is always a smart trick for other situations where you can find a middle or interim solution to remove the blockers.
These ideas led me to thinking why don’t I share one of my tools along with the solution? Here is one situation among many. I will continue to share more in my upcoming blogs.
Our team starting working on this database migration project. The customer provided us with a DEV environment but with limited permissions. We needed to replicate their PROD ddl script into our DEV area.
Here is the little python script I wrote that generates the complete ddl from system tables.
https://github.com/full360/ddl-generator.git
Prerequisite : Identify the system table of your database that has table details and save the query result in this format..
For example the following query against Vertica creates this target.
VERTICA
select table_schema as schema_name, table_name, column_name, data_type,
case is_nullable
when true then 'YES'
else 'NO' end
as is_nullable
from v_catalog.columns
order by 1,2
Let’s call this file data-for-ddl.csv Make sure that your field names are in caps exactly as the sample above.
download ddl_generator.py from GitHub repo in the same directory and now run…
python ddl_generator.py data-for-ddl.csvyou will find output_table_ddl.sql generated in the same folder containing your DDL.
I hope this code helps contribute in your current situation or future projects.
Focusing on mainstream enterprise solutions is of course most important to meet business requirements, compatibility and project costs, However a smile from little tools and gadgets can go a long way!





