#Setting path for file inside java project
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
show the code please
what is this lib ?
Apache spark from the looks of it
Anyways, OP you can use the getResource method to grab the file in your resources folder
get resource on the string path ?
wait, is this really an example from their official docs ?
that's messed up 🤔
@old canyon
I mean, I checked the doc and there seem to have no way to put an uri or inputstream, only a string
Well nobody said spark was a good framework 😂
Even though we use it at government 😔
(not for prod tho)
uh oh, should I look into something else ? im open to suggestions . @old canyon
opening a tsv/csv file with 7 million records
jackson I guess ?
I think you need to use open csv
Path path = Paths.get()
Path.of
Then read with CsvReader
why is it not a good framework though aha its supper slow for me
I mean he will need that get() to do ClassLoader.getSystemRousources()
That san example I know already
Paths.get was replaced by Path.of
but you shouldn't do that at the first place
you should use Class.getResource or better, Class.getResourceAsStream
spark is more for the billions or trillions of records use cases