dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.96k stars 1.63k forks source link

Jenkins Can't find dbt after installation #1940

Closed rsslereta closed 4 years ago

rsslereta commented 4 years ago

Hi @drewbanin, this is related to issue #1104, running into the same issue trying to run DBT on Jenkins running centos7... looks like it installed the following packages in the Python site-packages folder

drwxrwxr-x. 3 cloudbees-jenkins-distribution cloudbees-jenkins-distribution 22 Nov 19 19:36 dbt-0.15.0rc2-py3.7.egg drwxrwxr-x. 4 cloudbees-jenkins-distribution cloudbees-jenkins-distribution 33 Nov 19 19:36 dbt_bigquery-0.15.0rc2-py3.7.egg drwxrwxr-x. 4 cloudbees-jenkins-distribution cloudbees-jenkins-distribution 33 Nov 19 19:36 dbt_core-0.15.0rc2-py3.7.egg drwxrwxr-x. 4 cloudbees-jenkins-distribution cloudbees-jenkins-distribution 33 Nov 19 19:36 dbt_postgres-0.15.0rc2-py3.7.egg drwxrwxr-x. 4 cloudbees-jenkins-distribution cloudbees-jenkins-distribution 33 Nov 19 19:36 dbt_redshift-0.15.0rc2-py3.7.egg drwxrwxr-x. 4 cloudbees-jenkins-distribution cloudbees-jenkins-distribution 33 Nov 19 19:36 dbt_snowflake-0.15.0rc2-py3.7.egg

it installed a whole bunch of .egg files but I do not see DBT in the folder

Name: dbt Version: 0.15.0rc2 Summary: With dbt, data analysts and engineers can build analytics the way engineers build applications. Home-page: https://github.com/fishtown-analytics/dbt Author: Fishtown Analytics Author-email: info@fishtownanalytics.com License: UNKNOWN Location: /home/cloudbees-jenkins-distribution/jenkins/workspace/ineering_rss_datapipeline_master/.pyenv-home-cloudbees-jenkins-distribution-jenkins-tools-com.cloudbees.jenkins.plugins.customtools.CustomTool-python-3.7.5-bin-python3.7/lib/python3.7/site-packages/dbt-0.15.0rc2-py3.7.egg Requires: dbt-core, dbt-postgres, dbt-redshift, dbt-snowflake, dbt-bigquery



**The operating system you're using:**
Jenkins on Centos7
drewbanin commented 4 years ago

hey @rsslereta - sorry to hear you're having trouble getting dbt installed on jenkins. Was this a fresh install, or were you upgrading from a previous version? If it's the latter, it might be worth trying

pip install -I dbt

I don't totally understand the log output you shared above - what is dbt-0.15.0rc2-py3.7 here? dbt should be installed via pip as an executable called dbt -- where is the dbt-0.15.0rc2-py3.7 coming from?

rsslereta commented 4 years ago

Hi @drewbanin... I figured it out, the path to the dbt executable was not set correctly. As soon as I fixed that issue it worked perfectly. I did a "which dbt" and that gave me the path to where the executable was located. Thank you for the follow up.

drewbanin commented 4 years ago

great, glad to hear you got it working :)

SathishJindam commented 3 years ago

Hi @drewbanin... I figured it out, the path to the dbt executable was not set correctly. As soon as I fixed that issue it worked perfectly. I did a "which dbt" and that gave me the path to where the executable was located. Thank you for the follow up.

hi @rsslereta can you share how to set the path correctly iam facing same issue. Thanks