我在centos 6.5上使用yum install安装了pgloader。我无法获取pgloader来加载以下文件。我在shell上的命令是pgloader mysql.load
LOAD DATABASE
from mysql://root:pass123@127.0.0.1:7777/demomysql
into postgresql://postgres:postgres@127.0.0.1:5432/dbname?demopsql
WITH include drop, create tables, no truncate,
create indexes, reset sequences, foreign keys
SET maintenance_work_mem to '128MB', work_mem to '12MB', search_path to 'demopsql'
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
-- MATERIALIZE VIEWS film_list, staff_list
-- INCLUDING ONLY TABLE NAMES MATCHING ~/film/, 'actor'
-- EXCLUDING TABLE NAMES MATCHING ~<ory>
BEFORE LOAD DO
$$ create schema if not exists demopsql; $$;
我得到以下日志文件
pgloader INFO Logger initialized
pgloader WARNING path entry '/usr/share/python-support/pgloader/reformat' does not exists, ignored
pgloader INFO Reformat path is []
pgloader INFO Will consider following sections:
pgloader INFO
pgloader INFO All threads are started, wait for them to terminate
答案 0 :(得分:0)
警告是由于错误造成的。
在/usr/share/pyshared/pgloader/options.py中搜索变量 DEFAULT_REFORMAT_PATH
替换
指定的路径的/ usr /共享/ pyshared /格式化。
你的文件也有错误:dbname?demopsql应该是demopsql