Documentation / Product / Integrations / Microsoft Azure

Microsoft Azure: Import SQL Table

Azure SQL Database is an intelligent, scalable, relational database service built for the cloud. By connecting Lytics directly to your Azure SQL instance, you can easily import full tables of audience and activity data to leverage Lytics' segmentation and insights.

Integration Details

This integration ingests data from your Azure SQL Database by directly querying the table selected during configuration. Once started, the job will:

  1. Run a query to select and order the rows that have yet to be imported. If the import is continuous, the job will save the timestamp of the last row seen, and only the most recent data will be imported during future runs. To ensure consistent ordering of records and to improve performance for batch ingestion, the result of this query will be written to a Local Temporary Table of the format #TMP_{UUID}_{TIMESTAMP}, where UUID is a unique identifier associated with the job and TIMESTAMP is the unix timestamp marking the start of the current run, in nanoseconds. This table is only visible in the current session, and is automatically dropped when the batch ingestion completes. For more information, see the Temporary Tables section here.

  2. Once the initial query completes, the result set will be imported from the temporary table in batches, starting from the oldest row.

  3. Once the last row is imported, if the job is configured to run continuously, it will sleep until the next run. The time between runs can be selected during configuration.


Fields imported through Azure SQL will require custom data mapping. For assistance mapping your custom data to Lytics user fields, please contact Lytics Support.


Follow these steps to set up and configure an Azure SQL import job for Microsoft Azure in the Lytics platform. If you are new to creating jobs in Lytics, see the Jobs Dashboard documentation for more information.

  1. Select Microsoft Azure from the list of providers.
  2. Select Azure SQL Import from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Complete the configuration steps for your job. azuresql configuration
  7. From the Table input, select the table to import data from.
  8. From the Timestamp Column input, select the timestamp column to order the events. This column is also used to determine updated rows when running continuously.
  9. (Optional) From the Record Timestamp Column input, select the timestamp column to use as event timestamps, if left blank the Timestamp Column will be used.
  10. (Optional) In the Since Timestamp text box, enter the earliest timestamp to import records from; only records with a Timestamp Column after this date will be imported. Use yyyy-mm-dd HH:MM:SS UTC format.
  11. (Optional) In the Stream Override text box, enter the data stream name you want to add data to. If the data stream does not exist, it will be created. If left blank the data will go to the azuresql_activity stream.
  12. (Optional) Select the Keep Updated checkbox to repeatedly run this import on a schedule.
  13. (Optional) From the Import Frequency input, choose how often a repeated import should run.
  14. (Optional) From the Time of Day input, select time of day to start import.
  15. (Optional) From the Timezone input, select timezone for time of day.
  16. (Optional) In the Query Timeout numeric field, enter the maximum time a query is allowed to run in minutes.
  17. Click Start Import.