<commit_before>set PGHOST=the report server IP
set PGPORT=the report server port
set PGUSER=the report server (super)user
set PGPASSWORD=the report server (super)user password
set NEWDBNAME=name of the report db to create
set FDWSERVERNAME=a name for the foreign data wrapper server. doesn't need to match anything
set FDWSERVERHOST=the live server IP
set FDWSERVERPORT=the live server port
set FDWSERVERDBNAME=the live server db name
set FDWSERVERUSER=the live server user name
set FDWSERVERPASS=the live server user password
set "SCRIPTDIR=C:\Users\Lstevens\Desktop\sqldatamart\"

set "SCRIPT01=%SCRIPTDIR%01_create_fdw_db.sql"
set "SCRIPT02=%SCRIPTDIR%02_create_fdw_tables.sql"
set "SCRIPT03=%SCRIPTDIR%03_create_matviews_for_fdw_tables.sql"
set "SCRIPT04=%SCRIPTDIR%04_create_fdw_matview_indexes.sql"
set "SCRIPT05=%SCRIPTDIR%05_create_dm_schema_matviews.sql"
set "SCRIPT06=%SCRIPTDIR%06_create_schema_for_each_study.sql"
set "SCRIPT07=%SCRIPTDIR%07_create_matviews_for_study_common_tables.sql"
set "SCRIPT08=%SCRIPTDIR%08_create_matviews_for_study_itemgroups.sql"
set "SCRIPT09=%SCRIPTDIR%09_create_group_role_for_each_study.sql"
set "SCRIPT10=%SCRIPTDIR%10_grant_usage_select_on_study_schema_tables_to_group_role.sql"

C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d postgres -c "CREATE DATABASE %NEWDBNAME%;" -P pager
C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d %NEWDBNAME% -f %SCRIPT01% -v FDWSERVERNAME=%FDWSERVERNAME% -v FDWSERVERHOST=^'%FDWSERVERHOST%^' -v FDWSERVERHOSTADDR=^'%FDWSERVERHOSTADDR%^' -v FDWSERVERPORT=^'%FDWSERVERPORT%^' -v FDWSERVERDBNAME=^'%FDWSERVERDBNAME%^' -v FDWSERVERUSER=^'%FDWSERVERUSER%^' -v FDWSERVERPASS=^'%FDWSERVERPASS%^' -P pager
C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d %NEWDBNAME% -f %SCRIPT02% -v FDWSERVERNAME=%FDWSERVERNAME% -P pager
C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d %NEWDBNAME% -f %SCRIPT03% -P pager<commit_msg>new fdw server hostaddr setting for batch script<commit_after>set PGHOST=the report server IP
set PGPORT=the report server port
set PGUSER=the report server (super)user
set PGPASSWORD=the report server (super)user password
set NEWDBNAME=name of the report db to create
set FDWSERVERNAME=a name for the foreign data wrapper server. doesn't need to match anything
set FDWSERVERHOST=the live server host name
set FDWSERVERHOSTADDR=the live server host IP address
set FDWSERVERPORT=the live server port
set FDWSERVERDBNAME=the live server db name
set FDWSERVERUSER=the live server user name
set FDWSERVERPASS=the live server user password
set "SCRIPTDIR=C:\Users\Lstevens\Desktop\sqldatamart\"

set "SCRIPT01=%SCRIPTDIR%01_create_fdw_db.sql"
set "SCRIPT02=%SCRIPTDIR%02_create_fdw_tables.sql"
set "SCRIPT03=%SCRIPTDIR%03_create_matviews_for_fdw_tables.sql"
set "SCRIPT04=%SCRIPTDIR%04_create_fdw_matview_indexes.sql"
set "SCRIPT05=%SCRIPTDIR%05_create_dm_schema_matviews.sql"
set "SCRIPT06=%SCRIPTDIR%06_create_schema_for_each_study.sql"
set "SCRIPT07=%SCRIPTDIR%07_create_matviews_for_study_common_tables.sql"
set "SCRIPT08=%SCRIPTDIR%08_create_matviews_for_study_itemgroups.sql"
set "SCRIPT09=%SCRIPTDIR%09_create_group_role_for_each_study.sql"
set "SCRIPT10=%SCRIPTDIR%10_grant_usage_select_on_study_schema_tables_to_group_role.sql"

C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d postgres -c "CREATE DATABASE %NEWDBNAME%;" -P pager
C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d %NEWDBNAME% -f %SCRIPT01% -v FDWSERVERNAME=%FDWSERVERNAME% -v FDWSERVERHOST=^'%FDWSERVERHOST%^' -v FDWSERVERHOSTADDR=^'%FDWSERVERHOSTADDR%^' -v FDWSERVERPORT=^'%FDWSERVERPORT%^' -v FDWSERVERDBNAME=^'%FDWSERVERDBNAME%^' -v FDWSERVERUSER=^'%FDWSERVERUSER%^' -v FDWSERVERPASS=^'%FDWSERVERPASS%^' -P pager
C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d %NEWDBNAME% -f %SCRIPT02% -v FDWSERVERNAME=%FDWSERVERNAME% -P pager
C:\"Program Files"\PostgreSQL\9.3\bin\psql -q -h %PGHOST% -p %PGPORT% -d %NEWDBNAME% -f %SCRIPT03% -P pager
{'fraction_non_alphanumeric': 0.11731431382193802, 'fraction_numerical': 0.026561731431382195, 'mean_word_length': 7.334016393442623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6257296', 'n_tokens_mistral': 1755, 'n_tokens_neox': 1661, 'n_words': 340}