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

dbt docs generate errors when there's a "null" schema #980

Closed
petehanssens opened this issue Sep 6, 2018 · 1 comment
Closed

dbt docs generate errors when there's a "null" schema #980

petehanssens opened this issue Sep 6, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@petehanssens
Copy link

Issue

Issue description

Fivetran inadvertently generated a null schema within our warehouse for google analytics data - this was subsequently fixed but due to laziness, I was yet to remove it.

When running dbt docs generate however this below error was produced.

Results

What happened? What did you expect to happen?

System information

The output of dbt --version:

    from svv_table_info
DEBUG:dbt:SQL status: SELECT in 2.90 seconds
DEBUG:dbt:On get_catalog_data: ROLLBACK
DEBUG:dbt:Flushing usage events
Encountered an error:
INFO:dbt:Encountered an error:
'NoneType' object has no attribute 'lower'
INFO:dbt:'NoneType' object has no attribute 'lower'
DEBUG:dbt:Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/main.py", line 72, in main
    results, succeeded = handle_and_check(args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/main.py", line 117, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/main.py", line 172, in run_from_args
    results = run_from_task(task, proj, parsed)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/main.py", line 180, in run_from_task
    result = task.run()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/task/generate.py", line 217, in run
    results = adapter.get_catalog(profile, self.project.cfg, manifest)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/adapters/default/impl.py", line 838, in get_catalog
    results = table.where(lambda r: r['table_schema'].lower() in schemas)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/agate/table/where.py", line 25, in where
    if test(row):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbt/adapters/default/impl.py", line 838, in <lambda>
    results = table.where(lambda r: r['table_schema'].lower() in schemas)
AttributeError: 'NoneType' object has no attribute 'lower'

The operating system you're running on:

The python version you're using (probably the output of python --version)

Steps to reproduce

In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example models, etc are all very helpful here.

Feature

Feature description

Making dbt docs generate more robust

Who will this benefit?

people who are strange enough to create null schemas or created for them in error by third parties.

@drewbanin drewbanin added this to the 0.11.1 - Lucretia Mott milestone Sep 7, 2018
@drewbanin drewbanin added the bug Something isn't working label Sep 7, 2018
@beckjake beckjake self-assigned this Sep 11, 2018
beckjake added a commit that referenced this issue Sep 11, 2018
@beckjake
Copy link
Contributor

Fixed in #992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants