Reputation: 1
Loading csv file in pgloader using load file and I want to skip rows based on column condition for example if specific column value is null then i want to skip that row
Not able to get the approach how to do that in pgloader please help me thankyou in advance.
Upvotes: -1
Views: 143
Reputation: 1
You need to add materialize view and it will be migrated to postgres. Demo script is as follows:
LOAD DATABASE FROM mysql://root:admin@localhost/test_db INTO postgresql://postgres:admin@localhost:5428/test_db
WITH include drop, create tables, create indexes, reset sequences, foreign keys
SET maintenance_work_mem to '128MB', work_mem to '12MB', search_path to 'public'
CAST type datetime to timestamptz using zero-dates-to-null, type date drop default drop not null using zero-dates-to-null
MATERIALIZE VIEWS filtered_peoples
BEFORE LOAD DO $$ CREATE SCHEMA IF NOT EXISTS public; $$;
Upvotes: -1