Datarails Integrations solution is a paid plan that lets you consolidate all your data sources and seamlessly connect your external apps to the Datarails web app. For more information contact our integrations team here.
Section I: Prerequisites
The Datarails SQL Sync Service must be installed on a server that maintains continuous operation and remains connected to the SQL database. It is not mandatory for this server to be the same as the one hosting the SQL database.
- Operating system: Windows Server 2012 or higher
-
Hardware:
- Recommended: 4 Processors, 16 GB RAM, 50GB Free disk space
- Minimal: 2 Processors, 8 GB RAM, 30GB Free disk space
- NET Framework 4.8 version is required (a restart may be necessary) - Download from this link
- The installer requires Admin privileges
-
Firewall / Networking*:
- Access to https://app.datarails.com via 443 port is required
- Access to https://static.datarails.com via 443 port is required
*If IP whitelisting is required:
- US: 20.231.115.17
- UK: 20.90.237.117
- CA: 20.116.160.220
*If on-prem, needs access to the on premise server.
*Please create a “read only” user in the database.
Section II: Sync Agent Installation Instructions
Step 1: Installation
Download the latest version of the SQL Server agent from here and follow the instructions.
After installation, two (2) components will be installed on the machine (C:\Program Files (x86)\Datarails Sync):
- DRSyncToAllService - a Windows Service that should be in running state
- Datarails Sync - shortcut to EXE file used as a UI for the service
Step 2: Set up User Credentials
After the installation, a credentials configuration window should appear automatically.
In case the screen did not appear: Locate the Datarails icon in the System Tray, right click > Credentials
- The credentials (username and password) should have been sent to you by the Datarails Support team.
- Enter the username and password and click Save & Validate
- The service will perform a quick test to validate the credentials and access to the Datarails server. If the tests are successful, a green icon should appear next to the test as shown.
- In case of error, a red icon will appear next to the test.
- Hover with the mouse over the icon to see the error code, then right click on the icon to copy the information to clipboard.
Windows Account
The service logs on by default as a Local System account. If you want the agent services to run on a Windows account instead of a Local System account please do following:
- Open Control Panel -> Administrative Tools -> Services DRSyncToAllService
- Right click -> Properties -> Log On (see image).
- Type the username and password.
- Note: This account must be a member of the local Administrators group
- It must have the read/write access to C:\Program Files (x86)\Datarails Sync directory.
- Click Apply and restart the service
Step 2.1: Proxy Configuration (Optional)
Datarails SQL Sync service automatically detects the proxy configuration for the specific user that logs on to the service. There are cases that the proxy is not configured to work for a Local System account. In that case, click on Advanced to manually set up the proxy settings as shown below.
- Select Use proxy option.
- Enter the proxy address and optional username and password of the proxy.
- Optional: To bypass the proxy settings in case a proxy is configured in your system, check the Bypass the proxy settings option and be sure that proxy address is the same as configured in the computer.
Step 3: Starting / Stopping the Service (Optional)
- Locate the Datarails SQL Sync service UI icon in the system tray
- Right click the icon > SQL Sync > Start Service.
Step 4: Log Files (Optional)
Viewing Logs Files
To view log files, we recommend a log file viewer that supports Tail. In this way, you can see the log file messages in real time.
Please download one of the following:
Exporting Log Files
- Login to the FileSync server.
- From the System tray, right click on the Datarails icon and choose Zip Logs.
- In case the agent is not running, go to: C:\Program Files (x86)\Datarails Sync and double click on FileSyncAgent.
- After File Explorer is opened, use the latest zip file.
Upgrading the Existing Version
- Download the latest software.
- There is no need to uninstall the previous version.
- The previous settings will be saved.
- Follow the installer instructions.
After the installation, the service will automatically start.
Section III: Configuring ODBC Data Source
- From the server where we installed the agent, go to Windows main search and type ODBC Data sources.
- Choose the ODBC 32-bit.
- Click on System DSN > Add.
- Select the driver where you want to set up the data source.
- Fill in the rest of the Data source details.
- The DSN Name the user created should be pasted on Datarails with the Uid & PASS.
Section IV: Setting up the Data Sync Process
You will first need to log in to Datarails using your Datarails credentials via app.datarails.com (you should be an Administrator in Datarails). Please note that the app link could be prefixed with "CAD" or "UK" depending on your region.
Step 1: Create a New Data Source in Datarails
- Go to Admin > Data Sources
- Click Add New Data Source
- Fill in the following information:
- Organization: Pick the organization to which you want to assign the connection
- Type: Select “ODBC/OLE”
- Name: Name this integration (e.g. “Test1”)
- Server URL / Connection String: see table below
- Sync Service: On
- Click Save.
- Click Test Connection; OK Should appear in the “Test Results” field.
Sample connection strings
The connection string may vary between the different SQL Server/ODBC configurations.
Platform |
Example |
Remarks |
Cloud-based SQL Server |
Driver={ODBC Driver 17 for SQL Server};Server=myserver;Database=XXX;User Id=XXX;Password=XXX |
Azure |
SQL Server (publicly exposed) |
Driver={ODBC Driver 17 for SQL Server};Server=myserver;Database=XXX;Uid=XXX;Pwd=XXX |
Generic |
SQL Server (sql authentication) |
Server=myserver;Database=XXX;User Id=XXX;Password=XXX |
Use if you have a username and password to your SQL server. |
SQL Server (windows authentication) |
Server=XXX;Database=XXX;Trusted_Connection=True |
In this case the Windows user that is running the DRSyncToAllService needs to have access to the SQL server |
ODBC Connection |
DSN=XXX;Uid=XXX;Pwd=XXX; |
DSN must be set in the Windows Control Panel (ODBC Data Source Administrator 32-bit) under ‘System DSN’ |
ODBC Connection - Progress Edge |
DSN=XXX;Uid=XXX;Pwd=XXX; |
DSN must be set in the Windows Control Panel (ODBC Data Source Administrator 32-bit) under ‘System DSN’ Download the connectors from here. |
Microsoft Analysis Server(Windows authentication) |
Data Source=XXX;Initial catalog=XXX;Application Name=MSOLAP; |
In this case the Windows user that is running the DRSyncToAllService needs to have an access to the SQL server The connection string MUST include Application Name=MSOLAP; |
Microsoft Analysis Server (with username and password) |
Data Source=XXX;Initial catalog=XXX;User ID=XXX;Password=XXX;Application Name=MSOLAP; |
--- |
MySQL |
Use ODBC |
--- |
- Once the Data Source is created, you can share it with other Datarails users.
Note: Only users that are given permission to the Data Source, can use it for querying and syncing data to Datarails Fileboxes.
-
Go to the Data Source you have just created, choose “Share”
-
You can add and remove users to this Data Source as well as see which users have access to this connection.
-
Step 2: Querying the Data Source
For the most up-to-date and complete instructions on how to create a new Filebox via the workspace or the Excel add-in, please go here.
After you have created the Filebox, pickup here with the first step.
- Go to Filebox > Settings tab and scroll to the Data Connection section
- Choose the relevant Data Connection from the list (e.g Test1)
- Note: the connection will appear in the list only if it was shared with the user as described in the previous steps.
- To define a sync schedule set a Sync Interval.
- For this example, use 0 * * * * to have the sync process run every hour; the syntax used here is a cron syntax
- In the Sync Query field, type the actual SQL query that will be executed. (e.g. SELECT * FROM sometable)
- Click Save
- Click Test; an OK indicates that the query was properly defined
- Versions will start syncing to the Filebox according to the set schedule
- Optional: Press Sync Now in order to create a version in the Filebox from the underlying query.
Important! It can take up to two (2) minutes until the synced version will appear in the versions list
Step 3: Using Filebox Date Tags for Queries
In the Filebox you can reference the assigned date_tag dynamically by using the {{date_tag}} directive. This will replace everything within the double curly brackets with the real date tag of the query.
Example:
If the date tag is Dec-2020 (Monthly), the string, The current date tag is {{date_tag}} will be rendered to, The current date tag is 2020-06-01
You can test this by saving the date_tag, and then press on the Show Rendered Query button. In addition, you can use filters on the date-tag, using the pipe (|) sign. A filter is an operation performed on the date tag itself.
The following simple filters can be used:
- year example: The year is {{date_tag|year}} > The year is 2020
- month example: The month is {{date_tag|month}} >The month is 06
- day example: The day is {{date_tag|day}} > The day is 01
In addition, the following date manipulations can be used:
- eomonth (end of month)
- somonth (start of month)
These manipulations can be followed by the additional filter:
- {{date_tag|eomonth}} > 2020-06-30
- {{date_tag|eomonth|day}} > 30
This filter add can be used in order to manipulate numbers (hence the day/month/year):
- {{date_tag|day|add:4}} > 5
- {{date_tag|eomonth|day|add:-5}} > 25
Last, there is a special format filter, that can be used for formatting date in any python valid format examples:
- {{date_tag|format:"%B %d %Y" }} > June 01 2020
Test Connection Errors
Error |
Solution |
Named Pipes Provider, Error: 40 – could not open a connection to SQL server |
Your SQL server probably disallows remote connections. Please follow the instructions in the link. |
© Datarails Ltd. All rights reserved.
Updated
Comments
0 comments
Article is closed for comments.