How do I create a custom datasource in AIV?

Modified on Tue, 15 Oct, 2024 at 8:25 AM

To create a custom datasource in AIV, follow these steps:

  1. Create a Java Project: Set up a new Java project in your preferred Integrated Development Environment (IDE).

  2. Include External JAR: Add the required external JAR file to the project's /lib folder.

  3. Create the Custom Class: Create a class named Exds and implement the CustomData interface.

  4. Override Unimplemented Methods: Implement the three methods from the CustomData interface:

    javaCopy code
    public interface CustomData { public List<Map<String, Object>> getData(Map<String, Object> detailsIN, String addInfoIN); public List<Map<String, Object>> getMetaData(Map<String, Object> detailsIN, String addInfoIN); public String testConnection(Map<String, Object> detailsIN, String addInfoIN); }
    • getData: Implement logic to fetch data from external sources, such as databases or files.
    • getMetaData: Implement logic to retrieve metadata related to tables, columns, data types, etc.
    • testConnection: Implement logic to verify if the connection to the data source is successful.

  5. Create a Custom Datasource in AIV: In the AIV application, navigate to the Datasource section and create a new custom datasource, providing the full class name of your implementation (e.g., com.externalds.Exds).

  6. Test the Connection: Ensure the connection is established successfully by clicking Test Connection, then save the datasource.

  7. Create a Dataset: Use the custom datasource to create a dataset. Click on Metadata and Preview to verify that everything is working as expected.

    For more information, visit our documentation at AIV Custom Datasource Guide or contact us at support@aivhub.com.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article