Created
July 14, 2016 01:56
-
-
Save ahkim/47bad863e4bd2f71e70391046a45ba58 to your computer and use it in GitHub Desktop.
Useful powershell cmdlets for Azure Data Factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ManipulateADF.ps1 | |
# | |
# automate log-in | |
$resourceGroupName = "{your_resource_group}" | |
$azureAccountName = '{your_email}' | |
$azurePassword = ConvertTo-SecureString '{your_password}' -AsPlainText -Force | |
$azureRMCredential = New-Object System.Management.Automation.PSCredential($azureAccountName, $azurePassword) | |
$account = Login-AzureRmAccount -Credential $azureRMCredential | |
# Remove pipeline | |
Remove-AzureRmDataFactoryPipeline -ResourceGroupName $resourceGroupName -DataFactoryName {your_datafactory_name} {your_pipeline_name} -Force | |
#Remove-AzureRmDataFactoryPipeline -ResourceGroupName $resourceGroupName -DataFactoryName ADFBI Pipeline_Copy_Blix -Force | |
# Suspend pipeline | |
Suspend-AzureRmDataFactoryPipeline -ResourceGroupName $resourceGroupName -DataFactoryName {your_datafactory_name} {your_pipeline_name} -Force | |
# Resume pipeline | |
Resume-AzureRmDataFactoryPipeline -ResourceGroupName $resourceGroupName -DataFactoryName {your_datafactory_name} {your_pipeline_name} -Force | |
# Get all datasets | |
Get-AzureRmDataFactoryDataset -ResourceGroupName $resourceGroupName -DataFactoryName {your_datafactory_name} | |
# Remove dataset individually | |
Remove-AzureRmDataFactoryDataset -ResourceGroupName $resourceGroupName -DataFactoryName {your_datafactory_name} -Name {your_table_name} -Force | |
# Remove all datasets | |
# This is particularly useful to recursively remove all datasets | |
Get-AzureRmDataFactoryDataset -ResourceGroupName $resourceGroupName -DataFactoryName {your_datafactory_name} | Remove-AzureRmDataFactoryDataset -Force | |
# Get status of data factory Gateway | |
# if status is Online, it means your gateway is ready to use | |
Get-AzureRmDataFactoryGateway -DataFactoryName {your_datafactory_name} -ResourceGroupName $resourceGroupName | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment