This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
Use T-SQL to create external tables for Oracle is cumbersome and error-prone. You may refer the article if you are interested.
Today I’m going to show you how to use ‘data virtualization’ extension of ‘Azure data Studio’ to do it.
You may still run into error , however you can modify the ‘script’ to correct it.
- Download and install the ‘Azure Data Studio’.
https://docs.microsoft.com/en-us/sql/azure-data-studio/download?view=sql-server-ver15
- Connect to your Polybase instance.
- You are able to install ‘Data Virtualization’ extension after the connection is established.
- Click the highlighted icon. Put ‘data virtualization’ in ‘search bar’, and install it.
It’s available to use after installation. (Current version (1.1.0) supports SQL Server and Oracle)
Here is an example of connecting Oracle data source.
- Right click the database you’d like to store the external table.
- Click ‘Oracle’ database source
- Specify password to create a master key. (This steps will be skipped if the master key exists)
- Create a credential and external data source. You can reuse these settings next time.
Here is an example
- Check the table you need to export
Optional, you can check each table to modify the target schema name, table name and the columns you need to export.
- I suggest to click the ‘Generate script’ in case the creating external table fails.
- Then click ‘Create’ and wait for the result
Here is an example. In case the creation fails, you can manually run the script to check.