Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy task fails for tables with json columns #198

Open
tonbadal opened this issue Jul 30, 2022 · 0 comments
Open

Copy task fails for tables with json columns #198

tonbadal opened this issue Jul 30, 2022 · 0 comments

Comments

@tonbadal
Copy link

tonbadal commented Jul 30, 2022

I'm running a copy task with a table users that contains a metadata column with type json.

tasks:
  copy_users:  
    type: copy
    source:
      db: input_db
      table: users
    destination:
      db: output_db
      table: users

And when running the pipeline I get the following error:

INFO|Run Steps: Prepare Load, Load Data, Move Table
INFO|[1/3]  Executing Prepare Load
INFO|[1/3]  Prepare Load (97.8ms)
INFO|[2/3]  Executing Load Data
ERROR|Failed (2s) invalid input syntax for type json
DETAIL:  Token "'" is invalid.
CONTEXT:  JSON data, line 1: {'...
COPY sayn_tmp_users, line 10, column metadata: "{'title': 'Engineer'}"

I've successfully copied other tables that don't have json columns.

Both input and output databases are PostgreSQL, runnning in Python 3.9.13, SAYN version 0.6.5.

Many thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant