Reductech.Sequence.Connectors.Sql 0.17.0

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

// Install Reductech.Sequence.Connectors.Sql as a Cake Tool
#tool nuget:?package=Reductech.Sequence.Connectors.Sql&version=0.17.0                

Sequence® SQL Database Connector

Sequence® is a collection of libraries for automation of cross-application e-discovery and forensic workflows.

The SQL connector contains Steps to:

  • Build connection strings
  • Create tables
  • Insert entities into tables as rows
  • Read entities from tables
  • Run arbitrary queries

The following flavors of SQL database are supported:

  • MariaDb
  • MS SQL Server
  • MySQL
  • Postgres
  • SQLite

Creating Tables Using Schemas

Schemas are used to create tables and insert entities.

You can create a Schema from an existing table using SqlCreateSchemaFromTable

The following schema properties are used in creating tables and inserting entities

Property Description
Name Maps to the name of the SQL table.
AllowExtraProperties Must be set to False
Properties Dictionary Mapping column names to column details.

The following nested properties are also used

Property Description
Type The property type.
Multiplicity Must be either UpToOne for a nullable property or ExactlyOne for a not null property.

This is an example of declaring a schema

- <Schema> = (
    Name: "MyTable"
    AllowExtraProperties: False
    Properties: (
      Id: (
        Type: SchemaPropertyType.Integer
        Multiplicity: Multiplicity.ExactlyOne
      )
      Name:(
        Type: SchemaPropertyType.String
        Multiplicity: Multiplicity.UpToOne
      )
    )
  )

Example

This is an example of a step that drops a table, recreates it, and inserts an entity.

- <ConnectionString> = CreateConnectionString
                         Server: "Server"
                         Database: "Database"
                         UserName: "UserName"
                         Password: "Password"
- <Schema> = (
    Name: "MyTable"
    AllowExtraProperties: False
    Properties: (
      Id: (
        Type: SchemaPropertyType.Integer
        Multiplicity: Multiplicity.ExactlyOne
      )
      Name:(
        Type: SchemaPropertyType.String
        Multiplicity: Multiplicity.UpToOne
      )
    )
  )
- SqlCommand
    ConnectionString: <ConnectionString>
    Command: "DROP TABLE IF EXISTS MyTable"
    DatabaseType: 'SQLite'
- SqlCreateTable
    ConnectionString: <ConnectionString>
    Schema: <Schema>
    DatabaseType: 'SQLite'
- SqlInsert
    ConnectionString: <ConnectionString>
    Entities: [
      (Id: 1 Name:'Name1' )
      (Id: 2 Name:'Name2')
    ]
    Schema: <Schema>
    DatabaseType: 'SQLite'

Documentation

https://sequence.sh

Download

https://sequence.sh/download

Try SCL and Core

https://sequence.sh/playground

Package Releases

Can be downloaded from the Releases page.

NuGet Packages

Release nuget packages are available from nuget.org.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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

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
0.17.0 391 8/30/2022
0.16.0 442 7/17/2022