Read Data from a SQL Table
Instructions on how to install and setup Sequence and the SQL Connector.
This workflow:
- Reads a row from a SQL table
- Sets variables called SourcePath and DestinationPath according to the values in that row
- Prints the SCL to copy a file from SourcePath to DestinationPath
See Create SQL Table and Insert Data example to set up a table that can be used in this example.
SCL​
- <Connection> = CreateMySQLConnectionString
Server: 'localhost'
Database: 'database'
UserName: 'root'
Password: 'verysecret'
- <TableName> = 'Config'
- <Rows> = SQLQuery
Connection: <Connection>
Query: $"Select SourcePath, DestinationPath from {<TableName>} where Id = 2"
- <Row> = <Rows>[0]
- <SourcePath> = <Row>['SourcePath']
- <DestinationPath> = <Row>['DestinationPath']
- Print $"- FileCopy {<SourcePath>} {<DestinationPath>}"