Scripting

From Data Islands
Revision as of 13:21, 10 December 2021 by WikiSysopdi (talk | contribs) (initial write)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To automate Data Islands flows you can write a script and run this

First we will create a PUSH script.

Here is an example that connects and queries a Sage 300 ERP databse on MSSQL server.

The scenario here is one where you want some customer data (from table ARCUS) to provide to a sales rep. You only want to provide contact information and exclude financial information.

Open notepad and copy the contents below into it (replacing the items in CAPS with your credentials) and save as "demopush.tsd"

connect USERNAME PASSWORD

addserver sql SERVERNAME SQLUSER SQLPASSWORD

usedb saminc

addregion Sage300Marketing

deleteisland arcuslist

querydb "SELECT NAMECUST,NAMECTAC,TEXTPHON1,TEXTPHON2,EMAIL1,EMAIL2 FROM ARCUS WHERE PRICLIST='WHS'"

push arcuslist


USERNAME = Data Islands acocunt username

PASSWORD = Data Islands acocunt password

SERVERNAME = Your SQL server name

SQLUSER = Your SQL server user

SQLPASSWORD= Your SQL server password


This creates the region "Sage300Marketing" and an island "arcuslist" with the data from the querydb SQL.

This is hosted on the Data Islands cloud.


Using windows taskmanager you can run the dataislands app and pass in the "demopush.tsd" as a parameter. The app will then run the script.