Skip to content

SkylineCommunications/Skyline.DataMiner.Utils.ExportImport

Repository files navigation

Skyline.DataMiner.Utils.ExportImport

DataMiner CICD NuGet Solution

About

About Skyline.DataMiner.Utils.ExportImport Packages

Skyline.DataMiner.Utils.ExportImport Packages are NuGets available in the public nuget store that contain assemblies that enhance development of DataMiner protocols or Automation scripts.

They allow to easily export and import data in a CSV, JSON or XML format.

Warning Prior to DataMiner 10.1.11 (RN 30755), when a .NET Standard 2.0 NuGet is used in a QAction or EXE, you need to manually add a reference to .NET Standard.

<ItemGroup>
  <Reference Include="netstandard" />
</ItemGroup>

When .NET Framework 4.6.2 is targeted, you will get a warning icon, but this can be ignored.

The following packages are available:

  • Skyline.DataMiner.Utils.ExportImport

About DataMiner

DataMiner is a transformational platform that provides vendor-independent control and monitoring of devices and services. Out of the box and by design, it addresses key challenges such as security, complexity, multi-cloud, and much more. It has a pronounced open architecture and powerful capabilities enabling users to evolve easily and continuously.

The foundation of DataMiner is its powerful and versatile data acquisition and control layer. With DataMiner, there are no restrictions to what data users can access. Data sources may reside on premises, in the cloud, or in a hybrid setup.

A unique catalog of 7000+ connectors already exist. In addition, you can leverage DataMiner Development Packages to build you own connectors (also known as "protocols" or "drivers").

Note See also: About DataMiner

About Skyline Communications

At Skyline Communications, we deal in world-class solutions that are deployed by leading companies around the globe. Check out our proven track record and see how we make our customers' lives easier by empowering them to take their operations to the next level.

Requirements

The "DataMiner Integration Studio" Visual Studio extension is required for development of connectors and Automation scripts using NuGets.

See Installing DataMiner Integration Studio

Warning NuGets are mandatory to be installed with PackageReferences. DIS was redesigned to work with PackageReferences and be future-proof.

For more information on how to migrate from packages.config to PackageReferences, see docs.microsoft.com.

Getting started

For reading use your entry point should be:

Reader<DataRow> reader = ReaderFactory.GetReader<DataRow>(filePath);
List<DataRow> rows = reader.Read();

For writing use your entry point should be:

Writer<DataRow> writer = WriterFactory.GetWriter<DataRow>(filePath);
writer.Write(rows);

Based on the file extension (.csv, .json or .xml) it will return the specific reader/writer.

When exporting/importing to CSV, header attributes should be specified to identify either the name of the column or the position of the column. If there are properties that don't need to be included, they can be ignored with an attribute as well.

[CsvHeader("PK")]
public string Index { get; set; }

...

[CsvHeader(1)]
public string Name { get; set; }

...

[CsvIgnore]
public string Extra { get; set; }

Warning Only use either the columns names or the position. If both are used or there are properties without attribute, then a MissingCsvHeaderAttributeWithPositionException will be thrown.