varigence / BimlPit

Public Issue Tracker for all Varigence Biml products
6 stars 0 forks source link

GetQuerySchema Issues #97

Closed DavidSteinJr closed 5 years ago

DavidSteinJr commented 5 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead go to https://varigence.com/Forums?forumName=BimlStudio or email support@varigence.com
[ ] Other... Please describe:

Current behavior

Imports Nullable Columns as NOT Nullable. The "default" Scale is currently set to 0, but needs to be -1.

Expected behavior

Things should import correctly.

Minimal reproduction of the problem with instructions

I'm using Northwind database, OLE DB connection, against SQL Server 2016.

<#@ template language="C#" tier="50" #>
<# string qry = "SELECT * FROM dbo.Orders"; 
var SrcConn = (AstDbConnectionNode)RootNode.Connections["connNorthwind"]; 
#>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <#var md = ExternalDataAccess.GetQuerySchema(SrcConn, qry,null,0 ); #>
    <#=md.GetBiml() #>
    <!--    <#=md.GetTableSql() #>  -->
</Biml>

What is the motivation / use case for changing the behavior?

The second issue creates the following build warning: Warning:WarningNonDefaultScale : Node: CustomerID: Column Property:Scale Specified Scale will be ignored Scale should be left as default value (-1) for types other than Decimal, Time, DateTime2, and DateTimeOffset

The warning can be ignored, the Null issue cannot.

Environment


BimlStudio version: 5.0.63346.0

Target SSIS Version:

- [ ] 2005
- [ ] 2008
- [ ] 2008 R2
- [ ] 2012
- [ ] 2014
- [x] 2016
- [ ] 2017

Others:


jalley3 commented 5 years ago

The IsNullable issue is now fixed and will be included in the next release. We are not going to do anything re- the warning as a lot of this code is going to be re-vamped in the future.