You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/reference/resource-configs/teradata-configs.md
+91Lines changed: 91 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -413,3 +413,94 @@ These steps collectively ensure that the valid_history strategy effectively mana
413
413
)}}
414
414
```
415
415
See [Collecting Statistics documentation](https://docs.teradata.com/r/76g1CuvvQlYBjb2WPIuk3g/RAyUdGfvREwbO9J0DMNpLw) for more information.
416
+
417
+
## The external tables package
418
+
419
+
The [dbt-external-tables](https://github.com/dbt-labs/dbt-external-tables) package is supported with the dbt-teradata adapter from v1.9.3 onwards. Under the hood, dbt-teradata uses the concept of foreign tables to create tables from external sources. More information can be found in the [Teradata documentation](https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/SQL-Data-Definition-Language-Syntax-and-Examples/Table-Statements/CREATE-FOREIGN-TABLE).
420
+
421
+
You need to add the `dbt-external-tables` package as a dependency:
422
+
423
+
```yaml
424
+
packages:
425
+
- package: dbt-labs/dbt_external_tables
426
+
version: [">=0.9.0", "<1.0.0"]
427
+
```
428
+
429
+
You need to add the dispatch config for the project to pick the overridden macros from the dbt-teradata package:
430
+
431
+
```yaml
432
+
dispatch:
433
+
- macro_namespace: dbt_external_tables
434
+
search_order: ['dbt', 'dbt_external_tables']
435
+
```
436
+
437
+
To define `STOREDAS` and `ROWFORMAT` for external tables, one of the following options can be used:
438
+
- You can use the standard dbt-external-tables config `file_format` and `row_format` respectively.
439
+
- Or you can add it in the `USING` config as mentioned in the [Teradata documentation](https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/SQL-Data-Definition-Language-Syntax-and-Examples/Table-Statements/CREATE-FOREIGN-TABLE/CREATE-FOREIGN-TABLE-Syntax-Elements/USING-Clause).
440
+
441
+
For the external sources, which require authentication, you need to create an authentication object and pass it in `tbl_properties` as `EXTERNAL SECURITY` object. For more information on authentication objects, check out the [Teradata documentation](https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/SQL-Data-Definition-Language-Syntax-and-Examples/Authorization-Statements-for-External-Routines/CREATE-AUTHORIZATION-and-REPLACE-AUTHORIZATION).
442
+
443
+
The following are examples of external sources configured for Teradata:
The dbt-teradata adapter internally creates temporary tables to fetch the metadata of views for manifest and catalog creation. In cases you don't have permission to create tables on the schema you are working on, you can define a fallback_schema (to which you have the proper `create`/`drop` privileges) in the dbt_project.yml as a variable.
0 commit comments