Forum Discussion

T_Blanchard's avatar
T_Blanchard
Frequent Visitor
2 years ago
Solved

store data from email attachment

I have already set up a query that looks at my Outlook account, and if a specific email is there, copies the attached file (.xlsx) to a lakehouse. This is the video I followed to set this up:  https://www.youtube.com/watch?v=EKPBiCi98cs 

I get a new file each month, with the same columns, but a different month's data. I don't want to have to keep all of these emails in my inbox. Is there a way to get the data to save to the lakehouse without overwriting previously saved data? 

Please keep in mind that I am new to using Fabric, M/Query Editor, etc., so please simplify instructions! 

 

Thanks 

  • update: I think I have figured out how to do this! 

    I noticed the Data Destination option at the bottom in the Query Settings section of the Data Flow. Upon hovering over it, I noticed that the update method was set to 'Replace.' Clicking the gear icon opened another window where I verified the connection credentials. In the 'Choose Destination Target' section, I opted to create a new table within the same Lakehouse, but with a slightly modified name. On the subsequent screen, I selected 'Append' from the update method options at the top, saved the settings, and published my query.

    Afterwards, I updated the files in my email account and refreshed the data flow. Upon reviewing both tables in the lakehouse, I confirmed the new table displayed data from both the previous and the updated files.

1 Reply

  • T_Blanchard's avatar
    T_Blanchard
    Frequent Visitor

    update: I think I have figured out how to do this! 

    I noticed the Data Destination option at the bottom in the Query Settings section of the Data Flow. Upon hovering over it, I noticed that the update method was set to 'Replace.' Clicking the gear icon opened another window where I verified the connection credentials. In the 'Choose Destination Target' section, I opted to create a new table within the same Lakehouse, but with a slightly modified name. On the subsequent screen, I selected 'Append' from the update method options at the top, saved the settings, and published my query.

    Afterwards, I updated the files in my email account and refreshed the data flow. Upon reviewing both tables in the lakehouse, I confirmed the new table displayed data from both the previous and the updated files.