How can I automatically trigger the snapshot in an Azure Data Share

AngyBrim 0 Reputation points
2024-10-23T08:23:25.51+00:00

Hi,

At the moment I'm having to manually trigger a snapshot each day, in my data share, in order to receive the sent data into my Azure data lake. Is there a way for me to automate the triggering ? Ideally once the snapshot has successfully run (as seen in the azure data share history), then the snapshot action would be automatically triggered and the new data would arrive in my data lake ?

Thanks

Azure Data Share
Azure Data Share
An Azure service that is used to share data from multiple sources with other organizations.
55 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 3,535 Reputation points Microsoft Vendor
    2024-10-23T18:28:06.2633333+00:00

    Hi @AngyBrim

    Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!

    Is there a way for me to automate the triggering?

    To automate the daily snapshot process in your Azure Data Share and ensure that the new data arrives in your Azure Data Lake without manual intervention, you can use Azure PowerShell. This approach offers a straightforward and user-friendly method for configuring automatic snapshot creation in your Azure Data Share.

    Here are the steps that might help you.

    Install the Azure PowerShell Module: Make sure you have the Azure PowerShell module installed. You can install it using the following command.

    For details, please refer: Install Azure PowerShell

    Authenticate to Your Azure Account: Use the following command to connect to your Azure account.

    Connect-AzAccount
    

    Define and set up the necessary variables for your Azure Data Share environment:

    # Set the required variables
    $resourceGroupName = "YourResourceGroupName" 
    $dataShareAccountName = "YourDataShareAccountName" 
    $subscriptionName = "YourSubscriptionName" 
    $dataShareName = "YourDataShareName" 
    $recurrenceInterval = "Day" # Options: Minute, Hour, Day, Week, Month 
    $synchronizationTime = (Get-Date -Hour 2 -Minute 0 -Second 0).ToUniversalTime() # Set to 2 AM UTC
    
    # Create a new Azure Data Share trigger
    New-AzDataShareTrigger -ResourceGroupName $resourceGroupName `                        
                           -AccountName $dataShareAccountName `                        
                           -ShareSubscriptionName $subscriptionName `                        
                           -Name $dataShareName `                        
                           -RecurrenceInterval $recurrenceInterval `                        
                           -SynchronizationTime $synchronizationTime
    

    For more details please refer: Use PowerShell to create and share snapshot triggers.

    I hope this information helps. Please do let us know if you have any further queries.

    Thank you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.