Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Save-AzureDataFactoryLog

Save-AzureDataFactoryLog

microsoft.azure.commands.datafactories.dll

Synopsis

Downloads log files from HDInsight processing.

Syntax

Save-AzureDataFactoryLog [-DataFactory] [-Id] [-Output] [-DownloadLogs] [<CommonParameters>]

Save-AzureDataFactoryLog [-ResourceGroupName] [-DataFactoryName] [-Id] [-Output] [-DownloadLogs] [<CommonParameters>]

Detailed Description

You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager.

The Save-AzureDataFactoryLog cmdlet downloads log files associated with Azure HDInsight processing of Pig or Hive projects or for custom activities to your local hard drive. You first run the Get-AzureDataFactoryRun cmdlet to get an ID for an activity run for a data slice, and then use that ID to retrieve log files from the binary large object (BLOB) storage associated with the HDInsight cluster.

If you do not specify –DownloadLogs parameter, the cmdlet just returns the location of log files.

If you specify –DownloadLogs parameter without specifying an output directory (-Output parameter), the log files are downloaded to the default Documents folder.

If you specify –DownloadLogs parameter along with an output folder (-Output), the log files are downloaded to the specified folder.

Parameters

-DataFactory <PSDataFactory>

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-DataFactoryName <String>

Specifies the name of a data factory. This cmdlet downloads log files for the data factory that this parameter specifies.

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-DownloadLogs <SwitchParameter>

Indicates that this cmdlet downloads log files to your local computer. If Ouptut folder is not specified, files are saved to Documents folder under a subfolder.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Id <String>

Specifies the ID of the activity run for the data slice. Use the Get-AzureDataFactoryRun cmdlet to get an ID.

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Output <String>

Specifies the output folder in which the downloaded log files are saved.

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ResourceGroupName <String>

Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that this parameter specifies.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

None

Examples

Example 1: Save log files to a specific folder

This command saves log files for the activity run with the ID of 841b77c9-d56c-48d1-99a3-8c16c3e77d39 where the activity belongs to a pipeline in the data factory named LogProcessingFactory in the resource group named ADF. The log files are saved to the C:\Test folder.

                    PS C:\>Save-AzureDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39" -DownloadLogs -Output "C:\Test"

                

Example 2: Save log files to default Documents folder

This command saves log files to Documents folder (default).

                    PS C:\>Save-AzureDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39" -DownloadLogs

                

Example 3: Get the location of log files

This command returns the location of log files. Note that –DownloadLogs parameter is not specified.

                    PS C:\>Save-AzureDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39"

                

Online Version
Get-AzureDataFactoryRun
Get-AzureDataFactoryPipeline
New-AzureDataFactoryPipeline
Remove-AzureDataFactoryPipeline
Set-AzureDataFactoryPipelineActivePeriod
Suspend-AzureDataFactoryPipeline