Azure synapse sql support (MSSQL provider)

未关闭
#851 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
azure, fsharp, sql
领域
databases

调研方向

从 src/SQLProvider.Runtime/Providers.MsSqlServer.fs 第 622 行附近的 GetColumns 开始,然后使用 MSSQL 连接器针对 Azure Synapse SQL 池复现类型推断。将失败的元数据查询与 issue 中链接的 Synapse 兼容性参考进行比较。当 Synapse 连接能够在不出现 COLUMNPROPERTY 错误的情况下加载列名和属性类型时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

sql server

Describe the bug
when trying to connect SQLProvider to a Synapse azure sql pool instance via MSSQL connector (synapse provides a compatible TSQL api / dialect) we currently get such errors .

e.g. MSSQL EF core provider supports both MSSQL server and synapse as well

here code in EF to support synapse behind the same interface

Microsoft.Data.SqlClient.SqlException (0x80131904): 'COLUMNPROPERTY' is not a recognized built-in function name.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader()
   at FSharp.Data.Sql.Providers.MSSqlServerProvider.FSharp.Data.Sql.Common.ISqlProvider.GetColumns(IDbConnection con, Table table) in zC:\git\SQLProvider\src\SQLProvider.Runtime\Providers.MsSqlServer.fs:line 622
   at [FSharp.Data.Sql.QueryExpression.QueryExpressionTransformer.convertExpression@913.Invoke](mailto:FSharp.Data.Sql.QueryExpression.QueryExpressionTransformer.convertExpression@913.Invoke)(Table table)

Tried on azure synapse sql should be compatible with TSQL mssql but rows do not display property types correctly

To Reproduce
Steps to reproduce the behavior:

  1. Make a synapse sql pool instance on Azure cloud
  2. Connect the type provider using MSSQL SQLProvider with synapse connection string
  3. See error when running or trying to infer types

Try with azure synapse sql pool on azure

Expected behavior
Have an option for Azure Synapse or a way to use MSSQL provider to load az synapse db connections and types correctly

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Database: [e.g. SQLite]
  • Nuget Package and version: [e.g. SQLProvider.SQLite 1.5.0]
  • OS: [e.g. iOS]
  • Dotnet or .NET Framework and version [e.g. dotnet 8]

Additional context
Data warehous on azure, Synapse SQL is the current Azure Cloud solution for data warehouse / big data parallel distributed sql, so it would be great to have this when working with Azure

主要语言
F#
星标
627
派生
147
平均合并
2 小时 2 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fsprojects/SQLProvider 的其他 Issue

查看 fsprojects/SQLProvider 的全部 Issue

相似的 Issue

更多 Databases Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。