|
115 | 115 | %nonterm export_csv_column transactions.ExportCSVColumn |
116 | 116 | %nonterm export_csv_columns_list Sequence[transactions.ExportCSVColumn] |
117 | 117 | %nonterm export_csv_config transactions.ExportCSVConfig |
| 118 | +%nonterm export_csv_output transactions.ExportCSVOutput |
118 | 119 | %nonterm export_csv_path String |
119 | 120 | %nonterm export_csv_source transactions.ExportCSVSource |
120 | 121 | %nonterm export_iceberg_config transactions.ExportIcebergConfig |
| 122 | +%nonterm export_output transactions.ExportOutput |
121 | 123 | %nonterm export_iceberg_table_def logic.RelationId |
122 | 124 | %nonterm iceberg_auth_properties Sequence[Tuple[String, String]] |
123 | 125 | %nonterm iceberg_catalog_config logic.IcebergCatalogConfig |
@@ -1293,6 +1295,10 @@ read |
1293 | 1295 | construct: $$ = transactions.Read(export=$1) |
1294 | 1296 | deconstruct if builtin.has_proto_field($$, 'export'): |
1295 | 1297 | $1: transactions.Export = $$.export |
| 1298 | + | export_output |
| 1299 | + construct: $$ = transactions.Read(export_output=$1) |
| 1300 | + deconstruct if builtin.has_proto_field($$, 'export_output'): |
| 1301 | + $1: transactions.ExportOutput = $$.export_output |
1296 | 1302 |
|
1297 | 1303 | demand |
1298 | 1304 | : "(" "demand" relation_id ")" |
@@ -1330,6 +1336,21 @@ export |
1330 | 1336 | deconstruct if builtin.has_proto_field($$, 'iceberg_config'): |
1331 | 1337 | $3: transactions.ExportIcebergConfig = $$.iceberg_config |
1332 | 1338 |
|
| 1339 | +# Like `export`, but the engine treats the result as part of the transaction results |
| 1340 | +# and chooses the output path itself (so no `path` is specified here). |
| 1341 | +export_output |
| 1342 | + : "(" "output_export" export_csv_output ")" |
| 1343 | + construct: $$ = transactions.ExportOutput(csv=$3) |
| 1344 | + deconstruct if builtin.has_proto_field($$, 'csv'): |
| 1345 | + $3: transactions.ExportCSVOutput = $$.csv |
| 1346 | + |
| 1347 | +export_csv_output |
| 1348 | + : "(" "csv" export_csv_source csv_config ")" |
| 1349 | + construct: $$ = transactions.ExportCSVOutput(csv_source=$3, csv_config=$4) |
| 1350 | + deconstruct: |
| 1351 | + $3: transactions.ExportCSVSource = $$.csv_source |
| 1352 | + $4: logic.CSVConfig = $$.csv_config |
| 1353 | + |
1333 | 1354 | export_csv_config |
1334 | 1355 | : "(" "export_csv_config_v2" export_csv_path export_csv_source csv_config ")" |
1335 | 1356 | construct: $$ = construct_export_csv_config_with_source($3, $4, $5) |
|
0 commit comments