pagerduty-cli icon indicating copy to clipboard operation
pagerduty-cli copied to clipboard

Consider adding support to output into newline delimted JSON

Open jallan-cflt opened this issue 2 years ago • 2 comments

One use I am considering is loading the output of the CLI into BigQuery.

BigQuery allows for import of newline delimited JSON. It would be helpful to add an option (--json-nd). Easier to have it built into the tool than to add on a post-processing step.

Thanks in advance for considering!

jallan-cflt avatar Apr 26 '23 18:04 jallan-cflt

Hi @jallan-cflt so are you thinking this would be useful for just the list commands or other stuff too? I don't have any objection to adding it as it seems fairly trivial, especially if it's just for the list commands... it seems odd that BigQuery doesn't understand JSON arrays natively as representing multiple objects?

martindstone avatar May 11 '23 02:05 martindstone

I agree that it's odd (I used to be a TPM on the BigQuery team as an FYI).

I have provided similar feedback directly but I not sure how high this ranks for BigQuery to address. I was mainly considering the list events, as my use case is around getting regular data extracts from PagerDuty into a place I can run SQL.

jallan-cflt avatar May 11 '23 18:05 jallan-cflt