Discussions
Categories
- 196.9K All Categories
- 2.2K Data
- 239 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 546 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.9K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.6K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 442 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
I have a REST data source for genres of a given movie, but how can I store those in a local table?

I want to do this so I can filter movies by genre. As an extension of the APEX Movie Catalog tutorial, I created a REST data source for retrieving the genres from the Movie Database movie detail JSON payload, and I can output the genres onto the Movie Details page, but if the user adds a movie to their watch list, how can I store the genres in my movies_x_genres table?
I keep believing I can do something like write the rows of #APEX$SOURCE_DATA# to my table, but I have not figure out quite how to do that.
This seems like something people would need to do, basically query a web service (like TheMovieDB.org) and store the multiple records that are returned within the JSON payload, but I have not found a solution yet and have not created a working solution yet, either. I'd love to hear if others have done something similar.
Answers
-
Depend APEX version you use, check if REST Data Source Synchronization is what you looking for
-
Thanks, Jariola, for the suggestion. I am on the latest APEX, so I can certainly enable synchronization, but the problem is that my REST Data Source is based on .genres (array within the movie JSON), so when that REST Data Source retrieves, I can get genre ID and genre name, but I can't also collect the movie ID. The movie ID has to be a parameter for the REST data source, and I need it to be the primary key for the local table.
So whereas this MIGHT work if I knew how to include the value of the REST data source parameter from the page (i.e. P3_ID) in the REST data source output, I don't seem to be able to include :P3_ID in the output. Also, I don't see how to fire the REST data source sync from a form.
I completed the entire tutorial for the Movie Catalog, and all I want to do is query the genres out of the JSON that the Movie Details page already has available and write them to a table movies_x_genres. I feel like this is an application dev 101 operation, but I don't know how to reference the JSON genres array from the form that is already accessing the JSON but at the movie level (rather than the genres array).
I don't even know if I am making sense.