Save-AzDataFactoryLog
Downloads log files from Azure HDInsight processing.
Syntax
Save-AzDataFactoryLog
[-DataFactoryName] <String>
[-Id] <String>
[-DownloadLogs]
[[-Output] <String>]
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Save-AzDataFactoryLog
[-DataFactory] <PSDataFactory>
[-Id] <String>
[-DownloadLogs]
[[-Output] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Save-AzDataFactoryLog 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-AzDataFactoryRun 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.
Examples
Example 1: Save log files to a specific folder
Save-AzDataFactoryLog -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
Save-AzDataFactoryLog -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
Save-AzDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39"
This command returns the location of log files. Note that DownloadLogs is not specified.
Parameters
-DataFactory
Specifies a PSDataFactory object.
Type: | PSDataFactory |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DataFactoryName
Specifies the name of a data factory. This cmdlet downloads log files for the data factory that this parameter specifies.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DownloadLogs
Indicates that this cmdlet downloads log files to your local computer. If Output folder is not specified, files are saved to Documents folder under a subfolder.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Specifies the ID of the activity run for the data slice. Use the Get-AzDataFactoryRun cmdlet to get an ID.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Output
Specifies the output folder in which the downloaded log files are saved.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that this parameter specifies.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Outputs
Notes
- Keywords: azure, azurerm, arm, resource, management, manager, data, factories