pgloader
pgloader copied to clipboard
An unhandled error condition has been signalled: At end of input
Hi Dimitri,
I am new to this pgloader, I have successfully tested the migration of mysql to postgresql with some of the examples presented. Similiarly, I am testing out the mssql to postgresql migration following the approach. I have the mssql 2016 on windows and postgres on centos. I have installed the mssql client on centos and able to connect to mssql via the client without any issues. with respect to the pgloader, I am following the below but I am getting below issues:
Case 1:
cat pg.load.mssql
load database
from mssql://sa:pwd@
Case 2:
cat pg.load.mssql
load database
from mssql://sa:pwd@
AFTER LOAD DO $$ ALTER SCHEMA 'dbo' RENAME TO 'mssqlpg'; $$
Errors:
KABOOM! 2021-08-03T15:16:07.009000-05:00 LOG pgloader version "3.6.3047c9a" FATAL error: At end of input
^ (Line 10, Column 0, Position 223)
In context COMMAND:
While parsing COMMAND. Expected:
the character Tab
or the character Newline or the character Return or the character Space or the character , (COMMA) or the string "--" or the string "/*" or the character ; (SEMICOLON) or the string "after" or the string "alter" or the string "before" or the string "cast" or the string "distribute" or the string "do" or the string "excluding" or the string "execute" or the string "including" or the string "materialize" or the string "set" or the string "with" An unhandled error condition has been signalled: At end of input
^ (Line 10, Column 0, Position 223)
In context COMMAND:
While parsing COMMAND. Expected:
the character Tab
or the character Newline or the character Return or the character Space or the character , (COMMA) or the string "--" or the string "/*" or the character ; (SEMICOLON) or the string "after" or the string "alter" or the string "before" or the string "cast" or the string "distribute" or the string "do" or the string "excluding" or the string "execute" or the string "including" or the string "materialize" or the string "set" or the string "with"
What I am doing here?
At end of input
^ (Line 10, Column 0, Position 223)
In context COMMAND:
While parsing COMMAND. Expected:
the character Tab
or the character Newline or the character Return or the character Space or the character , (COMMA) or the string "--" or the string "/*" or the character ; (SEMICOLON) or the string "after" or the string "alter" or the string "before" or the string "cast" or the string "distribute" or the string "do" or the string "excluding" or the string "execute" or the string "including" or the string "materialize" or the string "set" or the string "with"
[postgres@localhost pgloader]$
And if I am trying to place semicolon based on the errors in the syntax as below at the end , I am getting the below issue:
" AFTER LOAD DO $$ ALTER SCHEMA 'dbo' RENAME TO 'mssqlpg'; $$ ; "
Error "2021-08-03T15:10:21.020000-05:00 LOG pgloader version "3.6.3047c9a" KABOOM! FATAL error: Undefined alien: "SSLeay" An unhandled error condition has been signalled: Undefined alien: "SSLeay"
What I am doing here?
Undefined alien: "SSLeay" "
Not sure what exactly going on here.. can you please suggest with the right syntax for this . I have reviewed some of the casting rules posted present in the below page , but I am facing the above issues determined. would be helpful if you can share the pgloader commands for MSSQL to PostgreSQL migration.
https://pgloader.readthedocs.io/en/latest/ref/mssql.html#ms-sql-schema-transformations
Thanks for your support on this.
Also adding to this , I have the freeTDS file defined as below placed in the same location where load file is present:
cat .freetds.conf [global] tds version = 7.4 client charset = UTF-8
FYI.. on the pgloader version:
[postgres@localhost pgloader]$ pgloader --version pgloader version "3.6.3047c9a" compiled with SBCL 1.4.0-1.el7 [postgres@localhost pgloader]$
I am having a similar issue migrating from mssql Turned out to be #846 (need a semicolon at the end of the file)
I have the freeTDS file defined as below placed in the same location where load file is present
I think it needs to go in the home directory. See the freetds docs.