Home > Workload Solutions > SQL Server > White Papers > Running SQL Server 2022 with Red Hat OpenShift on AMD EPYC based Dell PowerEdge servers and Dell ObjectScale > SQL Server external table
SQL Server external table simplifies the process of working with data outside of SQL Server. The external table uses Polybase to access data stored externally to SQL Server, in our case it would be on ObjectScale object storage.
The following steps must be performed before creating the external table:
The following screenshots show how to create the external file in Delta Lake file format.
After the external file has been created as Delta Lake format (DeltaTableFormat), we can go to creating the SQL Server External table as shown below with the “LOCATION” and “DATA_SOURCE” parameters.
After the external table has been created successfully, a standard SQL Server “select” statement can be performed like any other tables inside the SQL Server database. Figure 21 shows an example of running a “select” statement on “customer_address” table.
We also created all 25 TPC-DS tables as External table in SQL Server.
Now we have all TPC-DS data external to SQL Server and only the metadata for these tables exists on SQL Server instance. The next step is to run all 99 standard TPC-DS queries and perform the data analytics as per the TPC-DS requirements.
Figure 22 above shows one of the standard TPC-DS queries from 99 queries along with the result. This query uses date_dim (73,049 records), store_sales (28,79,97,024 records), store (402 records) tables which reside on ObjectScale.
If we take a closer look into the execution plan for this query, we can see the “remote scan” operator in the plan as shown in Figure 23.