Skip to content

Expose legacy SQL data over HTTP as JSON with custom property structures.

Notifications You must be signed in to change notification settings

JaimeStill/data-conductor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Conductor

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.

Demonstration

Back to Top

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.

Requirements

Back to Top

Running

Back to Top

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:

image

Conductor Server

Back to Top

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:

image

Conductor App

Back to Top

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:

image

Samples

Back to Top

The following sections illustrate how to build and run the samples provided in this repository.

Back to Top

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:

image

Back to Top

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 .

Personify Server

Back to Top

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:

image

Personify App

Back to Top

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:

image

Project Layout

Back to Top

Coming soon.

Features

Back to Top

Coming soon.

About

Expose legacy SQL data over HTTP as JSON with custom property structures.

Resources

Stars

Watchers

Forks