Imato.Data.External 1.1.0

dotnet add package Imato.Data.External --version 1.1.0                
NuGet\Install-Package Imato.Data.External -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.Data.External" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Imato.Data.External --version 1.1.0                
#r "nuget: Imato.Data.External, 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.
// Install Imato.Data.External as a Cake Addin
#addin nuget:?package=Imato.Data.External&version=1.1.0

// Install Imato.Data.External as a Cake Tool
#tool nuget:?package=Imato.Data.External&version=1.1.0                

Imato.MsSql.ExternalData

How to put data from external cmd process to SQL server

Using

Programm for produse data
  1. Create your own process to produce new data. Override CreateData in DataProcess
internal class DaysProcess : DataProcess<MonthDay>
{
    public DaysProcess(string[] args) : base(args)
    {
    }

    protected override IEnumerable<MonthDay> Data(
        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.Data.ExternalData.Example.exe Year=2022 Month=10

Add special parameter for destination table

>Imato.Data.External.Example.exe Year=2022 Month=10 Table=##test

Override connection string if it isn't local

>Imato.Data.External.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.Data.External.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Imato.Data.External:

Package Downloads
Enot.SmartMonitoring.Druid

DRUID data provider

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 214 6/21/2023
1.0.0 163 5/16/2023

Ready to use