GoogleCloudPlatform / GoogleCloudPlatform/market-data-transcoder

--create_schemas_only should execute without specifying a source file

Open
#211 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
47
Forks
11
Avg merge
19d 10h
Merged PRs (30d)
2

Description

When running with the `--create_schemas_only` option, there should be no requirement for source file parameters to be specified.

```
undefined@Undefineds-MacBook-Pro src % txcode --create_schemas_only --schema_file FIX42-vanilla.xml --factory=fix --source_file 42_order_single.txt --source_file_format_type line_delimited --output_type jsonl
INFO:root:Run in create_schemas_only mode
INFO:root:Total runtime in seconds: 0.020124
INFO:root:Total runtime in minutes: 0.000335
undefined@Undefineds-MacBook-Pro src % txcode --create_schemas_only --schema_file FIX42-vanilla.xml --factory=fix --output_type jsonl
usage: txcode [-h] [--factory {cme,itch,memx,fix}] [--schema_file SCHEMA_FILE]
[--source_file SOURCE_FILE] [--source_file_encoding SOURCE_FILE_ENCODING]
--source_file_format_type {pcap,length_delimited,line_delimited,cme_binary_packet}
[--base64 | --base64_urlsafe] [--fix_header_tags FIX_HEADER_TAGS]
[--fix_separator FIX_SEPARATOR] [--message_handlers MESSAGE_HANDLERS]
[--message_skip_bytes MESSAGE_SKIP_BYTES] [--prefix_length PREFIX_LENGTH]
[--message_type_exclusions MESSAGE_TYPE_EXCLUSIONS | --message_type_inclusions MESSAGE_TYPE_INCLUSIONS]
[--sampling_count SAMPLING_COUNT] [--skip_bytes SKIP_BYTES] [--skip_lines SKIP_LINES]
[--source_file_endian {big,little}] [--output_path OUTPUT_PATH]
[--output_type {diag,avro,fastavro,bigquery,pubsub,bigquery_terraform,pubsub_terraform,jsonl,length_delimited}]
[--error_output_path ERROR_OUTPUT_PATH] [--lazy_create_resources] [--frame_only]
[--stats_only] [--create_schemas_only] [--destination_project_id DESTINATION_PROJECT_ID]
[--destination_dataset_id DESTINATION_DATASET_ID] [--output_encoding {binary,json}]
[--create_schema_enforcing_topics | --no-create_schema_enforcing_topics]
[--continue_on_error] [--log {notset,debug,info,warning,error,critical}] [-q] [-v]
txcode: error: the following arguments are required: --source_file_format_type
```

If you specified `--create_schemas_only` the only requirement should be `--factory` and `--schema_file`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.