Default repository for the execsql-upsert scripts
Revisión | 8c636a69de575affccaa8275911607b76d1ef4f3 (tree) |
---|---|
Tiempo | 2020-05-10 01:33:04 |
Autor | ![]() |
Commiter | Dreas Nielsen |
Modified progress bar display for better performance.
@@ -1,6 +1,7 @@ | ||
1 | 1 | ======== ========== ================================================================================= |
2 | 2 | Version Date Features |
3 | 3 | ======== ========== ================================================================================= |
4 | +2.0.1 2020-05-09 Modified progress bar display for better performance when the console is on. | |
4 | 5 | 2.0.0 2019-05-23 Added the UPDTPK_ONE script to update primary keys in a single table. |
5 | 6 | 1.4.2 2019-05-01 Corrected use of 'trim()' in ss_upsert.sql. |
6 | 7 | 1.4.1 2019-03-24 Modified MariaDB script to restrict data pulled from the information_schema for primary key checks to the current database. |
@@ -143,6 +143,8 @@ | ||
143 | 143 | -- 2019-06-16 Nominally complete revisions of PK updating scripts. RDN. |
144 | 144 | -- 2019-06-23 Completed debugging of PK updating scripts. RDN. |
145 | 145 | -- 2020-04-28 Explicitly rolled back the changes if 'do_commit' = "No". RDN. |
146 | +-- 2020-05-09 Moved the assignment of 'upsert_progress_denom' out of the | |
147 | +-- 'update_console_qa' script. RDN. | |
146 | 148 | -- ================================================================== |
147 | 149 | |
148 | 150 |
@@ -1824,12 +1826,8 @@ | ||
1824 | 1826 | |
1825 | 1827 | -- !x! BEGIN SCRIPT QA_ALL with parameters (stage_pfx, control_table) |
1826 | 1828 | |
1827 | --- Initialize the status and progress bars if the console is running. | |
1828 | --- !x! begin script update_console_qa with parameters (check_type, control_table) | |
1829 | +-- Get denominator for progress bar if console is on. | |
1829 | 1830 | -- !x! if(console_on) |
1830 | - -- !x! reset counter 221585944 | |
1831 | - -- !x! console status "Performing !!#check_type!! QA checks" | |
1832 | - -- !x! console progress 0 | |
1833 | 1831 | -- !x! if(view_exists(ups_upsert_rows)) |
1834 | 1832 | drop view if exists ups_upsert_rows; |
1835 | 1833 | -- !x! endif |
@@ -1838,6 +1836,14 @@ | ||
1838 | 1836 | from !!#control_table!!; |
1839 | 1837 | -- !x! subdata upsert_progress_denom ups_upsert_rows |
1840 | 1838 | -- !x! endif |
1839 | + | |
1840 | +-- Initialize the status and progress bars if the console is running. | |
1841 | +-- !x! begin script update_console_qa with parameters (check_type) | |
1842 | +-- !x! if(console_on) | |
1843 | + -- !x! reset counter 221585944 | |
1844 | + -- !x! console status "Performing !!#check_type!! QA checks" | |
1845 | + -- !x! console progress 0 | |
1846 | +-- !x! endif | |
1841 | 1847 | -- !x! end script |
1842 | 1848 | |
1843 | 1849 | -- Create a list of the selected tables with a loop control flag. |
@@ -1865,17 +1871,17 @@ | ||
1865 | 1871 | limit 1; |
1866 | 1872 | |
1867 | 1873 | -- Perform null QA checks on all tables. |
1868 | --- !x! execute script update_console_qa with args (check_type=NULL, control_table=!!#control_table!!) | |
1874 | +-- !x! execute script update_console_qa with args (check_type=NULL) | |
1869 | 1875 | -- !x! execute script qa_all_nullloop with (stage_pfx=!!#stage_pfx!!, control_table=!!#control_table!!) |
1870 | 1876 | |
1871 | 1877 | -- Perform primary key QA checks on all tables. |
1872 | 1878 | update ups_proctables set processed = 0; |
1873 | --- !x! execute script update_console_qa with args (check_type="primary key", control_table=!!#control_table!!) | |
1879 | +-- !x! execute script update_console_qa with args (check_type="primary key") | |
1874 | 1880 | -- !x! execute script qa_all_pkloop with (stage_pfx=!!#stage_pfx!!, control_table=!!#control_table!!) |
1875 | 1881 | |
1876 | 1882 | -- Perform foreign key QA checks on all tables. |
1877 | 1883 | update ups_proctables set processed = 0; |
1878 | --- !x! execute script update_console_qa with args (check_type=foreign key, control_table=!!#control_table!!) | |
1884 | +-- !x! execute script update_console_qa with args (check_type=foreign key) | |
1879 | 1885 | -- !x! execute script qa_all_fkloop with (stage_pfx=!!#stage_pfx!!, control_table=!!#control_table!!) |
1880 | 1886 | |
1881 | 1887 |
@@ -155,6 +155,8 @@ | ||
155 | 155 | -- 2019-05-30 Added UPDTPKQA_ONE through check #8. ES. |
156 | 156 | -- 2019-06-03 Completed UPDTPKQA_ONE and added UPDTPKQA_ONE_INNERLOOP. ES. |
157 | 157 | -- 2020-04-28 Explicitly rolled back the changes if 'do_commit' = "No". RDN. |
158 | +-- 2020-05-09 Moved the assignment of 'upsert_progress_denom' out of the | |
159 | +-- 'update_console_qa' script. RDN. | |
158 | 160 | -- ================================================================== |
159 | 161 | |
160 | 162 |
@@ -1771,18 +1773,22 @@ | ||
1771 | 1773 | |
1772 | 1774 | -- !x! BEGIN SCRIPT QA_ALL with parameters (base_schema, staging, control_table) |
1773 | 1775 | |
1774 | --- Initialize the status and progress bars if the console is running. | |
1775 | --- !x! begin script update_console_qa with parameters (check_type, control_table) | |
1776 | +-- Get denominator for progress bar if console is on. | |
1776 | 1777 | -- !x! if(console_on) |
1777 | - -- !x! reset counter 221585944 | |
1778 | - -- !x! console status "Performing !!#check_type!! QA checks" | |
1779 | - -- !x! console progress 0 | |
1780 | 1778 | drop view if exists ups_upsert_rows; |
1781 | 1779 | create temporary view ups_upsert_rows as |
1782 | 1780 | select count(*) + 1 as upsert_rows |
1783 | 1781 | from !!#control_table!!; |
1784 | 1782 | -- !x! subdata upsert_progress_denom ups_upsert_rows |
1785 | 1783 | -- !x! endif |
1784 | + | |
1785 | +-- Initialize the status and progress bars if the console is running. | |
1786 | +-- !x! begin script update_console_qa with parameters (check_type) | |
1787 | +-- !x! if(console_on) | |
1788 | + -- !x! reset counter 221585944 | |
1789 | + -- !x! console status "Performing !!#check_type!! QA checks" | |
1790 | + -- !x! console progress 0 | |
1791 | +-- !x! endif | |
1786 | 1792 | -- !x! end script |
1787 | 1793 | |
1788 | 1794 | -- Create a list of the selected tables with a loop control flag. |
@@ -1807,19 +1813,19 @@ | ||
1807 | 1813 | limit 1; |
1808 | 1814 | |
1809 | 1815 | -- Perform null QA checks on all tables. |
1810 | --- !x! execute script update_console_qa with args (check_type=NULL, control_table=!!#control_table!!) | |
1816 | +-- !x! execute script update_console_qa with args (check_type=NULL) | |
1811 | 1817 | -- !x! execute script qa_all_nullloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!) |
1812 | 1818 | |
1813 | 1819 | |
1814 | 1820 | -- Perform primary QA checks on all tables. |
1815 | 1821 | update ups_proctables set processed = False; |
1816 | --- !x! execute script update_console_qa with args (check_type=primary key, control_table=!!#control_table!!) | |
1822 | +-- !x! execute script update_console_qa with args (check_type=primary key) | |
1817 | 1823 | -- !x! execute script qa_all_pkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!) |
1818 | 1824 | |
1819 | 1825 | |
1820 | 1826 | -- Perform foreign key QA checks on all tables. |
1821 | 1827 | update ups_proctables set processed = False; |
1822 | --- !x! execute script update_console_qa with args (check_type=foreign key, control_table=!!#control_table!!) | |
1828 | +-- !x! execute script update_console_qa with args (check_type=foreign key) | |
1823 | 1829 | -- !x! execute script qa_all_fkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!) |
1824 | 1830 | |
1825 | 1831 | -- Update the status bar if the console is running. |
@@ -126,6 +126,8 @@ | ||
126 | 126 | -- 2019-05-29 Corrections to comments. ES. |
127 | 127 | -- 2019-06-03 Correction to logging in UPDTPKQA_ONE_INNERLOOP. ES. |
128 | 128 | -- 2020-04-28 Explicitly rolled back the changes if 'do_commit' = "No". RDN. |
129 | +-- 2020-05-09 Moved the assignment of 'upsert_progress_denom' out of the | |
130 | +-- 'update_console_qa' script. RDN. | |
129 | 131 | -- ================================================================== |
130 | 132 | |
131 | 133 | -- ################################################################ |
@@ -1919,19 +1921,22 @@ | ||
1919 | 1921 | |
1920 | 1922 | -- !x! BEGIN SCRIPT QA_ALL with parameters (base_schema, staging, control_table) |
1921 | 1923 | |
1922 | - | |
1923 | --- Initialize the status and progress bars if the console is running. | |
1924 | --- !x! begin script update_console_qa with parameters (check_type, control_table) | |
1924 | +-- Get denominator for progress bar if console is on. | |
1925 | 1925 | -- !x! if(console_on) |
1926 | - -- !x! reset counter 221585944 | |
1927 | - -- !x! console status "Performing !!#check_type!! QA checks" | |
1928 | - -- !x! console progress 0 | |
1929 | 1926 | if object_id('tempdb..#ups_upsert_rows') is not null drop table #ups_upsert_rows; |
1930 | 1927 | select count(*) + 1 as upsert_rows |
1931 | 1928 | into #ups_upsert_rows |
1932 | 1929 | from !!#control_table!!; |
1933 | 1930 | -- !x! subdata upsert_progress_denom #ups_upsert_rows |
1934 | 1931 | -- !x! endif |
1932 | + | |
1933 | +-- Initialize the status and progress bars if the console is running. | |
1934 | +-- !x! begin script update_console_qa with parameters (check_type) | |
1935 | +-- !x! if(console_on) | |
1936 | + -- !x! reset counter 221585944 | |
1937 | + -- !x! console status "Performing !!#check_type!! QA checks" | |
1938 | + -- !x! console progress 0 | |
1939 | +-- !x! endif | |
1935 | 1940 | -- !x! end script |
1936 | 1941 | |
1937 | 1942 | -- Create a list of the selected tables with a loop control flag. |
@@ -1958,18 +1963,18 @@ | ||
1958 | 1963 | -- !x! end script |
1959 | 1964 | |
1960 | 1965 | -- Perform null QA checks on all tables. |
1961 | --- !x! execute script update_console_qa with args (check_type=NULL, control_table=!!#control_table!!) | |
1966 | +-- !x! execute script update_console_qa with args (check_type=NULL) | |
1962 | 1967 | -- !x! execute script qa_all_nullloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!) |
1963 | 1968 | |
1964 | 1969 | |
1965 | 1970 | -- Perform primary QA checks on all tables. |
1966 | 1971 | update #ups_proctables set processed = 0; |
1967 | --- !x! execute script update_console_qa with args (check_type=primary key, control_table=!!#control_table!!) | |
1972 | +-- !x! execute script update_console_qa with args (check_type=primary key) | |
1968 | 1973 | -- !x! execute script qa_all_pkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!) |
1969 | 1974 | |
1970 | 1975 | -- Perform foreign key QA checks on all tables. |
1971 | 1976 | update #ups_proctables set processed = 0; |
1972 | --- !x! execute script update_console_qa with args (check_type=foreign key, control_table=!!#control_table!!) | |
1977 | +-- !x! execute script update_console_qa with args (check_type=foreign key) | |
1973 | 1978 | -- !x! execute script qa_all_fkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!) |
1974 | 1979 | |
1975 | 1980 |