New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --data-from-json
option for initialization of emulator data
#9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks amazing ✨
] | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
cmd/bigquery-emulator/main.go
Outdated
@@ -23,6 +23,7 @@ type option struct { | |||
LogFormat server.LogFormat `description:"specify the log format (console/json)" long:"log-format" default:"console"` | |||
Database string `description:"specify the database file if required. if not specified, it will be on memory" long:"database"` | |||
DataFromYAML string `description:"specify the path to the YAML file that contains the initial data" long:"data-from-yaml"` | |||
DataFromJSON string `description:"specify the path to the JSON file that contains the initial data (faster for large files)" long:"data-from-json"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a sense at what size, in general, you would recommend switching from yaml to json? could be helpful to have a general sense (either here or in a doc somewhere) to guide folks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the helpdoc to say "multi-megabyte"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No comments outside of Ethan's!
The JSON parser is exponentially faster than the YAML parser for large files