Decrypt and import file to table
BeantwoordHello,
I am new to chains and trying to achieve the following functionality:
- Download encrypted csv file from external source using SFTP connector
- Decrypt file
- Create Workiva file from the decrypted file
- Import Workiva file into Workiva table
The chain is functional if I do not use encryption (download csv file, create Workiva file from the downloaded file, import it into Workiva table). But, if I do use encryption, decryption step works well, however, step 3 (Create Workiva file) fails with the following error:
Uncompressed file detected, zipping before sending to Workiva
Error creating file: invalid file extension for '2821621619_decrypted_1727378968574'. File name must be .json, .csv or a .zip containing a single .csv or .json file
Result: Error creating file: invalid file extension for '2821621619_decrypted_1727378968574'. File name must be .json, .csv or a .zip containing a single .csv or .json file
Seems that the file name is not accepted, because I am using the name generated by the decrypt command. So, I have tried a few workarounds but still end up with an error. For exemple, I tried to rename the decrypted file (File Utilities/Move) to (decrypted_file.csv) before creating the file and pass the new file name to the create file command, but I still have an error (Error creating file: file mimetype application/zip not permitted . Code 400). Could you please let me know how can I make this work?
My goal is to import the content of an encrypted file into a Workiva table. As I mentioned, I am new to chains, so if you can point me into the right direction for building a chain for this purpose it would be greatly appreciated.
Thank you!
-
Emilia Bruchental do you mind sharing a screenshot of your Create File command? You can try typing decrypted_file.csv directly in the File Name field and see if that works.
0Hello Mark,
That's what I am passing to the Create file command. The hard coded name of the file, because I wanted to keep it simple.
And here is the Move command:
And here is the full error on the Create File:
Command description: Accepts CSV/JSON file or a ZIP file with a single CSV or JSON file contained within.
The file in the ZIP file must be CSV or JSON file and the name of the CSV or JSON is used to name the imported file.
It is also possible to upload a url to a file to be downloaded instead of a file itself.
This command will then make a request to get the file using a simple unauthenticated GET request. An example URL would be an S3 signed url to a file in an S3 bucket.
JSON files are expected to have a single json record per line, in other words, a JSON file is a series of JSON objects delimited by a newline character.
NOTE that all files uploaded must have a .csv or .json extension, or the name just have a .csv, .tsv or .json extension.
Uncompressed file detected, zipping before sending to Workiva
Error creating file: file mimetype application/zip not permitted
. Code 400
Result: Error creating file: file mimetype application/zip not permitted
. Code 400Here is also an image of my test chain:
0This can be achieved with the following commands at minimum:
- SFTP - Download File: Use this command to download the PGP encrypted csv file from your SFTP server
- Encryption - Decrypt with PGP key: The Encryption Connector must be configured with the corresponding PGP Private Key File. Work with your IT and security team to ensure this Connector has been configured correctly with the right private key. Then use this command to decrypt the csv file downloaded in step 1. Validate this command's output to ensure the file is decrypted as expected
- Workiva - Create File: Use this command to stage the decrypted file from step 2 into a Wdata Table. Specify the Name to include a valid file extension if needed. Alternatively, use the Load Data to Wdata template
0U moet u aanmelden om een opmerking te plaatsen.
Opmerkingen
3 opmerkingen