- Activate the feature: In the selected project’s configuration, go in the section labeled Use Databricks as a source to enable the feature.

- Create Data Ingestion Tasks: With the feature activated, click Add new task to create a Data Ingestion Task.

- Validate: After providing the required information for the Data Ingestion Task, click Confirm to create the task. You can create additional tasks by repeating the steps of naming the task, defining the SQL query, and setting the frequency. Once you’ve configured your tasks, click Validate to save and apply your configuration settings.
- Create custom data: Now that you created your Data Ingestion Task, Kameleoon’s servers will start collecting the data based on the frequency you configured by executing the query on your Databricks instance. To start using the collected data, you need to create custom data.
- Create a segment: The last step to target users based on the collected data is to create a segment based on the custom data you created.
Data Ingestion Tasks
Each Data Ingestion Task runs one SQL query against your Databricks tables at the frequency you set. The task’s results are available as custom data, which you use in a segment to target visitors in your Kameleoon campaigns. Kameleoon keeps a visitor in the audience for 1 year after the sync that put them there. If a sync fails, the audience keeps the membership from the last successful sync until a later sync succeeds. Once you have created your Data Ingestion Task, Kameleoon starts polling your warehouse, and the data is available right away for targeting your users in Kameleoon campaigns. You can use the polled data through Kameleoon’s Activation API for web experiments and through Kameleoon’s SDKs for Feature Experimentation.Creating a Data Ingestion Task
To create a Data Ingestion Task:- Click Add new task.

- Complete the form:
- Name (Required): Give your task a unique and descriptive name to identify its purpose.
- Frequency (Required): Specify how often you want the task to run and retrieve data from Databricks (for example, per day).
- Databricks Catalog (Required): Provide the name of the Databricks “catalog” that contains the schemas you wish Kameleoon to read from (the top level folder).
- Schema (Required): Provide the schema containing the tables this ingestion task will query from (for example,
user_data). - Query (Required): Provide the SQL query that retrieves the audience from your Databricks database. The query must follow this specific format:
SELECT visitor_id, attribute_1, ..., attribute_N FROM your_events_table

attribute_fields: These are optional, and you can use them for advanced targeting scenarios. For these advanced use cases, see Target your imported audiences.visitor_id: This column represents the unique identifier for your visitors.

Guidelines
Column naming
Column names can only contain letters (uppercase or lowercase), numbers, and underscores (_). They can’t start with a number.
Column order
The columns must appear in the exact order specified (visitor_id, followed by optional attributes) for the integration to function correctly.
Ingestion Task ID
The task list shows each task as its ID followed by its name, for example543 Attributes. The Ingestion Task ID is only the number (543). The name (Attributes) isn’t part of it. Use this number as taskId when you target imported audiences by attributes.
Run your query before ingestion
Before saving your ingestion task, you can test your query directly in Kameleoon. Testing allows you to:- Verify the connection in real time.
- Confirm your credentials and access rights are correct, which helps detect issues immediately, without having to wait for the first data import.
- Validate your data’s structure and accessibility.
Updating a Data Ingestion Task
To update a Data Ingestion Task:- Select the task: Begin by selecting the specific Data Ingestion Task you want to edit from the dropdown menu.

- Edit task details: Modify the fields you want to update, such as the task’s name, frequency, Databricks Catalog, Schema, or query.

- Confirm changes: After making the necessary updates, click Confirm to save the changes to the Data Ingestion Task.
Deleting a Data Ingestion Task
To delete a Data Ingestion Task:
- Select the task: Choose the Data Ingestion Task you wish to delete from the dropdown menu.

- Initiate deletion: Click the delete icon located in the top-right of the Edit form.
- Confirm deletion: A confirmation prompt will appear. Click Confirm to delete the selected Data Ingestion Task.