Skip to content

Commit 2aa637c

Browse files
committed
Reducing template to 1 table
1 parent ddeba25 commit 2aa637c

File tree

2 files changed

+2
-59
lines changed

2 files changed

+2
-59
lines changed

contrib/templates/file-push/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ During initialization, you'll be prompted to configure:
1515
- Schema evolution settings
1616
- Optional schema hints
1717

18-
The template supports configuring up to 4 tables during initialization. Additional tables can be added later by editing `./src/configs/tables.json`.
18+
The template configures a single table during initialization. Additional tables can be added later by editing `./src/configs/tables.json`.
1919

2020
After initialization, follow the generated README.md to deploy and start ingesting data.

contrib/templates/file-push/template/{{.catalog_name}}.{{.schema_name}}/src/configs/tables.json.tmpl

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -17,64 +17,7 @@
1717
"cloudFiles.schemaEvolutionMode": "{{.table_1_schema_evolution_mode}}"
1818
}{{if .table_1_schema_hints}},
1919
"schema_hints": "{{.table_1_schema_hints}}"{{end}}
20-
}{{if eq .add_table_2 "yes"}},
21-
{
22-
"name": "{{.table_2_name}}",
23-
"format": "{{.table_2_format}}",
24-
"format_options": {
25-
{{- if eq .table_2_format "csv"}}
26-
"header": "{{.table_2_csv_header}}",
27-
"delimiter": "{{if eq .table_2_csv_delimiter "\t"}}\\t{{else}}{{.table_2_csv_delimiter}}{{end}}",
28-
"escape": "{{if eq .table_2_csv_escape "\""}}\"{{else if eq .table_2_csv_escape "\\"}}\\{{else}}{{.table_2_csv_escape}}{{end}}",
29-
"multiLine": "{{.table_2_csv_multiline}}",
30-
{{- else if eq .table_2_format "json"}}
31-
"allowComments": "{{.table_2_json_allow_comments}}",
32-
"allowSingleQuotes": "{{.table_2_json_allow_single_quotes}}",
33-
"inferTimestamp": "{{.table_2_json_infer_timestamp}}",
34-
"multiLine": "{{.table_2_json_multiline}}",
35-
{{- end}}
36-
"cloudFiles.schemaEvolutionMode": "{{.table_2_schema_evolution_mode}}"
37-
}{{if .table_2_schema_hints}},
38-
"schema_hints": "{{.table_2_schema_hints}}"{{end}}
39-
}{{end}}{{if and (eq .add_table_2 "yes") (eq .add_table_3 "yes")}},
40-
{
41-
"name": "{{.table_3_name}}",
42-
"format": "{{.table_3_format}}",
43-
"format_options": {
44-
{{- if eq .table_3_format "csv"}}
45-
"header": "{{.table_3_csv_header}}",
46-
"delimiter": "{{if eq .table_3_csv_delimiter "\t"}}\\t{{else}}{{.table_3_csv_delimiter}}{{end}}",
47-
"escape": "{{if eq .table_3_csv_escape "\""}}\"{{else if eq .table_3_csv_escape "\\"}}\\{{else}}{{.table_3_csv_escape}}{{end}}",
48-
"multiLine": "{{.table_3_csv_multiline}}",
49-
{{- else if eq .table_3_format "json"}}
50-
"allowComments": "{{.table_3_json_allow_comments}}",
51-
"allowSingleQuotes": "{{.table_3_json_allow_single_quotes}}",
52-
"inferTimestamp": "{{.table_3_json_infer_timestamp}}",
53-
"multiLine": "{{.table_3_json_multiline}}",
54-
{{- end}}
55-
"cloudFiles.schemaEvolutionMode": "{{.table_3_schema_evolution_mode}}"
56-
}{{if .table_3_schema_hints}},
57-
"schema_hints": "{{.table_3_schema_hints}}"{{end}}
58-
}{{end}}{{if and (eq .add_table_2 "yes") (eq .add_table_3 "yes") (eq .add_table_4 "yes")}},
59-
{
60-
"name": "{{.table_4_name}}",
61-
"format": "{{.table_4_format}}",
62-
"format_options": {
63-
{{- if eq .table_4_format "csv"}}
64-
"header": "{{.table_4_csv_header}}",
65-
"delimiter": "{{if eq .table_4_csv_delimiter "\t"}}\\t{{else}}{{.table_4_csv_delimiter}}{{end}}",
66-
"escape": "{{if eq .table_4_csv_escape "\""}}\"{{else if eq .table_4_csv_escape "\\"}}\\{{else}}{{.table_4_csv_escape}}{{end}}",
67-
"multiLine": "{{.table_4_csv_multiline}}",
68-
{{- else if eq .table_4_format "json"}}
69-
"allowComments": "{{.table_4_json_allow_comments}}",
70-
"allowSingleQuotes": "{{.table_4_json_allow_single_quotes}}",
71-
"inferTimestamp": "{{.table_4_json_infer_timestamp}}",
72-
"multiLine": "{{.table_4_json_multiline}}",
73-
{{- end}}
74-
"cloudFiles.schemaEvolutionMode": "{{.table_4_schema_evolution_mode}}"
75-
}{{if .table_4_schema_hints}},
76-
"schema_hints": "{{.table_4_schema_hints}}"{{end}}
77-
}{{end}}
20+
}
7821
]
7922

8023

0 commit comments

Comments
 (0)