Azure / Azure/Azure-DataFactory
ADF mapping data flow postgres error column is of type jsonb
- Lingua principale
- PowerShell
- Stelle
- 529
- Fork
- 623
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la riproduzione del Azure Mapping data flow descritta qui e confronta la gestione dei valori null da parte di JSONB di PostgreSQL con il report di Stack Overflow collegato. Il lavoro è completato quando un valore sorgente null viene copiato correttamente in una colonna JSONB di PostgreSQL senza il workaround derived-column e post-copy-script.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, postgresql
- Ambito
- cloud, databases
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100