How to set End Cell value as dynamic in source inside mapping data flow of azure data factory to fetch google sheet data?

Prajakta-8530 45 Reputation points
2023-06-06T13:21:39.7933333+00:00

I have created linked service for google sheet and using Data flow activity to fetch google sheet data. On source side, I want End Cell value to be dynamic instead of hard coded. It should fetch data till last non empty cell of the last column as well as row.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,021 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,301 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,101 questions
{count} votes

Accepted answer
  1. QuantumCache 20,346 Reputation points
    2023-06-07T16:56:17.28+00:00

    Hello @Prajakta

    Did you try any Dataflow/Transformations?

    One solution Which i can suggest is as follows/

    Step1: Use an external Application to read the last cell of the Google sheet, I have used the Azure Function, My ADF pipeline will call the Azure Function to get the Last Cell of the Google Sheet, and then it is passed as a parameter to the DataFlow which will start the Data Copy from Google Sheet to Destination.

    User's image

    I have written my Azure Function in C#, if you need the code snippet, I can provide, or you may go with your choice of Web App language stack to fetch the Google sheet Columns last cell.

    Step2: In the DataFlow, please make sure to add the Global Param called 'paramEndCell'

    User's image

    Make use of the Param in the Dataflow Source in the End Cell.

    $paramEndCell
    User's image

    Go to the Pipeline and add the above Dataflow and add the Parameter from Pipeline Expression, as shown in the below image.

    User's image

    The below response will capture the End Cell Location: such as D4 or D7 or D9, Dynamically

    @activity('Azure Function1').output.Response
    
    

    This is how my Azure function responds with Dynamic cell value:
    User's image

    Your WebHook which uses OAuth REST call to read the GoogleSheet End Cell is also a great idea, which we can use in this scenario!

    I hope this is helpful with your initial query!

    Please let me know if you have further questions and happy to help!

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. damien dada 1 Reputation point
    2023-12-04T19:34:17.9366667+00:00

    Hi, did you manage to resolve the problem?

    Tutuapp

    0 comments No comments

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.