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

Add more debug information to dbt seed #448

Closed
pedromachados opened this issue May 26, 2017 · 3 comments
Closed

Add more debug information to dbt seed #448

pedromachados opened this issue May 26, 2017 · 3 comments
Assignees
Milestone

Comments

@pedromachados
Copy link

I am getting an error while and it would be nice to know which line/column is causing it. All I get now is this:


Creating table dbt_pedro.abc_revenue_data
Inserting 36783 records into table dbt_pedro.abc_revenue_data
Traceback (most recent call last):
  File "/home/ec2-user/miniconda3/envs/abc35/bin/dbt", line 11, in <module>
    sys.exit(main())
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/main.py", line 29, in main
    handle(args)
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/main.py", line 47, in handle
    res = run_from_args(parsed)
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/main.py", line 101, in run_from_args
    result = task.run()
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/task/seed.py", line 12, in run
    seeder.seed(self.args.drop_existing)
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/seeder.py", line 134, in seed
    self.do_seed(schema, cursor, drop_existing)
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/seeder.py", line 104, in do_seed
    cursor, schema, table_name, virtual_table
  File "/home/ec2-user/miniconda3/envs/abc35/lib/python3.5/site-packages/dbt/seeder.py", line 68, in insert_into_table
    cursor.execute(insert_sql)
psycopg2.DataError: value too long for type character varying(65)

@drewbanin
Copy link
Contributor

@pedromachados this is a little tough, as Redshift doesn't tell us which record in the CSV causes this error. I think that in this particular case, you can run dbt seed --drop-existing to destroy and recreate the table. That should help mitigate this particular problem.

Overall though, agreed: dbt's seed functionality needs some more polish

@drewbanin drewbanin added this to the CSVs milestone May 27, 2017
@drewbanin drewbanin self-assigned this May 27, 2017
@pedromachados
Copy link
Author

pedromachados commented May 29, 2017 via email

@jthandy
Copy link
Member

jthandy commented Oct 12, 2017

Hey @pedromachados -- this is a totally reasonable request, especially since with our most recent release users can now specify schemas for all models. I made an issue for this here:

#561

Closing this.

@jthandy jthandy closed this as completed Oct 12, 2017
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

3 participants