SFTP

SFTP (SSH File Transfer Protocol) has become widely accepted lately for secure transmission of files between two or more computers. It’s been preferred over the traditional method of file transmission FTP (File Transfer Protocol) and even it’s secure version FTPS (Secure File Transfer Protocol).

SFTP uses a client and an SSH server to operate. The client authorizes with the SSH server before transmitting the data thus ensuring security and secrecy of the files.

Connecting to SFTP

Mammoth enables you to pull data from your SFTP client.

You can connect to your SFTP client with these simple steps:

  1. Login to your Mammoth dashboard.

  2. Click on “Add data” button at the top-right section and select “API & Databases”.

  3. Choose SFTP from the list and enter your credentials.

  1. Choose the account.

Select the account

Fig. 69 Choosing the Account.

  1. Next select the file, pull type, etc.

Mammoth offers two types of data pull options:

  • Pull same file: This option retrieves latest data from the same file as per the specified schedule.

  • Pull next file based on name pattern: This option follows a pattern to find the next file in the series and pulls data from that file on latest data retrieval or scheduled pulls.

Defining file pattern in SFTP

Suppose you have a file named data 01-jul-22 12:45:03 pm. The pattern to fetch the next file in this series would be data <dd>-<mon>-<yy> <hh>:<mi>:<ss> <pm>.

You can refer to this table to create different patterns:

Table 1 Data Patterns

Pattern Symbol

Description

Value

Example file

Example pattern

<dd>

date

00 to 31

For a file named November-12-2022

The pattern will be November-<dd>-<yyyy>

<dy>

day

Sun, Mon, Tue, Wed, Thu, Fri, Sat

For a file named Mon 12-07-2022

The pattern will be <dy> <dd>-<mm>-<yyyy>

<day>

day

Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

For a file named Monday 12-07-2022

The pattern will be <day> <dd>-<mm>-<yyyy>

<w>

day

0-6, (0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday)

For a file named 01 12-12-2022

The pattern will be <w> <dd>-<mm>-<yyyy>

<mm>

month

01-12

For a file December 01, the pattern will be <month> <w>

<mon>

month

Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

For a file JUL 12-07-2022

The pattern will be <mon> <dd>-<mm>-<yyyy>

<month>

month

January, February, March, April, May, June, July, August, September, Ooctober, November, December

For a file JULY 12-07-2022

The pattern will be <month> <dd>-<mm>-<yyyy>

<yy>

year

00-99

For a file JUL 22

The pattern will be <mon> <yy>

<yyyy>

year

1000-9999

For a file JUL 2022

The pattern will be <mon> <yyyy>

<hh>

year

00-12

For a file JUL 12-07-2022 02:30:13 am

The pattern will be <mon> <dd>-<mm>-<yyyy> <hh>:<mi>:<ss> <am>

<hh12>

hour

00-12

For a file JUL 12-07-2022 08:45:15 pm

The pattern will be <mon> <dd>-<mm>-<yyyy> <hh>:<mi>:<ss> <am>

<hh24>

hour

00-24

For a file JUL 12-07-2022 21:45:15

The pattern will be <mon> <dd>-<mm>-<yyyy> <hh>:<mi>:<ss>

<mi>

minutes

00-59

Check examples above

<ss>

seconds

00-59

Check examples above

<am>

AM

am

Check examples above

<pm>

PM

pm

Check examples above

  1. Next, schedule your data pulls and submit.

Your Dataset will appear in the Data library.

Note

The system pulls only the most recent file based on the pattern. For instance, if your SFTP client gets a new file every day but Mammoth pulls are scheduled for weekly, the system will fetch only the last file of that week. To avoid this, make sure your data pulls in Mammoth coincide with the SFTP data updates.

Options

Mammoth also offers a bunch of options to manage your SFTP integration and Dataset.

These are:

  1. Edit Connection: You can use this option to make changes to the account settings.

  2. Retrieve Latest Data: You can refresh your Dataset with new data.

SFTP integration management

Fig. 70 SFTP connection management options

  1. Edit Schedule: You can make changes to the data schedule with this option.

SFTP schedule option

Fig. 71 Edit schedule option