Articles in this section

Create a sync to Microsoft SQL

Configure Microsoft SQL as your Celigo sync destination. This article covers the destination settings specific to Microsoft SQL, how the sync names your destination tables, and the Celigo-to-Microsoft SQL data type mapping, system columns, and reserved words.

Create a data ingestion sync

Follow the instructions in Create a data ingestion sync to create a sync and configure your source application.

Set up Microsoft SQL as your destination

  1. Select Microsoft SQL as the destination that will ingest and store all source data from the sync.
  2. Choose an established connection (Cloud mode is recommended), or select Create connection to create a new one (see Create a connection to an application).

    Caution

    Avoid sharing connections with flows scheduled at the same time, as running them simultaneously can reduce performance.

  3. Name your destination schema - Celigo creates a schema based on the objects, exports, and fields you selected when configuring the source application. The login your connection uses needs permission to create the schema and tables; see Database permissions for data ingestion syncs. Give the schema a meaningful name to help you identify the destination tables that correspond to it later.

    Note

    This schema is for use only with this sync. Be careful when entering its name — you can't change it after you save and run the sync.

This sync creates destination tables using the following naming structure: <database>.<schema>.<table>

  • <database> - The database configured on your selected connection.
  • <schema> - The schema name you specified.
  • <table> - The specific object, export name, or custom table name selected for sync.

Define sync settings

Name and describe your sync and choose whether to receive email notifications (see Edit or view a sync's settings). Next, decide how often the sync should run (see Schedule and run a sync for the full set of scheduling options).

What happens next

After you save your sync's settings, the wizard is complete and you're returned to the sync's dashboard. The dashboard shows a "Ready to run" state — your sync is active, but hasn't loaded any data yet. Select Run to trigger the first run yourself, or wait for its next scheduled run.

While your sync is active, don't drop, rename, or recreate the tables or schemas it creates in the destination. If a table is missing, every later run fails at Transform with a "table not found" error, and a full resync doesn't recreate it. For recovery steps, see What happens next in Create a data ingestion sync.

Data type mapping

The data types sent to or inferred by Celigo syncs are transferred to Microsoft SQL as follows (see Understand how data types are inferred for what each Celigo data type represents):

Celigo data type Microsoft SQL data type
SHORT BIGINT
INTEGER BIGINT
LONG BIGINT
NUMERIC BIGINT
NUMERICDECIMAL DECIMAL
NUMERICFLOAT FLOAT
FLOAT FLOAT
DOUBLE FLOAT
NUMBER DECIMAL(p,s)
DECIMAL DECIMAL(p,s)
STRING
NVARCHAR(n) or NVARCHAR(MAX)
BINARY VARBINARY
BOOLEAN BIT
DATE DATE
TIME TIME
TIMETZ TIME
DATETIMENTZ DATETIME2
TIMESTAMP_NTZ DATETIME2
DATETIMETZ
DATETIMEOFFSET
DATETIMELTZ
DATETIMEOFFSET
TIMESTAMP_LTZ
DATETIMEOFFSET
TIMESTAMP_TZ
DATETIMEOFFSET
ARRAY
NVARCHAR(MAX)
OBJECT
NVARCHAR(MAX)
VARIANT
NVARCHAR(MAX)
DEFAULT (any unmapped type)
NVARCHAR(MAX)

A few mappings depend on the source field:

  • Text — Values up to 4,000 characters use NVARCHAR(n); longer or unsized text uses NVARCHAR(MAX). Primary key columns are NVARCHAR(450).
  • Decimals — The column uses the source field’s precision and scale, with precision capped at 38. A field with no precision becomes DECIMAL(38,0).
  • Time zones — TIME columns don’t store a time zone, so a TIMETZ value loses its offset.

Every table a Microsoft SQL sync creates also includes three Celigo-managed system columns:

Column Microsoft SQL data type
_celigo_extracted_at
DATETIMEOFFSET
_celigo_loaded_at
DATETIMEOFFSET
_celigo_deleted BIT

Microsoft SQL reserved words

Celigo sync automatically manages Microsoft SQL Server (T-SQL) reserved words when creating or updating destination tables to prevent naming conflicts. You can use these keywords freely in your source data. The sync adds a trailing underscore to the destination name, so a field named user becomes user_. Names keep their case and can be up to 128 characters.

The following keywords are reserved for both table and column identifiers in Microsoft SQL Server (T-SQL):

Reserved keywords
A ADD, ALL, ALTER, AND, ANY, AS, ASC, AUTHORIZATION
B BACKUP, BEGIN, BETWEEN, BREAK, BROWSE, BULK, BY
C CASCADE, CASE, CHECK, CHECKPOINT, CLOSE, CLUSTERED, COALESCE, COLLATE, COLUMN, COMMIT, COMPUTE, CONSTRAINT, CONTAINS, CONTAINSTABLE, CONTINUE, CONVERT, CREATE, CROSS, CURRENT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURSOR
D DATABASE, DBCC, DEALLOCATE, DECLARE, DEFAULT, DELETE, DENY, DESC, DISK, DISTINCT, DISTRIBUTED, DOUBLE, DROP, DUMP
E ELSE, END, ERRLVL, ESCAPE, EXCEPT, EXEC, EXECUTE, EXISTS, EXIT, EXTERNAL
F FETCH, FILE, FILLFACTOR, FOR, FOREIGN, FREETEXT, FREETEXTTABLE, FROM, FULL, FUNCTION
G GOTO, GRANT, GROUP
H HAVING, HOLDLOCK
I IDENTITY, IDENTITYCOL, IDENTITY_INSERT, IF, IN, INDEX, INNER, INSERT, INTERSECT, INTO, IS
J JOIN
K KEY, KILL
L LEFT, LIKE, LINENO, LOAD
M MERGE
N NATIONAL, NOCHECK, NONCLUSTERED, NOT, NULL, NULLIF
O OF, OFF, OFFSETS, ON, OPEN, OPENDATASOURCE, OPENQUERY, OPENROWSET, OPENXML, OPTION, OR, ORDER, OUTER, OVER
P PERCENT, PIVOT, PLAN, PRECISION, PRIMARY, PRINT, PROC, PROCEDURE, PUBLIC
R RAISERROR, READ, READTEXT, RECONFIGURE, REFERENCES, REPLICATION, RESTORE, RESTRICT, RETURN, REVERT, REVOKE, RIGHT, ROLLBACK, ROWCOUNT, ROWGUIDCOL, RULE
S SAVE, SCHEMA, SECURITYAUDIT, SELECT, SEMANTICKEYPHRASETABLE, SEMANTICSIMILARITYDETAILSTABLE, SEMANTICSIMILARITYTABLE, SESSION_USER, SET, SETUSER, SHUTDOWN, SOME, STATISTICS, SYSTEM_USER
T TABLE, TABLESAMPLE, TEXTSIZE, THEN, TO, TOP, TRAN, TRANSACTION, TRIGGER, TRUNCATE, TRY_CONVERT, TSEQUAL
U UNION, UNIQUE, UNPIVOT, UPDATE, UPDATETEXT, USE, USER
V VALUES, VARYING, VIEW
W WAITFOR, WHEN, WHERE, WHILE, WITH, WRITETEXT

Learn more