6 Run Initialize script

Next we need to go back to Power Shell to run the initialize script. This scripts connects to the Analytics database in Azure and creates the metadata used to create and load the pre-staging and staging tables.

Populate params file

Before running the script we need to make sure all parameters are in place.

  1. Navigate to the base folder and in the Initialize Analytics folder you will find params.json

  2. Open the file in notepad and edit the parameters you should be able to find all of them in the parameters.txt file that you have been adding parameters to.

    • ConnectionString = The storage account connection string you saved to the parameter file
    • ContainerName = "bc2adls" //This should always be the container name used
    • TragetFolder = "C:\\Temp\\CdmFiles" //You need to make sure this folder exists on the machine you are running the script from or change it to an existing folder
    • SqlServer = Analytics SQL server - with database.windows.net ending (report connection version from parameters file)
    • Database = Azure database name
    • User = Azure SQL server login
    • Password = Azure SQL server password

Run script

Follow these steps to run the initialize script with params.json

  1. OpenPower Shell 7 again and navigate to the Initialize Analytics folder within the product package folder.

  2. Run the following script with the params.json file

    .\initialize_Analytics.ps1 -ParameterFile .\params.json
  3. When the script has finished you can run the following query on the Analytics database to check if the meta data tables has been created and has data.

    SELECT *
    FROM [dbo].[AnalyticsBC2ADLSMetadata]

    If the script returns 140 rows then you know that your initialization of the data warehouse has been successful.

  4. You can also check in the table list whether prestaging tables (with number at the end of the name) and staging tables (prefixed with stg$) have been created.

 

And now you are ready to run the initial load of the data.

 

< BackNext >