質問

I m trying to load json data into in memory database h2.

when i create datasource i have to set url where i m not getting to how to define path for json data file.

Need guidence.

役に立ちましたか?

解決

I would use a JSON parser to read and parse the JSON, and then use the JDBC API to insert the data into the database.

With the JDBC API, make sure you use PreparedStatement, that means, create one PreparedStatement per table, and re-use those. What you could do is keep them in a map, one prepared statement per table (Map<String, PreparedStatement>).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top