question

arkiboys avatar image
1 Vote"
arkiboys asked DennisBC-2764 edited

serverless sql pool upsert

Hi,
I am using serverless sql pool in synapse workspace.
step1-
I am storing the data into .parquet files.
To read the parquet files I use the openrowset sql query in a view, i.e. view1.
Question:
step 2-
Is it possible to create a view, i.e. view2 which does upsert in view1?
If not, do I need to create dataflow for this operation? i.e. source being the parquet file and destination to be upsert on the parquet?

Thank you

azure-synapse-analytics
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered

Hello @arkiboys ,
Thanks for the ask and using Microsoft Q&A platform .
View are just a metadata on the underlying records and so it is always a SELECT statement . In sort you cannot update records using views , if your intend is to perform a UPSERT , you will have to make the changes on the underlying datasource .


Please do let me know how it goes .
Thanks
Himanshu


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DennisBC-2764 avatar image
0 Votes"
DennisBC-2764 answered DennisBC-2764 edited

Is it something like this:

Via a synapse integration pipeline, you have made a directory with parquet files from a full copy of a table, and now you would like the changes in the table, to be reflected in the parquet files as well (without full loading the table again and again)?

Have you considered doing a delta load to a separate directory, and then union and deduplicate the datasets in your view?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.