Skip to content

Commit

Permalink
Merge pull request #156 from tinybirdco/add-nullable-column-v3
Browse files Browse the repository at this point in the history
Add the new column to a Landing Data Source
  • Loading branch information
Alberto Juan authored Jan 5, 2024
2 parents 303dee0 + 1bfa751 commit 320df4b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ This repository contains all the use cases you can iterate with Versions:
- [Change Kafka Data Source sorting key](change_sorting_key_to_kafka_data_source)
- [Recover data from quarantine](recover_data_from_quarantine) using a copy Pipe
- [Add a new column to a Landing Data Source](add_column_landing_ds)
- [Add a new column to a Landing Data Source using V3](v3/add_column_landing_ds)
- [Add a new column to a Materialized View](add_column_materialized_view)
- [Add a new column to a Materialized View using Releases](v3/add_new_column_to_a_materialized_view_v3)
- [Add a new column to a Materialized View using Releases](v3/add_nullable_column_to_landing_datas_source)
- [Add a new column in a BigQuery Data Source](add_column_BQ_ds)
- [Add a new column to a Snowflake Data Source](add_column_snowflake_ds)
- [Add a new column to an S3 Data Source](add_column_to_s3_ds)
Expand Down
18 changes: 18 additions & 0 deletions v3/add_nullable_column_to_landing_datas_source/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Tinybird Versions - Add Column to a Landing Data Source

> Remember to follow the [instructions](../README.md) to setup your Tinybird Data Project before jumping into the use-case steps
- Just a add the desired column, remember to set it as Nullable.

[Pull Request](https://github.com/tinybirdco/use-case-examples/pull/156/files)

```diff
SCHEMA >
`timestamp` DateTime `json:$.timestamp`,
`session_id` String `json:$.session_id`,
`action` LowCardinality(String) `json:$.action`,
`version` LowCardinality(String) `json:$.version`,
+ `environment` Nullable(String) `json:$.environment`,
`payload` String `json:$.payload`
```

> TODO: Adding not nullable columns is a more delicated action we'll explain in a further example.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SCHEMA >
`session_id` String `json:$.session_id`,
`action` LowCardinality(String) `json:$.action`,
`version` LowCardinality(String) `json:$.version`,
`environment` Nullable(String) `json:$.environment`,
`payload` String `json:$.payload`

ENGINE "MergeTree"
Expand Down

0 comments on commit 320df4b

Please sign in to comment.