-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
SO import/export: Improve JSON import experience #110514
Comments
Pinging @elastic/kibana-core (Team:Core) |
Hum, are you sure this is a object count limit and not a payload size limit? The default max number of objects is 10k kibana/src/core/server/saved_objects/saved_objects_config.ts Lines 48 to 51 in 393505a
Could you elaborate on why this would be logical, given that the export API can only provide export files in NDJSON? |
I think it would be unreasonable to support arbitrary formats, however collections of JSON documents generally only come in these 2 formats (newline delimited and array), so I see it as being a controlled decision. Additionally, common tools export results in array format. For example, Google BigQuery's default export format is array, where each array element = 1 record result from query. |
To be totally honest, I personally think using ndjson as our export format was a terrible decision, especially due to it being a rather non-standard extension / format (e.g it's not even in some mimetype registries such as the one used by HAPI), and due to it's limitations compared to a plain json or json-extended format (e.g when working with non-consistent entries, when in need to add metadatas to the export...). Now, the reason behind not allowing Also, the main argument in favor of ndjson is also that is easily supports streaming, as you can process an element on the server-side as soon as you encountered a line separator, which is not the case for plain json (you need to await the whole payload to parse it). Sames goes for the export, where you can (more easily) write each entries individually in NDJSON than in JSON. Now, this legacy format support is going to be dropped for 8.0 (#110738), so we could, potentially, open the discussion about using JSON format again. We're currently in the phase of designing what we currently call the 'new import/export', as we're planning to extend/refactor this API, probably shortly after 8.0, so this format discussion would probably wait until then. |
We realistically won't be implementing an additional import/export format anytime soon. Closing. |
Currently Kibana supports newline delimited JSON as a valid "Upload a File" import, however the usability experience had some friction.
In addition to newline delimited JSON, it seems logical to support array format as well.
The text was updated successfully, but these errors were encountered: