< Back

Save-AzureRmDataFactoryLog

Tue Jan 29, 2019 9:41 pm

NAME Save-AzureRmDataFactoryLog



SYNOPSIS

Downloads log files from Azure HDInsight processing.





SYNTAX

Save-AzureRmDataFactoryLog [-DataFactory] <PSDataFactory> [-Id] <String> [[-Output] <String>] [-DefaultProfile <IAzureContextContainer>]

[-DownloadLogs] [<CommonParameters>]



Save-AzureRmDataFactoryLog [-ResourceGroupName] <String> [-DataFactoryName] <String> [-Id] <String> [[-Output] <String>] [-DefaultProfile

<IAzureContextContainer>] [-DownloadLogs] [<CommonParameters>]





DESCRIPTION

The Save-AzureRmDataFactoryLog 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-AzureRmDataFactoryRun 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 the DownloadLogs parameter, the cmdlet just returns the location of log files.



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

folder.



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





PARAMETERS

-DataFactory <PSDataFactory>

Specifies a PSDataFactory object.



Required? true

Position? 0

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.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Id <String>

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



Required? true

Position? 1

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.



Required? false

Position? 2

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.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.DataFactories.Models.PSRunLogInfo







NOTES





* Keywords: azure, azurerm, arm, resource, management, manager, data, factories



Example 1: Save log files to a specific folder



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

-DownloadLogs -Output "C:\\Test"



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.





Example 2: Save log files to default Documents folder



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

-DownloadLogs



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





Example 3: Get the location of log files



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



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







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... factorylog

Get-AzureRmDataFactoryRun

Get-AzureRmDataFactoryPipeline

New-AzureRmDataFactoryPipeline

Remove-AzureRmDataFactoryPipeline

Set-AzureRmDataFactoryPipelineActivePeriod

Suspend-AzureRmDataFactoryPipeline