Skip to content
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

feat(eqx query cosmos): Add -sn, -o, -P, -C, -m raw #444

Merged
merged 5 commits into from
Feb 17, 2024
Merged

Conversation

bartelink
Copy link
Collaborator

@bartelink bartelink commented Feb 17, 2024

Adds features to eqx query ... cosmos:

  • -C: emit query output to Console
  • -o/--output filepath: emit CR-delimited JSON showing raw query output
  • -P: pretty print the output indented over multiple lines
  • -m/--mode raw: SELECT * from matching docs (and show ages)
  • -sn: specify exact stream name instead of category name or category pattern

Example use cases:

  • Useful complement to eqx dump for troubleshooting (eqx query focuses on the raw JSON and uses CosmosDB queries; eqx dump does a read Equivalent to an application-level Query call)
  • Great for gathering event counts/RU cost stats for tuning/sanity checking
  • Also useful for shuffling categories or streams between stores for inspection and/or doing general things that you do via SELECT INTO hackery in SQL stores
  • the propulsion-indexer template's upconvert and sync commands and/or the propulsion-sync templates can be used to import and/or upconvert based on such dumps (NOTE they can of course also identically work from the changefeed)

@bartelink bartelink merged commit 79e546a into master Feb 17, 2024
5 checks passed
@bartelink bartelink deleted the query-output branch February 17, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant