Introduction
In this article, you will learn how to import datetime attributes from your Data Warehouses into MoEngage correctly. This will help you build your segmentation queries accurately, resulting in more personalized targeting and analytics.
Step 1: Prepare Your Data
Refer to this document for information on preparing your data according to the expected formats of MoEngage. This section provides the full list of supported datetime formats.
Step 2: Upload a Sample File
For your attribute(s) to be correctly imported as datetime, you must inform MoEngage of the Allowed Datetime types for these attributes. Begin with creating a sample .csv file that contains the following columns:
Table
Column Name | Value |
---|---|
id |
A sample User ID. Ensure that you provide a unique user identifier. |
<attribute_name> |
A sample value of your attribute. |
<attribute_name> |
A sample value of your attribute. |
info |
Information Add a new column for each of your datetime attributes. A single row with a dummy User ID is sufficient. |
Example Use Case
In this example, we will import the following attributes of type datetime:
-
my_birthday
with the formatYYYY-MM-DD
-
my_order_time
with the formatYYYY-MM-DD hh:mm:ss
-
my_user_creation_time
with the formatYYYY-MM-DDThh:mm:ssTZD
You can download the sample file for this example to follow along.
Step 3: Upload the Sample File
After you have a sample file ready with all your datetime attributes and their expected formats:
- On the left navigation menu in the MoEngage dashboard, click Segments, and then click User Imports.
- Click Import users to get started.
- In the Import name box, type an identifiable name for your import.
- Under Select user type, select Registered users.
- Select your sample file. Click Preview file to see if we correctly read all your data.
- Click Next to proceed to the mapping.
- Mark the first column as your User identifier.
- For each of your datetime attributes, click + Create new attribute from the list to add it as a new attribute in MoEngage.
- In the Data type list, select Date time and in the Date time format list, select the correct datetime format. We will attempt to auto-capture these for you.
- After you have created all your attributes and marked their types, you are ready to import these.
- Click Next to proceed.
- Select the import frequency as As soon as possible and schedule the import.
- We will upload the file and attempt to import it.
Step 4: Pin the Data Types of These Attributes
info |
Note Only Admins of your accounts can execute actions like changing status, visibility, allowed data types, readable names, and descriptions. |
After your import is complete:.
- On the left navigation menu in the MoEngage dashboard, click Segments and then click Data Management.
- Perform the steps in this document to set allowed data types for these newly created attributes.
- Ensure that you select datetime for each of the attributes. You need to perform these for both User Attributes and Event Attributes.
- After you pinned the correct data types for each attribute, they will be correctly ingested as datetime into MoEngage.
Step 5: Import Your Data
You are now ready to import your data into MoEngage. Ensure that you map the newly created attributes to their respective columns.