# dbt run command fails

**URL:** <https://discourse.getdbt.com/t/dbt-run-command-fails/6853>\
**Category:** Help\
**Tags:** dbt-cloud\
**Created:** [February 18, 2023, 7:19am UTC](https://discourse.getdbt.com/t/dbt-run-command-fails/6853 "2023-02-18T07:19:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![david1](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/david1/32/1892_2.png) [@david1](https://discourse.getdbt.com/u/david1)\
**Post date:** [February 18, 2023, 7:19am UTC](https://discourse.getdbt.com/t/dbt-run-command-fails/6853/1 "2023-02-18T07:19:06Z")

</div>

## The problem I’m having

dbt run command fails

## The context of why I’m trying to do this

I’m learning dbt with BigQuery connection and following the tutorial

## What I’ve already tried

copying the data table ID from BiqQuery into the dbl query:

my\_firstdbt\_model\_sql:  
`select * from `woofstr-7a206.datasetOne.tableone` limit 1000`

my\_second\_dbt\_model\_sql:  
`-- Use the `ref` function to select from other models

select \*  
from {{ ref(‘woofstr-7a206.datasetOne.tableone’) }}  
where id = 1`

## Some example code or error messages

`07:13:33 Began running node model.my\_new\_project.my\_second\_dbt\_model  
07:13:33 2 of 2 START sql view model dbt\_drhodes.my\_second\_dbt\_model … [RUN]  
07:13:33 Acquiring new bigquery connection ‘model.my\_new\_project.my\_second\_dbt\_model’  
07:13:33 Began compiling node model.my\_new\_project.my\_second\_dbt\_model  
07:13:33 Writing injected SQL for node “model.my\_new\_project.my\_second\_dbt\_model”  
07:13:33 Timing info for model.my\_new\_project.my\_second\_dbt\_model (compile): 2023-02-18 07:13:33.031174 =\> 2023-02-18 07:13:33.044240  
07:13:33 Began executing node model.my\_new\_project.my\_second\_dbt\_model  
07:13:33 Writing runtime sql for node “model.my\_new\_project.my\_second\_dbt\_model”  
07:13:33 Opening a new connection, currently in state init  
07:13:33 On model.my\_new\_project.my\_second\_dbt\_model: /\* {“app”: “dbt”, “dbt\_version”: “1.4.1”, “profile\_name”: “user”, “target\_name”: “default”, “node\_id”: “model.my\_new\_project.my\_second\_dbt\_model”} \*/

create or replace view `woofstr-7a206`.`dbt_drhodes`.`my_second_dbt_model`  
OPTIONS()  
as – Use the `ref` function to select from other models

select \*  
from `woofstr-7a206`.`dbt_drhodes`.`my_first_dbt_model`  
where id = 1;

07:13:33 BigQuery adapter: Retry attempt 1 of 1 after error: BadRequest(‘Unrecognized name: id at [10:7]’)  
07:13:35 BigQuery adapter: [https://console.cloud.google.com/bigquery?project=woofstr-7a206&j=bq:US:1f2e02c4-6540-43b2-9bf0-1cae9995eab1&page=queryresults](https://console.cloud.google.com/bigquery?project=woofstr-7a206&j=bq:US:1f2e02c4-6540-43b2-9bf0-1cae9995eab1&page=queryresults)  
07:13:35 Timing info for model.my\_new\_project.my\_second\_dbt\_model (execute): 2023-02-18 07:13:33.044667 =\> 2023-02-18 07:13:35.166480  
07:13:35 Database Error in model my\_second\_dbt\_model (models/example/my\_second\_dbt\_model.sql)  
Unrecognized name: id at [10:7]  
compiled Code at target/run/my\_new\_project/models/example/my\_second\_dbt\_model.sql  
07:13:35 Sending event: {‘category’: ‘dbt’, ‘action’: ‘run\_model’, ‘label’: ‘f7527181-a24f-4b70-b5ac-eae91acc03a8’, ‘context’: [\<snowplow\_tracker.self\_describing\_json.SelfDescribingJson object at 0x7f3afe94fb50\>]}  
07:13:35 2 of 2 ERROR creating sql view model dbt\_drhodes.my\_second\_dbt\_model … [ERROR in 2.14s]  
07:13:35 Finished running node model.my\_new\_project.my\_second\_dbt\_model`  
Put code inside backticks  
to preserve indentation  
which is especially important  
for Python and YAML!

```auto

```
