Skip to content

Commit

Permalink
Add views for enrichment tables. (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samrose-Ahmed committed Apr 6, 2023
1 parent b496f6d commit e059791
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion infra/lib/iceberg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class MatanoIcebergTable extends Construct {
constructor(scope: Construct, id: string, props: MatanoIcebergTableProps) {
super(scope, id);

const tableProperties = {
const tableProperties: Record<string, string> = {
"format-version": "2",
"write.parquet.compression-codec": "zstd",
"write.avro.compression-codec": "zstd",
Expand All @@ -105,6 +105,9 @@ export class MatanoIcebergTable extends Construct {
"glue.skip-archive": "true",
force_update_0208: "update",
};
if (props.tableName.includes("enrich")) {
tableProperties["force_update_0405"] = "update";
}

const resource = new CustomResource(this, "Default", {
serviceToken: IcebergTableProvider.getOrCreate(this, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class MatanoIcebergTableCustomResource : CFNCustomResource {

/** Create flattened view of a table. */
fun syncView(tableName: String, schema: Schema?, drop: Boolean = false) {
if (!tableName.startsWith("matano.") || tableName.contains("enrich")) {
if (!tableName.startsWith("matano.")) {
return
}

Expand Down

0 comments on commit e059791

Please sign in to comment.