<?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_OrchardAsset:1"
         author="npatel"
         run-always="true"
         topic="event.snowflake.fp.backfill.orchardAsset"
         snowflake-account="orchard"
     >
    <!--  Total count: 49,681,907 in facts.prod.ORCHARD_ASSET -->
    
        <precondition>
            <sqlquery>
                <![CDATA[
                    select 
                        OBJECT_CONSTRUCT(
                            'id', node.id
                        ) AS KEY,
                        OBJECT_CONSTRUCT(
                            'id', node.id,
                            'bucket', node.bucket,
                            'extension', node.extension,
                            'filename', node.filename,
                            'source', node.source,
                            'createdAt', TO_CHAR(node.created_at, 'YYYY-MM-DD"T"HH24:MI:SS.FF3"Z"'),
                            'createdBy', node.created_by,
                            'lastModifiedAt', TO_CHAR(node.last_modified_at, 'YYYY-MM-DD"T"HH24:MI:SS.FF3"Z"'),
                            'lastModifiedBy', node.last_modified_by
                        ) AS VALUE
                    from facts.prod.ORCHARD_ASSET as node
                ]]>
            </sqlquery>
        </precondition>
    </changeset>
    
</changelog>
