TIBCO Scribe® Online Connector For Files
Use the TIBCO Scribe® Online Connector for Files to read/write the content of files including text or binary or read/write from folders. Pair this Connector with Text or XML Connectors to easily process multiple files in the same flow. In addition, you can process binary or attachment data, which also works with Salesforce, Microsoft Dynamics, Microsoft SQL Server, or Tools (Base64 Encode/Decode Binary) Connectors.
Connector Specifications
Supported | |
---|---|
Agent Types |
|
Connect on-premise | X |
Connect cloud | |
Data Replication Apps | |
Source | |
Target | |
On Schedule Apps | |
Source | X |
Target | X |
On Event Apps | |
Source | X |
Target | X |
Flows | |
Integration | X |
Request-Reply | X |
Message |
This Connector is available from the TIBCO Cloud™ Integration Marketplace. See Marketplace Connectors for more information.
Supported Entities
The Files Connector supports the following entities. Click a linked entity name for additional information when using that entity in TIBCO Cloud™ Integration - Connect. For a list of additional operations by entity see Special Operations.
Standard Operations
Entity | Query | Create | Update | Delete | Upsert |
---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
|
X |
|
|
|
|
|
X |
|
|
|
|
|
X |
|
|
|
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
|
X |
|
|
|
Special Operations
Entity | Operations |
---|---|
- Execute |
Setup Considerations
Accessing Local Directories
- Navigate to the FolderAccess.txt file in the ..\Scribe Software\TIBCO Scribe® Online Agent\Connectors\Scribe.Connector.Files\ folder on the computer where theConnect on-premise agent is installed.
- Open the FolderAccess.txt file in a text editor, such as Notepad.
- Add a line in the FolderAccess.txt file for each directory path that contains text files. Directory paths can be absolute, relative to the folder where the agent is installed, or a network directory. List each folder on its own line, for example:
C:\folder2
\\myserver\archive
.\dataexchangeNote: Microsoft does not support mapped drive names with Windows services. However, UNC path names are supported. For more information, see Services and Redirected Drives (Microsoft MSDN Library) - Save and close the file before you configure any files or folders. If you have not added the locations, TIBCO Cloud™ Integration - Connect generates errors when you try to preview data or test Connections.
Selecting An Agent Type For Files
Refer to TIBCO Cloud™ Integration - Connect Agents for information on available agent types and how to select the best agent for your app.
Connecting To Files
- Select Connections from the menu.
- From the Connections page select Create
to open the Create a connection dialog.
- Select the Connector from
the list to open the Connection dialog, and then enter the following information for this Connection:
- Name — This can be any meaningful name, up to 25 characters.
- Alias — An alias for this Connection name. The alias is generated from the Connection name, and can be up to 25 characters. The Connection alias can include letters, numbers, and underscores. Spaces and special characters are not accepted. You can change the alias. For more information, see Connection Alias.
- Select Test to ensure that the agent can connect to your database. Be sure to test the Connection against all agents that use this Connection. See Testing Connections.
- Select OK/Save to save the Connection.
Files Connector As An App Source
Consider the following when using the Files Connector as an app source.
- Net Change is not supported.
Filtering
Filtering is case-insensitive.
Use the following fields and values when filtering for files or directories:
- SearchPath — Enter the full path to a folder, such as: C:\Users\nkeefe\Desktop\, or a relative path, such as \DataExchange\Inbound\.
- SearchPattern — Enter a file name, such as X12.txt. Using the * wildcard, to return multiple files, such as X*.txt for all files starting with X and ending in .txt is supported.
- SearchFileName — Enter a specific file name, such as X12.txt. Wildcards are not supported.
- Search Option — Valid values include:
- TopDirectoryOnly — Returns only those files in the specified directory
- AllDirectories — Returns matching files from the specified directory and all sub-directories.
Note: If the value is NULL the Connector defaults to TopDirectoryOnly.
Files Connector As An App Target
Consider the following when using the Files Connector as an app target.
- Batch processing is not supported.
Notes On Standard Entities
AppendText
Opens a file and appends the specified string to that file. If the file does not exists, a file is created and the text is added to the new file. To append text to a file, configure the following on the Execute Block Fields tab:
- TargetFullPath — Path and name of the file, including the extension, where the text should be appended. If the file does not exist, it is created automatically. You can enter the full path or the path relative to the agent installation folder.
- Text — Text to be appended.
CreateFolder
Creates a new folder in the designated directory. Enter the path and the new folder name in the SearchPath field on the Execute Block Fields tab.
DeleteFolder
Deletes the designated folder. To delete a folder, configure the following on the Execute Block Fields tab:
- Recursive — Set to true to delete the directory, all sub-directories, and all files in the path. Set to false to delete only the specified directory. When set to false, an error is generated if the directory is not empty.
- SearchPath — Enter the path for the directory to be deleted.
FileBytes
Reads the byte array (binary file data) of a file. To return file data, configure the Query Block Filter tab or the Lookup Block Lookup Criteria tab. See Filtering for filter Field and Value options.
FileLines
Reads a file one line at a time. To return file data, configure the Query Block Filter tab or the Lookup Block Lookup Criteria tab. See Filtering for filter Field and Value options.
FileText
Reads all lines in a file at one time. To return file data, configure the Query Block Filter tab or the Lookup Block Lookup Criteria tab. See Filtering for filter Field and Value options.
Filter Options for FileBytes, FileLines, and FileText
- SearchPath — Enter the full path to a folder, such as: C:\Users\nkeefe\Desktop\, or a relative path, such as \DataExchange\Inbound\.
- SearchFileName — Enter a file name, such as X12.txt.
Files
Reads one or more files in a directory. To return files, configure the following on the Query Block Filter tab or the Lookup Block Lookup Criteria tab.
- SearchPath — Enter the full path to a folder, such as: C:\Users\nkeefe\Desktop\
- SearchPattern — Enter a file name, such as X12.txt. Using the * wildcard, to return multiple files, such as X*.txt for all files starting with X and ending in .txt is supported.
MoveOrRename
Moves or renames a file. To move or rename a file, configure the following on the Execute Block Fields tab:
- SearchFullPath— Path and file name, including the extension, of the file to be moved or renamed.
- TargetFullPath — Path where file should be moved and name of the file, including the extension, as it should be written in the new location.
WriteBytes
Creates a new file and writes the specified byte array to the file. To create a new file and write a byte array to it, configure the following on the Create Block Fields tab:
- Bytes— Results of a Query or Lookup operation on the FileBytes entity that returns the byte array (binary file data) of a file.
- TargetFullPath — Path where file should be created and name of the file, including the extension, as it should be written in the new location.
WriteText
Creates a new file and writes the specified string to the file. To create a new file and write a string to it, configure the following on the Create Block Fields tab:
- TargetFullPath — Path and name of the file, including the extension, where the text should be written. If the file does not exist, it is created automatically. You can enter the full path or the path relative to the agent installation folder. If the file exists, it is overwritten.
- Text — Text to be written to the file.
Sample Flows
In TIBCO Cloud™ Integration - Connect, you can use the Text Connector to process information in text files. However, in cases where multiple text files exist in the same folder, the flow processes a single file and then ends. The next file is not processed until the flow is executed again either manually or on based on the app schedule. This can cause a delay when there are many inbound files to be processed. Using the Files Connector resolves this issue by allowing you to Query a folder with multiple files, and move and rename files as they are processed without exiting the flow. These flows are very simple and do not get into details about mapping data to other systems. They only demonstrate what can be done with files and folders. Each Block in the flows has a brief description that explains the purpose of that Block.
The Files Connector Sample Flows Setup (Run once) flow demonstrates the following:
- Creating three folders: Inbound, Processing, and Archive.
- Creating a file with a header row in the Inbound folder.
- Retrieving records from a source datastore, such as Microsoft Dynamics 365
- Appending those records as text records or lines of text to the file.
The Pre/Post Processing Sample Flow demonstrates the following:
- Querying a folder. In this case we query the Inbound folder.
- Moving a file to from the Inbound folder to the Processing folder
- Processing the contents of the file.
- Moving the file from the Processing folder to an Archive folder and renaming it after processing is complete.
The Reading And Writing Entire Files flow demonstrates the following:
- Mapping files stored locally to another Connection.
- Looking up Byte Array (binary file data) for a file.
- Mapping the file to a target datastore.
- Querying or Fetching files and attachments from a source datastore, such as Salesforce.com.
- Writing files or attachments to your local system.
TIBCO Cloud™ Integration - Connect API Considerations
To create connections with the TIBCO Cloud™ Integration - Connect API, the Files Connector requires the following information:
Connector Name |
Files |
Connector ID |
08246B02-9AFA-4C5C-BABD-27A9534132B9 |
License Agreement
The TIBCO End User License Agreement for the Files Connector describes TIBCO and your legal obligations and requirements. TIBCO suggests that you read the End User License Agreement.
More Information
For additional information on this Connector, refer to the Knowledge Base and Discussions in the TIBCO Community.