Closed Elvie-JackRockett closed 1 year ago
Hi @Elvie-JackRockett thanks for raising this ticket! To get metrics to render, you'll need to add the dbt metrics package to your packages.yml. See our readme for more info. Let me know if that solves it!
Thanks for the speedy reply @fivetran-reneeli I've added that in now (odd as it worked fine without this package before!)
Unfortunately its having an issue with the version:
**Runtime Error Failed to read package: Runtime Error This version of dbt is not supported with the 'metrics' package. Installed version of dbt: =1.0.8 Required version of dbt for 'metrics': ['>=1.4.0-a1', '<1.5.0'] Check for a different version of the 'metrics' package, or run dbt again with --no-version-check
Error encountered in /usr/src/develop/user-80335/environment-113802/repository-90021/dbt_packages/metrics/dbt_project.yml
Error encountered in /usr/src/develop/user-80335/environment-113802/repository-90021/dbt_packages/metrics**
I use the version required as per that error message and still nothing
OK @fivetran-reneeli I resolved following your guidsance and updating my IDE to DBT core 1.3 Thank you!
No problem! Thanks for the updates!
Is there an existing issue for this?
Describe the issue
DBT unable to compile project due to below error,
Server error: RPC server failed to compile project, call the "status" method for compile status: Compilation Error Could not render {{ metric('spend') }} / {{ metric('clicks') }}: 'metric' is undefined
Running DBT cloud Packages versions:
Relevant error log or model output
Expected behavior
expecting project to compile and allow for editing within DBT cloud IDE
dbt Project configurations
`
Name your project! Project names should contain only lowercase characters
and underscores. A good package name should reflect your organization's
name or the intended use of these models
name: 'elvie_bi' version: '1.0.0' config-version: 2
This setting configures which "profile" dbt uses for this project.
profile: 'default'
These configurations specify where dbt should look for different types of files.
The
source-paths
config, for example, states that models in this project can befound in the "models/" directory. You probably won't need to change these!
model-paths: ["models"] analysis-paths: ["analyses"] test-paths: ["tests"] seed-paths: ["seeds"] macro-paths: ["macros"] snapshot-paths: ["snapshots"]
target-path: "target_{{ env_var('HOSTNAME') }}" # directory which will store compiled SQL files clean-targets: # directories to be removed by
dbt clean
Configuring models
Full documentation: https://docs.getdbt.com/docs/configuring-models
In this example config, we tell dbt to build all models in the example/ directory
as tables. These settings can be overridden in the individual model files
using the
{{ config(...) }}
macro.models:
elvie_bi:
netsuite: +schema: reporting_trading netsuite_source: +schema: stg_netsuite
ad_reporting: +schema: reporting_marketing
facebook_ads: +schema: stg_facebook_ads facebook_ads_source: +schema: stg_facebook_ads facebook_ads_creative_history: +schema: stg_facebook_ads
google_ads: +schema: stg_google_ads google_ads_source: +schema: stg_google_ads
fivetran_log: +schema: reporting_bi # leave blank for just the target_schema
ADS MODELS
disable both pinterest models if not using pinterest ads
pinterest:
enabled: false
pinterest_source:
enabled: false
disable both microsoft ads models if not using microsoft ads
microsoft_ads:
enabled: false
microsoft_ads_source:
enabled: false
disable both linkedin ads models if not using linkedin ads
linkedin:
enabled: false
linkedin_source:
enabled: false
disable both twitter ads models if not using twitter ads
twitter_ads:
enabled: false
twitter_ads_source:
enabled: false
disable both snapchat ads models if not using snapchat ads
snapchat_ads:
enabled: false
snapchat_ads_source:
enabled: false
disable both tiktok ads models if not using tiktok ads
tiktok_ads:
enabled: false
tiktok_ads_source:
enabled: false
vars: netsuite_data_model: netsuite2 #netsuite by default netsuite_schema: raw_netsuite
netsuite_source:
netsuite_database: your_database_name
netsuite_schema: src_netsuite
netsuite_schema: netsuite_suiteanalytics
ADS MODEL
ad_reportingapple_search_ads_enabled: False ad_reportingpinterest_ads_enabled: False ad_reportingmicrosoft_ads_enabled: False ad_reporting__linkedin_ads_enabled: False ad_reportingtwitter_ads_enabled: False ad_reporting__snapchat_ads_enabled: False ad_reporting__tiktok_ads_enabled: False
facebook_ads_schema: raw_facebook_ads
google_ads_schema: raw_google_ads
Fivetran Log DBT MODEL
fivetran_log_schema: raw_fivetran_log
fivetran_log_using_transformations: false # this will disable all transformation + trigger_table logic fivetran_log_using_triggers: false # this will disable only trigger_table logic
fivetran_log_using_account_membership: false # this will disable only the account membership logic
fivetran_log_using_destination_membership: false # this will disable only the destination membership logic
fivetran_log_using_user: false # this will disable only the user logic
fivetran_log_using_sync_alert_messages: false # this will disable only the sync alert messages within the connector status model`
Package versions
packages:
package: fivetran/netsuite version: 0.6.0
package: fivetran/ad_reporting version: [">=1.0.0", "<1.1.0"]
package: fivetran/fivetran_log version: 0.6.3
What database are you using dbt with?
bigquery
dbt Version
Unable to perform this request as project cannot compile
Additional Context
No response
Are you willing to open a PR to help address this issue?