<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:/var/app/InputFileSchema.xsd">
    <changeset
         id="KDH-649_fingerprinting_backfill_FINGERPRINTED_AS:1"
         author="npatel"
         run-always="true"
         topic="event.snowflake.fp.backfill.fingerprintedAs"
         snowflake-account="orchard"
     >
    <!--  Total count: 49,468,054 in facts.prod.FINGERPRINTED_AS -->
    
        <precondition>
            <sqlquery>
                <![CDATA[
                    select 
                        OBJECT_CONSTRUCT(
                            'orchardAssetId', rel.orchard_asset_id,
                            'acridId', rel.acrid_id
                        ) AS KEY,
                        OBJECT_CONSTRUCT(
                            'start', OBJECT_CONSTRUCT(
                                'id', rel.orchard_asset_id
                            ),
                            'end', OBJECT_CONSTRUCT(
                                'id', rel.acrid_id
                            ),
                            'createdAt', TO_CHAR(rel.created_at, 'YYYY-MM-DD"T"HH24:MI:SS.FF3"Z"'),
                            'createdBy', rel.created_by,
                            'lastModifiedAt', TO_CHAR(rel.last_modified_at, 'YYYY-MM-DD"T"HH24:MI:SS.FF3"Z"'),
                            'lastModifiedBy', rel.last_modified_by
                        ) AS VALUE
                    from facts.prod.FINGERPRINTED_AS as rel  LIMIT 1000000
                ]]>
            </sqlquery>
        </precondition>
    </changeset>
    
</changelog>
