locked
Convert data type from timestamp to bigint in the Copy table pipeline RRS feed

  • Question

  • I have SQL Server data source with table column with timestamp format.

    I have Azure SQL DW destination, which do not support timestamp. So was created column with bigint.

    How to do transformation from timestamp to bigint during copy table pipeline?



    Kenny_I

    Tuesday, May 28, 2019 1:25 PM

All replies

  • As per the this link .

    https://docs.microsoft.com/en-us/sql/t-sql/data-types/rowversion-transact-sql?view=sql-server-2017

    A nonnullable rowversion column is semantically equivalent to a binary(8) column. A nullable rowversion column is semantically equivalent to a varbinary(8) column.

    This is what I tried , I had the sink column type as binary(8) and the source ( SQL Server ) as timestamp and it worked for me . 

    Sink :

    create table Testtimesatamp_sink
    (
    id int identity(1,1) ,
    name varchar(100) ,
    timestampcolumn binary(8)

    )

    Source : 

    create table Testtimesatamp_source 
    (
    id int identity(1,1) ,
    name varchar(100) ,
    timestampcolumn timestamp

    )

    I also tried with timestampcolumn  varbinary(8) and it just worked fine . 

    Please do let me know how it goes .


    Thanks Himanshu

    Tuesday, May 28, 2019 7:13 PM