How to copy the data from Amazon S3 to Azure SQL database incrementally.

Shweta Chavan 40 Reputation points
2024-05-01T20:06:01.4533333+00:00

Hello team,

I wanted to wanted to copy data from Amazon S3(JSON format) to Azure SQL database. I wanted to learn the mechanism for incrementally updating the data from Amazon S3 to Azure SQL. Also, the environment has only SHIR deployed, so data flows couldn't be used.

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,713 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Shweta Chavan 40 Reputation points
    2024-05-08T00:38:38.04+00:00

    Hi Oury,

    I am trying to use Filter by last modified functionality of copy activity. Ideally the files whose LastModified in S3 is after the Start time(Filter by last mofidied) should get copied , however all the files are getting copied.

    User's image


  2. Oury Ba-MSFT 16,731 Reputation points Microsoft Employee
    2024-05-16T00:54:56.12+00:00

    @Shweta Chavan

    Sorry for the delay in response to your question.

    In your SQL DB Table, you can create an identity column that auto increments IDENTITY (Property) (Transact-SQL) - SQL Server | Microsoft Learn

     You would leave this column out of the mapping as SQL will be handling the value.

    Did you verify the variable is resolving to a UTC time correctly?

    Test with a Get Metadata Activity, leave FileName field blank and return child items. Once you get Get Metadata working, you just copy same into Copy Activity.

    Regards,

    Oury


  3. PRADEEPCHEEKATLA-MSFT 79,141 Reputation points Microsoft Employee
    2024-05-20T08:53:09.4166667+00:00

    @Shweta Chavan - I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: How to copy the data from Amazon S3 to Azure SQL database incrementally?

    Solution: The issue is resolved. I am trying to use Filter by last modified functionality of copy activity. Ideally the files whose LastModified in S3 is after the Start time(Filter by last mofidied) should get copied , however all the files are getting copied.

    User's image

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments