Move a file from one SFTP folder to another SFTP Folder from Data Factory - azure

I have a Pipeline created in Data Factory that brings a file from a folder connected to an SFTP and leaves it in an ADSL container (Gen2). What I need is that once this process is finished, move the file from the SFTP source folder to another called "Procesados" but from Azure Data Factory, is it possible?
Thanks!
Regards

Yes that is possible. You just set up a copy activity with source as where the file is in your picture and sink as your desired destination.

Related

Azure Data Factory Copy Behaviour "Preserve Hierarchy" not working

I am trying to copy data from one container in Azure Data lake Gen2 into another in the same Storage Account. I want preserve the same hierarchy with folders and subfolders but whatever I try it does only copy the json file and no folders.
As of now I have the target container set in the target dataset. Should I add something more (such as directory and file)?
I have tested this for you and it can work, please follow this:
1.My container's structure:
examplecontainer
+test
+re
json files
+pd
json files
Setting of Source in Copy activity:
3.Setting of Sink in Copy activity:
4.Result:

Get ZIP file from SFTP to Azure Datalake using Azure data factory and store it into CSV format

Hi Have CSV files in zipped format in SFTP
I am able to install IR for SFTP and connection is successfull, but copying ZIP file from SFTP source to store into ADLS i getting error(import schema failed or no format define).
I have used copy data tool and dataflow for this scenerio but i am not sure how to zopy zip file from SFTP inside ADF.
Can you please try below:
Change to setting "ZipDeflate" compression type in your source data set and in the sink data set of Copy activity you don't need to specify any compression configuration (Compression type is "none").
In the Copy activity sink settings, please set the copy behavior to "Flatten Hierarchy" to unzip and write the individual files.

Get Meta data in Azure Data Factory is not giving me my multiple excel files successfully

I am trying to process multiple excel files in ADF to utilize them in a copy data activity to blob storage. Here is how my hierarchy is structured :
My source is an excel sheet coming from SFTP server (linked service).
File path: unnamed folder with multiple .xlsx files. Inside those files, the sheet name varies between sheet1 and table1.
I am trying to create get metadata to get all those files to pass them into a copy activity, but my metadata is never succeeding
Attached below is an elaboration about the problem:
If you only want to copy all excel files from SFTP to Blob Storage, there is no need to use Get Metadata activity.
Please try like this:
1.create binary format dataset
2.choose Wildcard file path when copy data
3.sink to your Blob Storage.

Use Azure Data Factory to copy files and place a csv of files copied

I am trying to implement the following flow in an Azure Data Factory pipeline:
Copy files from an SFTP to a local folder.
Create a comma separated file in the local folder with the list of files and their
sizes.
The first step was easy enough, using a 'Copy Data' step with 'SFTP' as source and 'File System' as sink.
The files are being copied, but in the output of this step, I don't see any file information.
I also don't see an option to create a file using data from a previous step.
Maybe I'm using the wrong technology?
One of the reasons I'm using Azure Data Factory, is because of the integration runtime, which allows us to have a single fixed IP to connect to the external SFTP. (easier firewall configuration)
Is there a way to implement step 2?
Thanks for any insight!
There is no built-in feature to achieve this.
You need to use ADF with other service, I suppose you to first use azure function to check the files and then do copy.
The structure should be like this:
You can get the size of the files and save them to the csv file:
Get size of files(python):
How to fetch sizes of all SFTP files in a directory through Paramiko
And use pandas to save the messages as csv(python):
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html
Writing a pandas DataFrame to CSV file
Simple http trigger of azure function(python):
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=python
(Put the processing logic in the body of the azure function. Basically, you can do anything you want in the body of the azure function except for the graphical interface and some unsupported things. You can choose the language you are familiar with, but in short, there is not a feature in ADF that satisfies your idea.)

How can I decompress my .zip file and store in ADL/Blob storage?

I have a ftp as a source connection where some I have zip file and others are not in compress form. I want to copy the files from ftp,decompress zip files and put all files into azure data lake or azure blob storage wherever it's possible to get decompressed.
I'm using copy data activity where I have a source as ftp and properties is zipDeflate,fastest and binary copy and the sink side, I'm just defining the destination ADL path. The files are getting copied to ADL but they're copying in compress form only.
Please let me know if it's possible to achieve the above objective by using copy activity process?
Using binary copy is your issue here, data factory wont understand the data it is moving to uncompress it. Try the same setup without binary copy!
Hope this helped!

Resources