Loading data into Qlik Sense or QlikView using a connector

There are two ways to get data into Qlik Sense or QlikView using a connector. You can either:

  • Use a named pipe to stream data into Qlik Sense or QlikView.
  • Let your connector create a QVX file.

This section describes both approaches.

Take Program.cs in QvEventLogConnectorElaborate as an example.

See: QvEventLogConnectorElaborate

The connector has two ways to fetch data from the data source. It can be invoked from the script editor in Qlik Sense or QlikView, or it can be run as a standalone program.

  • If the connector is started from Qlik Senseor QlikView, it is given two arguments and therefore enters into the if clause. This means that it will send received data directly to Qlik Senseor QlikView using a named pipe.
  • If it runs as a standalone connector instead, it is not given any arguments and the program enters into the else if clause. In this case, all received data is saved in a QVX file.

Program.cs

namespace QvEventLogConnectorElaborate

{

static class Program

{

[STAThread]

static void Main(string[] args)

{

if (args != null && args.Length >= 2)

{

new QvEventLogServer().Run(args[0], args[1]); <- data piped to QlikView

}

else if (args != null && args.Length == 0)

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(new Standalone()); <- data directed to QVX file

}

}

}

}