<?xml version="1.0" encoding="utf-8"?>

<!-- EngineVersion = Java version -->
<ApiConfig Name="Infor Data Lake"
           Slug="infor-data-lake-connector"
           Type="JDBC"
           Category="big-data"
           Id="5db624f9-41e2-4036-9e42-f51c8024685e"
           Version="2"
           EngineVersion="8"
           Desc="Query Infor Data Lake from Power BI, SQL Server Linked Server via ZappySys Data Gateway, Crystal Reports, SSRS, Azure Data Factory, and other ODBC tools -- almost no coding required."
           Logo="https://cdn.zappysys.com/api/Images/logos/infor-data-lake-connector.png"
           HelpLink="https://community.zappysys.com/tag/infor-data-lake">

    <VersionHistory>
      <Change Ver="2" Date="2026-09-15" Type="Modified">Auth Notes (numbered steps), documented params, Maven DriverDownloadLinks, extra SQL examples for ODBC apps.</Change>
      <Change Ver="1" Date="2025-04-29" Type="New">Initial version.</Change>
    </VersionHistory>
    <Template>
        <Param Name="DriverDownloadPageLink"
               Value="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html" />
        <Param Name="DriverDownloadVideoTutorialLink"
               Value="https://www.youtube.com/watch?v=yipG8w6qQPg&amp;t=142s" />
        <EndPoint Name="AdditionalDriverDownloadInstructions">
            <Body>
                <![CDATA[
   <li>
        <p>
            Then <a href="https://docs.infor.com/ln/2024.x/en-us/lnolh/default.html?helpcontent=soe1647345257385.html" target="_blank">download ION API file</a> from Infor
            and place it <em>in the same directory</em> as the JDBC driver, e.g. <code>{DownloadFolder}\Infor Compass JDBC Driver.ionapi</code>.
        </p>
        <div class="alert alert-warning alert-title">
            <em>Do not rename</em> <code>Infor Compass JDBC Driver.ionapi</code> file as it will fail to load the driver.
            Also, <em>JDBC driver and ION API file have to reside in the same folder</em> for the driver to work.
        </div>
   </li>
                ]]>
            </Body>
        </EndPoint>
    </Template>
    <Auths>
        <Auth Name="Default"
              Label="Default"
              ConnStr="jdbc:infordatalake://[$DataLakeId$]"
              HelpLink="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html">
            <Params>
                <Param Name="DriverClass" Label="Driver class" Required="False" Value="com.infor.idl.jdbc.Driver" Desc="Optional. Leave blank to auto-detect from the JAR unless SPI is ambiguous (e.g. com.infor.idl.jdbc.Driver)." HelpLink="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html" />
                <Param Name="DriverFilePaths" Editor="FileOpen" Label="JDBC driver file(s)" Required="True" Value="{DownloadFolder}\infor-compass-jdbc.jar" Desc="Filled by the wizard after download. Separate multiple JARs with a semicolon (e.g. C:\ZappySys\Jdbc\MyConnector\driver.jar)." HelpLink="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html" />
                <Param Name="DataLakeId" Label="Data lake id" Required="True" Value="MY_DATALAKE_ID" Desc="Infor Data Lake identifier (e.g. MY_DATALAKE_ID)." HelpLink="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html" />
                <Param Name="UserName" Label="User name" Required="True" Desc="Infor Cloud user (usually an email). Use an integration account, not a personal employee login, for unattended refresh." HelpLink="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html" />
                <Param Name="Password" Label="Password" Required="True" Secret="True" Desc="Password for the Infor Cloud user." HelpLink="https://docs.infor.com/inforos/2024.x/en-us/useradminlib_cloud/default.html?helpcontent=aky1631199546535.html" />
            </Params>
            <Notes>
                <![CDATA[<p>Infor Compass JDBC (Data Lake) from Power BI, SQL Server Linked Server via ZappySys Data Gateway, Crystal Reports, SSRS, Azure Data Factory, and other ODBC tools.</p>
<ol>
<li>Download the Compass JDBC JAR from the Infor documentation page (not Maven Central). Put it under <code>{DownloadFolder}</code>.</li><li>Download the ION API file (<code>Infor Compass JDBC Driver.ionapi</code>) and place it in the <em>same folder</em>. Do not rename it.</li><li>Replace <code>MY_DATALAKE_ID</code> on the DSN Main UI after Finish.</li><li>Optional: watch the <a target="_blank" href="https://www.youtube.com/watch?v=yipG8w6qQPg&t=142s">setup video</a>.</li>
<li>Finish the wizard. Then click <strong>Test Connection</strong> on the DSN Main UI (the wizard does not run Test Connection).</li><li>Done. You can query from C#, Python, PowerShell, and ODBC apps.</li>
</ol>]]>
            </Notes>
        </Auth>
    </Auths>

    <Examples>
        <Example Default="True" Group="ODBC" Slug="list-customer-master-data" Label="List customer master data">
            <Desc><![CDATA[<p>Returns customer master data from the Data Lake (e.g. <code>RCM</code> in Infor ERP LX / BPCS). Uses <code>infor.lastmodified()</code> for incremental extracts in Power BI or ADF.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT
  "RCM"."CCUST" AS "CustomerNumber",
  "RCM"."CNAME" AS "CustomerName",
  "RCM"."CSTAT" AS "CustomerStatus"
FROM "default"."RCM"
WHERE infor.lastmodified() >= '2026-02-01T00:00:00.000Z']]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="list-order-headers" Label="List order headers">
            <Desc><![CDATA[<p>Returns sales order headers from <code>ECH</code>. Limits to the most recent 100 orders.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT
  "HORD",
  "HCUST",
  "HEDTE"
FROM "default"."ECH"
ORDER BY infor.lastmodified() DESC
LIMIT 100]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="list-item-master-data" Label="List item master data">
            <Desc><![CDATA[<p>Returns item master from <code>IIM</code>. Filters by load date using <code>infor.lastmodified()</code>.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT
  "IPROD",
  "IDESC",
  "ITYPE"
FROM "default"."IIM"
WHERE infor.lastmodified() >= '2026-01-01T00:00:00.000Z']]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="join-order-headers-lines-and-item-master" Label="Join order headers, lines, and item master">
            <Desc><![CDATA[<p>Joins ECH, ECL, and IIM for a combined sales extract. Use in a SQL Server Linked Server view or Crystal Reports.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT
  "ECH"."HORD" AS "OrderNumber",
  "ECH"."HCUST" AS "CustomerNumber",
  "ECL"."LPROD" AS "ItemNumber",
  "IIM"."IDESC" AS "ItemDescription",
  "ECL"."LQORD" AS "QuantityOrdered",
  "ECL"."LPRIC" AS "UnitPrice"
FROM "default"."ECH" "ECH"
JOIN "default"."ECL" "ECL"
  ON "ECH"."HORD" = "ECL"."LORD"
JOIN "default"."IIM" "IIM"
  ON "ECL"."LPROD" = "IIM"."IPROD"
WHERE infor.lastmodified('ECH') >= '2026-02-01T00:00:00.000Z']]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="count-customers" Label="Count customers">
            <Desc><![CDATA[<p>Counts rows in <code>RCM</code>. Simple SSRS scalar.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT COUNT(*) AS customer_count FROM "default"."RCM"]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="filter-customer-status" Label="Filter customers by status">
            <Desc><![CDATA[<p>Returns active-looking customer rows. Replace the status literal with your catalog value.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT "CCUST", "CNAME", "CSTAT"
FROM "default"."RCM"
WHERE "CSTAT" = 'A']]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="select-customer-columns" Label="Select specific customer columns">
            <Desc><![CDATA[<p>Column list instead of star. Prefer this in Linked Server views.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT "CCUST", "CNAME" FROM "default"."RCM"]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="recent-items" Label="Recent item master rows">
            <Desc><![CDATA[<p>Most recently loaded items. Useful Excel preview.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT "IPROD", "IDESC", "ITYPE"
FROM "default"."IIM"
ORDER BY infor.lastmodified() DESC
LIMIT 100]]>
            </Code>
        </Example>
    </Examples>
</ApiConfig>
