Azure / Azure/Azure-DataFactory
ADF mapping data flow postgres error column is of type jsonb
- Dominant language
- PowerShell
- Stars
- 529
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
**Azure Mapping dataflow**
**Describe the bug**
I tried to insert the null value into Jsonb column in PostgreSQL database table through mapping dataflow I got the error mentioned in my [SO thread](https://stackoverflow.com/questions/77333797/adf-mapping-data-flow-postgres-error-column-is-of-type-jsonb)
**To Reproduce**
When I tried to copy data from a Postgres SQL table with null values in the name column to another table using mapped data flow, I got the same error as shown below:

This may be a bug in data flow. I have tried the following workaround:
I added a derived transformation to the source and modified the column with null values using the expression below:
iif(isNull(), '{"value": null}', )

Data preview of the derived column transformation:

I added the following script as a post-copy script to the sink in the sink settings tab:
update set name = NULL where = '{
"value": null
}'

When I ran the data flow activity with the reference of the data flow below, the table data copied successfully as shown:

But when inserting null value into Jsonb type column in PostgreSQL database table with `insert into ` sql script it is working well.It might be a bug.
Contributor guide
Assessment
This issue has not been assessed yet.