Import Issue!

The data I imported did not appear in the table, even though the notification said the import was successful. In the barang table, I have a column that is a relation to another table — specifically, the lokasi_barang column is a foreign key to the ruangan table.
No description
15 Replies
toeknee
toeknee5d ago
You are trying to import a string into the column simanis_bmn
pitrah
pitrahOP5d ago
that lokasi_barang column is int, and that column has a relationship with another table called Ruangan, and column lokasi_barang needs the id from table Ruangan to take the of the Ruangan do you need to see the code?
toeknee
toeknee5d ago
The column is an int but look at the message, you are importing 'CNAP' into it which will be in the map
pitrah
pitrahOP5d ago
i have tried change the data in csv using number, but still didn't work
toeknee
toeknee5d ago
restart your quue worker if making cod chsnged
pitrah
pitrahOP5d ago
i've changed the queue_connection equal sync
No description
pitrah
pitrahOP5d ago
is it correct if i want to take the data "CNAP" into integer column?
No description
pitrah
pitrahOP5d ago
[2025-04-15 07:50:38] local.INFO: Mulai proses import {"Kode barang":"MJ002","Nama barang":"Meja Lipat","Masa manfaat":"5","Satuan":"Unit","Kondisi barang":"baik","kode_barang":"MJ002","nama_barang":"Meja Lipat","masa_manfaat":5.0,"satuan":"Unit","kondisi_barang":"baik","lokasi_barang":"baik"} [2025-04-15 07:50:38] local.WARNING: Ruangan tidak ditemukan: baik
[2025-04-15 07:50:38] local.INFO: Mulai proses import {"Kode barang":"LM003","Nama barang":"Lemari ","Masa manfaat":"5","Satuan":"Unit","Kondisi barang":"baik","kode_barang":"LM003","nama_barang":"Lemari","masa_manfaat":5.0,"satuan":"Unit","kondisi_barang":"baik","lokasi_barang":"baik"} [2025-04-15 07:50:38] local.WARNING: Ruangan tidak ditemukan: baik
[2025-04-15 07:52:07] local.INFO: Mulai proses import {"Kode barang":"MJ002","Nama barang":"Meja Lipat","Masa manfaat":"5","Satuan":"Unit","Kondisi barang":"baik","Ruangan":"3","kode_barang":"MJ002","nama_barang":"Meja Lipat","masa_manfaat":5.0,"satuan":"Unit","kondisi_barang":"baik","lokasi_barang":"3"} [2025-04-15 07:52:07] local.WARNING: Ruangan tidak ditemukan: 3
[2025-04-15 07:52:07] local.INFO: Mulai proses import {"Kode barang":"LM003","Nama barang":"Lemari ","Masa manfaat":"5","Satuan":"Unit","Kondisi barang":"baik","Ruangan":"2","kode_barang":"LM003","nama_barang":"Lemari","masa_manfaat":5.0,"satuan":"Unit","kondisi_barang":"baik","lokasi_barang":"2"} [2025-04-15 07:52:07] local.WARNING: Ruangan tidak ditemukan: 2 this is the log, it say Ruangan not found it already work sir thank you so much
pitrah
pitrahOP5d ago
i just comment this sintaks
No description
pitrah
pitrahOP5d ago
what about this error, i don't understand i tried to import string into integer column because it hard if must use id in the csv file
No description
toeknee
toeknee5d ago
Try using AI to explain the errors if unsure, but it's saying a child row with the key doens't exist.
pitrah
pitrahOP5d ago
hmm i don't know, i have tried using AI and it still dosen't work what if i changed the column to string?
toeknee
toeknee5d ago
no, do you understand what the forigen key is? And how the forigen key is needed to link the records?
pitrah
pitrahOP5d ago
yeah i know, but i don't what to do i've tried many solution but still didn't work
pitrah
pitrahOP5d ago
maybe you can see my project

Did you find this page helpful?