MICROSOFT SQL CONNECTOR

Install

Start by downloading the “Microsoft SQL” package available in the Apps Manager.

image001

Once the package has finished installing, the “mssql” node will be available in your Data Flow Manager. Drag and drop the node into your flow.

image002

Configuration

Double click the node to open it.

image003

  • Node name: Changes the name of the node as shown in the Data Flows Manager. Has no effect on the query nor the connection.
  • Connection: Used to create a connection configuration to the MSSQL server.
  • Request Type: Allows you to configure how the query is made to the server. More documentation on how the types are configured and how they work is available in the Help section of the node (which is indicated by a book icon).

The rest of the General Configuration section is determined by what Request Type is selected. Information

  • Table Extract: Allows you to query a specific table from the base.
  • Table: Name of the table to be queried.
  • Ordering column: What column the table is to be ordered by. (Required)
  • Historical Extract: If the checkbox is enabled, the query will always start the extraction from the first line of the table. If not, it will only grab the last line.
  • Custom SQL Request: Allows for a custom SQL request to be queried. However, the query is static and cannot be modified.
  • Triggered Request: The query can also be executed by passing the node a msg object with a request field. This allows for the query to be dynamically changed by using JS function nodes.

Example of a Triggered Request configuration with a function node:

image004

Documentation on MSSQL queries can be found here.

The next tab of the MSSQL node is Request Configuration

  • Recover Lines: Allows the query to grab the last x number of lines before the new lines. This is useful if fields may change after they have been created.
  • Max Lines: Sets a maximum for the number of lines that can be requested. With certain configurations, this will break up the request into multiple requests to grab everything.
  • Override-Timezone: This will shift any received dates by the time zone set in this field. The default is UTC, which applies no offset.

To connect the node to the server, make sure that “Add new mssql-server…” is selected in Connection field of the General Configuration tab, and click the pencil icon next to it to start creating a new MSSQL configuration.

image006

  • Node name: Determines the name of the configuration. (Optional)
  • Host: The IP address or URL of the server being pulled from.
  • Port: The port number used by the server for connecting. 1433 is used as the protocol’s default.
  • Timeout: Determines how many seconds the node will wait for a response before timing out.
  • Username: The username of the service account used to access the server.
  • Domain: The domain the user exists in if using a Windows account. (Optional)
  • Password: The password of the service account used to access the server.
  • Database: The name of the database that data will be pulled from.
  • Default as UTC: If there is no information about date-time data, it will default to reading their time zones as UTC. (Optional)
  • TDS Version: TDS (Tabular Data Stream) is the protocol used to transfer data between a database and client. This may need to change if the customer’s database is using a TDS version before 2012.Once all the information has been filled out, click “Add” to add the configuration to the node.

The configuration should be all set. Click “Done” to save the node configuration and then “Deploy” at the top-right of the window to save your changes.

If the connection has been created, the node should have a green status symbol and say “Connected”.
If the queries being made to it are returning data, the node will show this status, and the outputs can be viewed with a debug node:

image007

Was this article helpful?

Powered by Zendesk