I need to export csv file to jason using script component. can anyone guide me how to do it.
I haven't do this trasaction so less knowledge of C# component. I cannot use T-SQL (JSON AUTO) also to convert the file to jason.
getting err
[Execute Process Task] Error: In Executing "PowerShell.exe" "import-csv "C:\New folder\convertcsv.csv" | ConvertTo-Json -Compress | Add-Content -Path "C:\New folder\output.json"" at "", The process exit code was "1" while the expected was "0".
Actually I am trying to build package that convert csv to json. and for that I need test file that's reason I am manually converting json file to csv first.. and to validate also..
how did you try to convert that file from json to csv? what tool did yo use? anyways the result you are looking at are actually correct. look at your csv no column names.
It shows how to convert a CSV file to JSON and is fairly simple. The Powershell code is also quite simple but I would call it differently. It is actually easier to call Powershell from a script component...you can do something like this: