an absolute newbie here trying out Nifi and postgresql on docker compose.
I have a sample CSV file with 4 columns. I want to split this CSV file into two based on whether if it contains a row with null value or not.
Grade ,BreedNm ,Gender ,Price
C++ ,beef_cattle ,Female ,10094
C++ ,milk_cow ,Female ,null
null ,beef_cattle ,Male ,12704
B++ ,milk_cow ,Female ,16942
for example, above table should be split into two tables each containing row 1,4 and 2,3 and save each of them into a Postgresql table.
Below is what I have tried so far.
I was trying to
- split flowfile into 2 and only save rows without null value on left side and with null values on right side.
- Write each of them into a table each named 'valid' and 'invalid'
but I do not know how to split the csv file and save them as a psql table through Nifi.
Can anyone help?
