Extracting Data and Loading it into an Azure SQL Database
The
To extract and load data, run the rpsExtractDataAzure method on the secondary database as a non‑GUI or GUI application. (The following examples use an application called DoRPS.)
The following is an example of how to run the application from a batch script.
set address=localhost set port=6021 set exeFile=jade.exe
set iniFileDir=C:\PrimaryDb set dbDir=C:\RpsDb set binDir=bin set sysDir=System set iniFile=jade.ini
start %dbDir%\%binDir%\%exeFile% path=%dbDir%\%sysDir% ini=%iniFileDir%\%iniFile% app=DoRPS schema=ErewhonInvestmentsModelSchema server=multiUser name=RPSServer
If you define an application to perform the extract and load actions, on the Define Application dialog, ensure that the Initialize Method combo box points to the application initialize method that you have defined; for example, ErewhonInvestmentsModelApp::testRPSAzureSQL.
An example of the Define Application dialog is shown in the following image.
For the rpsExtractDataAzure method, the following shows an example of the initialize method that you might specify in the Initialize Method combo box on the Define Application dialog.
testRPSAzureSQL();
constants
AllTables="";
ScriptFilePath="C:/Jade2022/RPSSQLScripts";
DataFilesPath="C:/Jade2022/RPSSQLScripts";
RDBFilePath="C:/Jade2022/RPSSQLScripts";
RDBName="AzureRPSTestDb";
LoadHistoricalTables=false;
Workers=1;
//Azure parameters
ServerName="azure-rps-test-server.database.windows.net";
vars
dba : JadeDatabaseAdmin;
begin
create dba transient;
write dba.rpsExtractDataAzure(AllTables,
ScriptFilePath,
DataFilesPath, RDBFilePath,
RDBName,
LoadHistoricalTables,
ServerName,
Workers,
RDBName,
null);
terminate;
epilog
delete dba;
end;
2022.0.02 and higher