Have you tried External query where you can pass native functions and Dremio will not parse those
@balaji.ramaswamy, Ttere’s no issue with using external query to get data from SQL Server into Dremio, but that doesn’t address the issue of not being able to use a linked server (or any ROWSET constructs, as mentioned earlier in the thread by @paulmdrumm ) to query Dremio from within SQL Server. Currently, it looks like the only option available is something like PowerShell or SSIS to get data out of Dremio and into SQL Server.
As an example. I have a table in one of my SQL Server sources with a schema like this and populated with dummy data:
CREATE TABLE DremioTypeTest
(
[IntCol] INT
,[BitCol] BIT
,[DecimalCol] DECIMAL(10,3)
,[CharCol] CHAR(100)
,[VarCharCol] VARCHAR(100)
,[TextCol] TEXT
,[DateCol] DATE
,[DateTimeCol] DATETIME
,[TimeCol] TIME
,[UIDCol] UNIQUEIDENTIFIER
)
I’ve saved this as a view in Dremio and it displays without issue, as expected:
In PowerShell, querying the view in Dremio is also fine (ignore the UIDCol displayed value - the function represented it incorrectly, but at least data is there)
In SQL Server, using OPENQUERY to query each column of the view in Dremio via LinkedServer shows that we can successfully return all the data types except the ones that have alphabetical characters in them. Instead we get the error
OLE DB provider “MSDASQL” for linked server “DREMIOCLOUD” returned message “Requested conversion is not supported.”.
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select IntCol from DBA.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select BitCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select DecimalCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select CharCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select VarCharCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select TextCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select DateCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select DateTimeCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select TimeCol from dba.DremioTypeTest limit 1')
go
SELECT * FROM OPENQUERY([DREMIOCLOUD],'select UIDCol from dba.DremioTypeTest limit 1')