Imato.MsSql.ExternalData 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Imato.MsSql.ExternalData --version 1.1.0
                    
NuGet\Install-Package Imato.MsSql.ExternalData -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Imato.MsSql.ExternalData" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Imato.MsSql.ExternalData" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Imato.MsSql.ExternalData" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Imato.MsSql.ExternalData --version 1.1.0
                    
#r "nuget: Imato.MsSql.ExternalData, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Imato.MsSql.ExternalData&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Imato.MsSql.ExternalData&version=1.1.0
                    
Install as a Cake Tool

Imato.MsSql.ExternalData

How to put data from external cmd process to SQL server

Using

  1. Create your own process to produce new data. Override CreateData in Process Imato.MsSql.ExternalData.Example
internal class DaysProcess : Process<MonthDay>
{
    public DaysProcess(string[] args) : base(args)
    {
    }

    protected override IEnumerable<MonthDay> CreateData(
        IDictionary<string, string> parameters)
    {
        ....
    }
}
  1. Create table for DTO class MonthDay in DB
create table ##test
(
Id int,
Name varchar(30),
Date datetime,
IsDayOf bit
)
  1. Run process
public static async Task Main(string[] args)
{
    await new DaysProcess(args).RunAsync();
}
  1. Start your executable for producing data with parameters
>Imato.MsSql.ExternalData.Example.exe Year=2022 Month=10

Add special parameter for destination table

>Imato.MsSql.ExternalData.Example.exe Year=2022 Month=10 Table=##test

Override connection string if it isn't local

>Imato.MsSql.ExternalData.Example.exe Year=2022 Month=10 Table=##test ConnectionString=yourConnection
  1. Execute your cmd util in t-sql script
    Create procedure execmd.sql in msdb.
    Start
exec dbo.execmd 'Imato.MsSql.ExternalData.Example.exe Year=2022 Month=10 Table=##test'

Use data from ##test in t-sql script.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.6.2 412 12/12/2022
2.6.1 356 12/9/2022
2.6.0 341 12/9/2022
2.5.0 350 12/9/2022
2.4.0 370 12/8/2022
2.3.0 366 12/8/2022
2.2.0 368 12/8/2022
2.1.0 369 12/8/2022
2.0.0 411 12/2/2022
1.5.0 388 12/1/2022
1.4.0 387 11/29/2022
1.3.0 375 11/29/2022
1.2.0 417 11/28/2022
1.1.0 404 11/28/2022
1.0.0 405 11/26/2022

Ready to use