dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.46k stars 548 forks source link

An unhandled error condition has been signalled: "Including only table names" and "materialize views" #848

Closed tonysepia closed 5 years ago

tonysepia commented 6 years ago
load database
        from mssql://sa@192.168.0.10/DB
        into postgresql://localhost/db

including only table names like 'includeNoTables' in schema 'dbo'

materialize views vIdentifiers as $$ SELECT TOP 10 ID, ID2, ID3 FROM ASSET; $$;
KABOOM!
FATAL error: At

  including only table names like 'includeNoTables' in schema 'dbo'

                                                                   ^ (Line 5, Column 65, Position 163)

In context COMMAND:

While parsing COMMAND. Expected:

     the character Tab
  or the character Newline
  or the character Return
  or the character Space
  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 "excluding"
  or the string "including"
  or the string "set"
  or the string "with"
An unhandled error condition has been signalled: At

  including only table names like 'includeNoTables' in schema 'dbo'

                                                                   ^ (Line 5, Column 65, Position 163)

In context COMMAND:

While parsing COMMAND. Expected:

     the character Tab
  or the character Newline
  or the character Return
  or the character Space
  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 "excluding"
  or the string "including"
  or the string "set"
  or the string "with"

What I am doing here?

At

  including only table names like 'includeNoTables' in schema 'dbo'

                                                                   ^ (Line 5, Column 65, Position 163)

In context COMMAND:

While parsing COMMAND. Expected:

     the character Tab
  or the character Newline
  or the character Return
  or the character Space
  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 "excluding"
  or the string "including"
  or the string "set"
  or the string "with"
dimitri commented 6 years ago

pgloader currently doesn't support materialised views for MS SQL. See https://github.com/dimitri/pgloader/issues/817 for another example of the same issue. Can you give me access to a test database?

tonysepia commented 6 years ago

Sure, I have created an AWS instance for you. Details will come in a private message

tonysepia commented 6 years ago

@dimitri just to ensure that I've sent the details to the right email, did you get my message? Thank you

dimitri commented 6 years ago

Hi @tonysepia ; I confirm that I did receive your email indeed. I was traveling and didn't have time to try your test case yet, will do soon now. Thanks!

dimitri commented 5 years ago

I believe https://github.com/dimitri/pgloader/commit/c019c16113503e94a332a0c37aea46bc977e88e3 should fix this issue.

tonysepia commented 5 years ago

Thank you, Dimitry!