Hi @Necmi Kilic ,
Welcome to Microsoft Q&A platform and thanks for posting your question here.
As per my understanding, you are trying to transform SQL table into JSON . Please let me know if my understanding is incorrect.
In order to achieve the above requirement, you need to make use of mapping dataflow. Kindly follow the below steps :
- Add SQL dataset to Source transformation in mapping dataflow.
- Use Derived column transformation to create a new column called
data
:array(toString(CustomerId),CustomerName,toString(NumberOfOrders))
- Use another Derived column transformation to update the newly created column by created nested array:
data
:array(data)
- Use select transformation to unselect the source columns
- Use Sink transformation to load the transformed data into JSON file. In the sink settings, provide file name option as 'Output to single file' and provide the filename . Also, set single partition in optimize tab
Please refer to the below video for more details:
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on or upvote 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