1. biGENIUS-X Help Center
  2. Generators
  3. Load data with a native load control

Microsoft SQL Server - Load data - 1.4

Before loading the data from your Source(s) System(s) to your Microsoft SQL Server Target System, please:

You are now ready to load the data.

Load the data

To load the data:

  • Open Powershell
  • Navigate to your generated artifacts folder:
--Example
cd C:\XXXXXXXXX\20240219144515
  • Execute the Powershell script helper for load:
.\execute.ps1
  • The prompt asks you for the server or instance name:
  • Enter a server or instance name

If you want to deploy on your laptop's default SQL Server instance, you can leave the value empty; it will use localhost by default.

  • Enter a username

You can leave the value empty if you want to use Windows Authentication.

  • If you enter a username, enter the password
  • You have a similar result: 

    -------------------------------------------------------------------------------------------------------------------------------
  • If you want to check the logs of the execution:
    • Open SQL Server Management Studio
    • Connect to the target database
    • Execute the following statement:
--Adapt the execution plan name
EXEC [LC].[Show_Execution] @ExecutionPlan = N'DEV_C3-X-MS-DV';
    • The logs should look like the following. An essential piece of information is the number of rows inserted:
  • You can now check that your data were correctly loaded with the following script:
SELECT
SCHEMA_NAME(schema_id) AS [SchemaName],
[Tables].name AS [TableName],
SUM([Partitions].[rows]) AS [TotalRowCount],
Tables.type_desc
FROM sys.tables AS [Tables]
JOIN sys.partitions AS [Partitions] ON [Tables].[object_id] =
[Partitions].[object_id] AND [Partitions].index_id IN (0, 1)
WHERE SCHEMA_NAME(schema_id) NOT IN ('LC') --We exclude the Load Control tables
GROUP BY SCHEMA_NAME(schema_id),[Tables].name, Tables.type_desc
ORDER BY SCHEMA_NAME(schema_id), TotalRowCount DESC;