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

Occurs an error when run dbt docs generate #68

Open
narrowizard opened this issue Feb 2, 2022 · 1 comment
Open

Occurs an error when run dbt docs generate #68

narrowizard opened this issue Feb 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@narrowizard
Copy link

Describe the bug

It occurs an error when running dbt docs generate. But dbt docs serve works fine.

Steps To Reproduce

# models/schema.yml
version: 2
sources:
- name: lake
  tables:
  - name: ae_commits
    description: ""
    columns:
    - name: hex_sha
      data_type: varchar(191)
      description: ""
      extra: ""
      quote: false
      tests: []
      tags: []
      meta: {}
    - name: analysis_id
      data_type: varchar
      description: ""
      extra: ""
      quote: false
      tests: []
      tags: []
      meta: {}
    - name: author_email
      data_type: varchar
      description: ""
      extra: ""
      quote: false
      tests: []
      tags: []
      meta: {}
    - name: dev_eq
      data_type: bigint
      description: ""
      extra: ""
      quote: false
      tests: []
      tags: []
      meta: {}
    - name: ae_project_id
      data_type: bigint
      description: ""
      extra: ""
      quote: false
      tests: []
      tags: []
      meta: {}

Expected behavior

It should generate docs without errors.

Screenshots and log output

$ dbt docs generate
08:21:23  Running with dbt=1.0.1
08:21:23  Found 1 model, 0 tests, 0 snapshots, 0 analyses, 166 macros, 0 operations, 0 seed files, 72 sources, 0 exposures, 0 metrics
08:21:23  
08:21:23  Concurrency: 1 threads (target='dev')
08:21:23  
08:21:23  Done.
08:21:23  Building catalog
08:21:23  Encountered an error while generating catalog: 'MySQLColumn' object has no attribute 'to_dict'
08:21:23  dbt encountered 1 failure while writing the catalog
08:21:23  Catalog written to /home/cong.wang/code/dbt/dbt/project/lake/target/catalog.json

The output of dbt --version:

$ dbt --version
installed version: 1.0.1
   latest version: 1.0.1

Up to date!

Plugins:
  - mysql5: 0.19.0
  - mysql: 0.19.0
  - postgres: 1.0.1
  - trino: 1.0.1

The operating system you're using:

$ cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

The output of python --version:


$ python --version
Python 3.7.11

Additional context

# profiles.yml
lake:
  target: dev
  outputs:
    dev:
      type: mysql
      server: **
      port: ** # optional
      database: lake
      charset: utf8mb4
      schema: lake
      username: ***
      password: ***
      driver: MySQL ODBC 8.0 ANSI Driver
    prod:
      type: mysql
      server: [server/host]
      port: [port]  # optional
      schema: [schema]
      username: [username]
      password: [password]
      driver: MySQL ODBC 8.0 ANSI Driver
@narrowizard narrowizard added the bug Something isn't working label Feb 2, 2022
@GuillaumeHarel
Copy link

GuillaumeHarel commented Mar 20, 2024

@narrowizard Hello, did you find any solution to your issue ? I am currently facing the same issue using mysql-dbt 1.1.0 for MySQL 5.7.

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

2 participants