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

Please add JSON1 extension #8

Closed
djrobby opened this issue Apr 3, 2021 · 11 comments
Closed

Please add JSON1 extension #8

djrobby opened this issue Apr 3, 2021 · 11 comments

Comments

@djrobby
Copy link

djrobby commented Apr 3, 2021

Kindly requesting as it does come in handy when developing PoCs with Grafana or many other technologies. Thank you in advance!

@warmwaffles
Copy link

The json1 extension comes with the amalgamation file already.

@warmwaffles
Copy link

When compiling with make or what ever your choice is pass -DSQLITE_ENABLE_JSON1=1

@djrobby
Copy link
Author

djrobby commented Apr 4, 2021

I was under the impression that since your version was already a precompiled binary, folks wouldn't have to go thru with compiling from the source with various combinations of flags. I personally have not had much luck in successfully compiling their latest stable version locally. I’ve also looked over their docs multiple times only to give up in frustration and go with sudo apt install (which from what I can tell) does not come with JSON1 support.

@nalgeon
Copy link
Owner

nalgeon commented Apr 4, 2021

Robby, Mathew @warmwaffles is not the maintainer, so don't blame him, blame me ツ Just as a clarification: how do you use SQLite binary? Are you using some language-specific wrapper, calling it from C or using a shell?

@warmwaffles
Copy link

@djrobby alsa check the pragma compile options because it comes standard with ubuntu 16.04 https://stackoverflow.com/questions/49043084/sqlite-on-ubuntu-16-04-with-json1

PRAGMA compile_options;

@nalgeon I don't know how feasible it is to actually pull that part of sqlite3 out and compile it as a standalone module.

@djrobby
Copy link
Author

djrobby commented Apr 5, 2021

Thanks guys, sorry for the trouble. @nalgeon I was not trying to put the blame on anyone. It was merely a request based on my personal experience trying to compile SQLite locally. For now, I’ll explore other viable options and close this issue. Thanks again!

@djrobby djrobby closed this as completed Apr 5, 2021
@nalgeon
Copy link
Owner

nalgeon commented Apr 5, 2021

No problem at all! I'm not against adding JSON1 extension, I just don't understand your use case. Will be glad to help if you answer my previous questions.

@djrobby
Copy link
Author

djrobby commented Apr 5, 2021

Hi @nalgeon, for my specific use case, I've created a small API endpoint using Crystal lang's sqlite3 lib @ https://github.com/crystal-lang/crystal-sqlite3 that accepts data from various servers broadcasting app specific metrics via https://github.com/timberio/vector. As of right now, the volume is approx. 250k records/day and I was looking to convert the data stream over JSON to be able to store into SQLite. Our specific workflow with SQLite is essentially: ingest, summarize, export, compress and backup on daily basis. We start every day with a fresh SQLite db named yyyy_mm_dd_svr_xxx.db. I hope this helps answer your question.

@nalgeon
Copy link
Owner

nalgeon commented Apr 6, 2021

Thanks! I'll see what I can do.

@nalgeon
Copy link
Owner

nalgeon commented Apr 6, 2021

Here you go: json1

@djrobby
Copy link
Author

djrobby commented Apr 7, 2021

Amazing! Thank you so much @nalgeon 🙏

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

No branches or pull requests

3 participants