Expose legacy SQL data over HTTP as JSON with custom property structures to ingest in modern apps.
Uses Microsoft.Data.SqlClient via the SqlConnector Service, and System.Text.Json.Nodes via the SqlSerializer Service.
The demonstrations and samples throughout this repository use the OLTP version of the AdventureWorks 2019 sample database.
conductor-overview.mp4
In the above video, the Connector that is seeded by default tests its connection to the database. Once successful, it then navigates to the connector route in the Angular app.
In the connector route, a list of Query records associated with the Connector are rendered. The Get People query is selected, and it is executed with the interpolated properties skip:15034/size:200
. These values replace the {{skip}}
and {{size}}
values in the loaded query.
After the results are cleared, the data is retrieved directly through the API via http://localhost:5000/api/query/executeWIthProps/get-people/skip:15034/size:200
With this query in place and functional, external applications can execute this query and interface with its data via the above API (substituting interpolated properties as desired):
personify-overview.mp4
The app demonstrated above can be found in the personify sample directory.
- SQL Server with the AdventureWorks 2019 OLTP database loaded.
- I use an instance of SQL Server 2019 Express for local development with a server name of
.\DevSql
.
- I use an instance of SQL Server 2019 Express for local development with a server name of
- .NET SDK with the dotnet-ef global tool installed.
- Node.js LTS
- Visual Studio Code
- Recommended Extensions:
- Angular Language Services
- C#
- Task Explorer
- Recommended Extensions:
Once you have all of the requirements installed and configured, clone this repository and open it in code:
git clone https://github.com/JaimeStill/data-conductor
cd data-conductor
code .
Note: Adjust the following connection strings as needed to match your SQL Server instance:
Note: All of the commands illustrated below are available as VS Code Tasks:
In a VS Code terminal, change directory to ./src/server
and execute the following:
# Restore NuGet dependencies and build the server
dotnet build
# Generate app database, apply migrations, and seed data
cd ./Conductor.DbCli
dotnet run
# Start the API server
cd ../Conductor.Api
dotnet watch run
Navigate to http://localhost:5000/swagger and you should see the API avaialble:
In a VS Code terminal, change directory to ./src/app
and execute the following:
# Install node dependencies
npm i
# Make sure the API server from the above
# steps is running in a separate terminal.
npm start
Navigate to http://localhost:3000 and you should see the client app:
The following sections illustrate how to build and run the samples provided in this repository.
This sample was written to test the Connector, Query, SqlConnector, and SqlSerializer interactions at the lowest level.
Adjust the Server property in Program to match your SQL Server instance.
To run, simply execute the following from a terminal:
cd ./samples/ConsoleQuery
dotnet run
You should see the console app output:
Note: Adjust the connection string in appsettings.Development.json to match your SQL Server instance.
Prerequisites - Ensure you've followed all of the steps in Conductor Server and have the Conductor API server running in its own terminal.
Open the ./samples/personify
workspace in a VS Code workspace:
cd ./samples/personify
code .
In a VS Code terminal, change directory to ./server
and execute the following:
# Restore NuGet dependencies and build the server
dotnet build
# Generate app database and apply migrations
cd ./Personify.Data
dotnet ef database update ../Personify.Api
# Start the API server
cd ../Personify.Api
dotnet watch run
Navigate to http://localhost:5555/swagger and you should see the API avaialble:
In a VS Code terminal, change directory to ./app
and execute the following:
# Install node dependencies
npm i
# Make sure the API server from the above
# steps is running in a separate terminal.
npm start
Navigate to http://localhost:3333 and you should see the client app:
Coming soon.
Coming soon.