F
Filament7mo ago
kunli0

Import Action Problems

Hello everyone. I'm attempting to utilize the built in Import Actions on a Table, however having some difficultly understand the Job batches. I have ran php artisan queue:batches-table as well as the migration for filament and migrated them to the database. I have the job_batches table and the imports table as well as queue_monitors and fail_import_rows tables. My queue in my config .env is set to database. I am successfully able to select the columns from the .csv file and match them accordingly to the model columns. I'm using the included job class ImportCsv. Upon clicking import, I receive entries in both the job batches table and the imports. This is where I'm stuck. I feel like I'm missing something simple. Generally with queues in the past I simply run php artisan queue:work from the cli to process the jobs. At first I was thinking the batches would run on a different queue other than the "default". I've tried every queue name including batching, but the jobs appear to not even be processing. In the imports table the job is stuck at 0 for processed_rows and successful rows and there are no entries in the failed_import_rows table. What am I missing?
Solution:
After some troubleshooting of eliminating columns from the getColumns array, there was a particular column that was a string in the .csv however the rule required it to be a integer. After removing the column the batch started to process normally. Not sure why that would stop the entire processing, but somehow it did.
Jump to solution
1 Reply
Solution
kunli0
kunli07mo ago
After some troubleshooting of eliminating columns from the getColumns array, there was a particular column that was a string in the .csv however the rule required it to be a integer. After removing the column the batch started to process normally. Not sure why that would stop the entire processing, but somehow it did.