Good day, everyone. Thanks for watching another episode of Mike's Super SharePlex Show. I ran across something recently and thought I would share it with you. I had a situation where the client was doing a migration from Oracle to Postgres EDB. And most of their data was XML data. Well, out of the box, SharePlex will not replicate XML directly from Oracle to Postgres. But this was a requirement, the XML had to be part of the migration.
So after a few discussions between the client and our teams, we came up with an acceptable workaround. We can use SharePlex to take the XML, if it's stored as a CLOB, and then replicate it to a Postgres text column rather than an XML column. I know it's a bit of a creative use of SharePlex, for sure. And that's what I want to show you today. So today, we are going to replicate some XML data from our Oracle database to a text column in our Postgres database. And today, we're going to do it all through TOAD Data Point.
So let's go ahead and let's get started. As you can see, I'm into my Oracle database here. And this is our table. Our table is our XML test table. And as you can see, we have two columns-- an ID, which is a number, and an XML, which is an XML type. And actually, if we want to look at the script real quick, we can see the XML column is actually stored as a CLOB.
OK, we currently do not have any data in here. Now let's swap over quickly to our Postgres database. And as you can see, we do have another XML table. And it has an ID column, and we've named the column XML. Well, if you look at the type, it's an actual text data type. Currently, no data in that one. And we have no data in our Oracle table.
So let's go ahead and let's insert some data into our Oracle table and see how it gets replicated over to our Postgres side. Here, you'll see I have some sample XML data here. And I'm going to go ahead and we're going to go ahead and run this and insert it into our table. It has gone through, looks like it's actually finished. Let's go ahead and confirm that we do see it.
As you can see, we do now have our XML data into our XML table. Let's go over to our Postgres database. Let's look for our data. And as you can see, it did replicate over. So we went from an XML data type over to a text data type. And it actually, as you can see, even still looks like XML there.
So that completes our demonstration. I know it's a short one for today. But as you can see, SharePlex is very versatile and can be used in some very creative ways, like we did with the XML to the text data type conversion I demonstrated today.
For more information, you can visit SharePlex.com. Thanks for watching and have a great day.