-
Notifications
You must be signed in to change notification settings - Fork 1
Verify Data Load Order
The verify Data Load Order template is an experimental template that starts with an incorrect assumption. IF I had a relationships constraints on all my tables on, THEN what order could the data be loaded to minimize errors when the data gets added?
That is the first part of this Data Load Order template. The assumption is incorrect, since most SQL backends, have bulk data load utilities from some type of CSV data to source into the SQL engine. These types of data loads are normally done before you add the indexes, and then add the relationship constraints.
So there is a way to avoid this template audit analysis and the understanding of the data relationships. However, the knowledge is useful when you get to the eventual large amount of tables, relationships, and possible incorrect data when you insert data.
That is the second part of this Data Load Order template. It will create insert statements using the default data in your dictionary to make sure you got valid data for your SQL statements. Recall that the verify FILE, GUID, and PREFIX will give you field default initialization. This is where those default initialize values get used. You should be able to take those insert statements and add them to a test database.
This gets you better data in tables from the Clarion program side and from the pure SQL insert side. This leaves only the creation of an API to add records from external sources. You have greatly improved your chances of having better data in your SQL engine.



This is the first section of the Data Load Order template. It gives the list of the tables and the order they should be loaded in to minimize errors.

This is the second section of the Data Load Order template. It gives the SQL insert statement with the default data in the dictionary. Please check the SQL insert statement for correctness.

This explains where the data comes from for the Data Load Order template. The top screen capture for the specific table comes from the verify FILE template. The bottom screen capture for the specific table comes from the verify DLO template.
The RED block tells this table is a parent to a number of other tables.
The PURPLE block shows this table is a child to a number of other tables.
The GREEN block tells the table prefix and the table name.
The YELLOW block shows the sort order parameter for the table.

“What,” I said, “in your estimation, is the greatest good a man can do?” 'The greatest good he can do is to cultivate himself, develop his powers, in order that he may be of greater use to humanity.'”
- Orison Swett Marden
Copyright (c) 2020, Roberto Artigas, All rights reserved world wide. - roberto.artigas.dev@gmail.com