LOAD DATABASE
FROM mysql://root@localhost/sakila
INTO postgresql://postgres@localhost/teste_pentaho
WITH include drop, create tables, create indexes, reset sequences
SET maintenance_work_mem to '128MB',
work_mem to '12MB',
search_path to 'sakila'
CAST type datetime to timestamptz drop default drop not null using zero-dates-to-null,
type date drop not null drop default using zero-dates-to-null,
-- type tinyint to boolean using tinyint-to-boolean,
type year to integer drop typed
MATERIALIZE VIEWS film_list, staff_list
-- INCLUDING ONLY TABLE NAMES MATCHING ~/film/, 'actor'
-- EXCLUDING TABLE NAMES MATCHING ~<ory>
-- DECODING TABLE NAMES MATCHING ~/messed/, ~/encoding/ AS utf8
BEFORE LOAD DO
$$ create schema if not exists sakila; $$;
this example was taken from http://pgloader.io/howto/pgloader.1.html, but in order to work properly it is needed to add *drop typed* after the type year to integer cast.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.