varigence / BimlPit

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

Datatype mapping issue for parameters in ExecuteSqlTask #112

Open jalley64 opened 5 years ago

jalley64 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

When creating a parameter for an ExecuteSqlTask, the incorrect datatype is generated in the package. When specifying a "DateTime" or "DateTime2" datatype, we expect to see a DbTimeStamp in the generated package, however we are getting a "Date" for the datatype of the parameter instead.

Expected behavior

Minimal reproduction of the problem with instructions

<Biml>
 <Connections>
        <OleDbConnection Name="conn" ConnectionString="[connectionString]" />
    </Connections>
    <Packages>
        <Package Name="Package_TestProc">
            <Variables>
                <Variable Name="OutputDate" DataType="DateTime">1/1/1980</Variable>   
            </Variables>
            <Tasks>
                <ExecuteSQL Name="SQL Task - Exec TestProc" ConnectionName="conn">
                    <DirectInput>EXEC TestProc ? OUTPUT</DirectInput>
                    <Parameters>
                        <Parameter VariableName="User.OutputDate" Name="0" DataType="DateTime2" Direction="Output" />
                    </Parameters>
                </ExecuteSQL>
            </Tasks>
        </Package>
    </Packages>
</Biml>

where this is the StoredProc:

CREATE PROCEDURE TestProc
       @DateTime DATETIME OUTPUT
AS
BEGIN
       SET @DateTime = GETDATE()
END
GO

for the Parameter you will get Desired result: DBTIMESTAMP Generated result: DATE (whether the user puts DateTime2 or DateTime for the parameter datatype)

Environment


BimlStudio version: 2019


Target SSIS Version:

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

Others: