Extract csv file from sftp to ServiceNow

Renu9
Tera Contributor

Hi All,

We are having a requirement to export the csv file data using SFTP. A file from a third party will be placing a csv file in SFTP Server , we need to extract it and do some checks and load the needed parameters(fields) into the ServiceNow User table.

Could you please guide me how this can be achieved .?(exporting csv file). csv file contains 15 fields, out of these I need to pick 10 fields (ex: company name, manager name, manager id , etc) into the already existing user record in user table.

Please guide me any approaches.

Thanks in advance!!

1 ACCEPTED SOLUTION

Hi,

you cannot specify the filter condition using data source of type sftp

you can only specify the file name

Let entire data come and based on your coalesce field it will either insert/update the fields.

If my response helped please mark it correct and close the thread so that it benefits future readers.

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Hi,

you cannot specify the filter condition using data source of type sftp

you can only specify the file name

Let entire data come and based on your coalesce field it will either insert/update the fields.

If my response helped please mark it correct and close the thread so that it benefits future readers.

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Renu 

Any update to this?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Mahendra RC
Mega Sage

Hello Renu,

You can create a data source with the SQL statement with query to pick the data created or updated after last run:

If you are selecting only specific field from Database then include the Datetime field from database in your query.

find_real_file.png

If my answer helped you in any way then please do mark it as helpful. If it answered your question then please mark it correct and helpful.

Thanks

Hi Mahendra, may i know the type you selected for the data source as I am not seeing SQL statement and fields on screenshot when I am trying to create on data source