Can I use realm (local) as temp database?

Hi smart developers,

I want to ask if I can use “realm” as a temp database (locally) then after some trigger from a user, all data from the temp database (realm local) will transfer to the “atlas” database (cloud) directly or by “realm sync”. is that possible in android (java)? I mean I read how to implement the realm as local (https://docs.mongodb.com/realm/sdk/android/quick-start-local/) and how to implement the sync but I did not get in how to implement both of them at the same time or use temp database.

I read also how to “Convert a Local Realm to a Synced Realm”
(Convert a Local Realm to a Synced Realm - Realm Sync (LEGACY)) but I did not understand it very well because I’m still a beginner.

any help?