Forum Discussion

CCal's avatar
CCal
Icon for Advocate I rankAdvocate I
2 months ago
Solved

Create table if not exist in Dataflow Gen2 (CI/CD) with lakehouse as destination

Is there no such option in Dataflow where it'll create the table if it doesnt exist and use existing table if it already exist?

 

My scenario is:

I have a dataflow gen2 CI/CD that reads a table from a lakehouse then perform some processing and then write it to a new table in a different lakehouse.

It all works if the source and destination tables already exists.

But once we deploy the dataflow to another workspace with new lakehouses via Deployment Pipeline, the dataflow will give an error, because in the new lakehouse in the new workspace, the table does not exist yet....

  • Hello CCal,
    If it's set to an existing table, that table has to already exist, Dataflow Gen2 won't create it for you. And if it gets deleted down the line, it won't come back on the next refresh either.
    If it's configured as a new table, Dataflow Gen2 creates the table on the first refresh. If that table is later deleted, it's recreated on the next refresh.
    From what I can tell in the docs, there's no built-in setting that says "create it if it's missing, use it if it's already there." So I will start by checking whether your destination is set to New table or Existing table after the deployment.

    Microsoft Learn: Dataflow Gen2 data destinations and managed settings 

4 Replies

  • Hi CCal 

     

    When you originally created the data Flow Gen 2, did it already have the table or did you create the table first? I think that might be the reason why this is happening when you deploy it to a new workspace. If you can, please confirm.

  • Hello CCal,
    If it's set to an existing table, that table has to already exist, Dataflow Gen2 won't create it for you. And if it gets deleted down the line, it won't come back on the next refresh either.
    If it's configured as a new table, Dataflow Gen2 creates the table on the first refresh. If that table is later deleted, it's recreated on the next refresh.
    From what I can tell in the docs, there's no built-in setting that says "create it if it's missing, use it if it's already there." So I will start by checking whether your destination is set to New table or Existing table after the deployment.

    Microsoft Learn: Dataflow Gen2 data destinations and managed settings 

  • v-kathullac's avatar
    v-kathullac
    Icon for Community Support rankCommunity Support

    Thankyou Olufemi7 , GilbertQ    for Addressing the issue.

     

    Hi CCal  ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

     

    Regards,

    Chaithanya

  • v-kathullac's avatar
    v-kathullac
    Icon for Community Support rankCommunity Support

    Thankyou @Olufemi7 , @GilbertQ    for Addressing the issue.

     

    Hi @CCal  ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

     

    Regards,

    Chaithanya