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

[docs] import and example for external table #415

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion docs/resources/external_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ description: |-




## Example Usage

```terraform
resource snowflake_external_table external_table {
database = "db"
schema = "schema"
name = "external_table"
comment = "External table"

column {
name = "id"
type = "int"
}

column {
name = "data"
type = "text"
}
}
```

## Schema

Expand Down Expand Up @@ -45,4 +64,11 @@ Required:
- **name** (String, Required) Column name
- **type** (String, Required) Column type, e.g. VARIANT

## Import

Import is supported using the following syntax:

```shell
# format is database name | schema name | external table name
terraform import snowflake_external_table.example 'dbName|schemaName|externalTableName'
```
2 changes: 2 additions & 0 deletions examples/resources/snowflake_external_table/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# format is database name | schema name | external table name
terraform import snowflake_external_table.example 'dbName|schemaName|externalTableName'
16 changes: 16 additions & 0 deletions examples/resources/snowflake_external_table/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
resource snowflake_external_table external_table {
database = "db"
schema = "schema"
name = "external_table"
comment = "External table"

column {
name = "id"
type = "int"
}

column {
name = "data"
type = "text"
}
}