Skip to main content

MSSQL connection

This page describes how to use and configure a connection to Microsoft SQL Server (MSSQL) in Prophecy. MSSQL is a relational database used for storing and querying structured data.

Prerequisites

Prophecy connects to Microsoft SQL Server (MSSQL) using the database credentials you provide. These credentials are used to authenticate your session and authorize all data operations during pipeline execution. To use an MSSQL connection effectively, your user account must have:

  • SELECT, INSERT, UPDATE, and DELETE on the tables used in your Prophecy pipelines.
  • Access to the database and schema where tables are located.

Feature support

The table below outlines whether the connection supports certain Prophecy features.

FeatureSupported
Read data with a Source gemYes
Write data with a Target gemYes
Browse data in the Environment browserYes

Connection parameters

To create a connection with Microsoft SQL Server, enter the following parameters:

ParameterDescription
Connection NameName to identify your connection
ServerAddress of the server to connect to
PortPort to use for the connection
UsernameUsername for your MSSQL Server instance
Password (Secret required)Password for your MSSQL Server instance

Data type mapping

When Prophecy processes data from Microsoft SQL Server (MSSQL) using SQL warehouses, it converts MSSQL-specific data types to formats compatible with your target warehouse. This table shows how MSSQL data types are transformed for Databricks and BigQuery.

MSSQLDatabricksBigQuery
tinyintINT
Alias: Integer
INT64
Alias: Integer
smallintINT
Alias: Integer
INT64
Alias: Integer
intINT
Alias: Integer
INT64
Alias: Integer
bigintBIGINT
Alias: Bigint
INT64
Alias: Integer
float / realDOUBLE
Alias: Double
FLOAT64
Alias: Float
decimalDOUBLE
Alias: Double
FLOAT64
Alias: Float
numericDOUBLE
Alias: Double
FLOAT64
Alias: Float
moneyDOUBLE
Alias: Double
FLOAT64
Alias: Float
smallmoneyDOUBLE
Alias: Double
FLOAT64
Alias: Float
bitBOOLEAN
Alias: Boolean
BOOL
Alias: Boolean
charSTRING
Alias: String
STRING
Alias: String
varcharSTRING
Alias: String
STRING
Alias: String
textSTRING
Alias: String
STRING
Alias: String
ncharSTRING
Alias: String
STRING
Alias: String
nvarcharSTRING
Alias: String
STRING
Alias: String
ntextSTRING
Alias: String
STRING
Alias: String
xmlSTRING
Alias: String
STRING
Alias: String
dateTIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
timeTIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
datetimeTIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
datetime2TIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
smalldatetimeTIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
datetimeoffsetTIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
rowversionTIMESTAMP
Alias: Timestamp
TIMESTAMP
Alias: Timestamp
binaryBINARY
Alias: Binary
BYTES
Alias: Bytes
varbinaryBINARY
Alias: Binary
BYTES
Alias: Bytes
imageBINARY
Alias: Binary
BYTES
Alias: Bytes
uniqueidentifierBINARY
Alias: Binary
BYTES
Alias: Bytes
sql_variantBINARY
Alias: Binary
BYTES
Alias: Bytes
geometryBINARY
Alias: Binary
BYTES
Alias: Bytes
geographyBINARY
Alias: Binary
BYTES
Alias: Bytes
hierarchyidBINARY
Alias: Binary
BYTES
Alias: Bytes
info

Learn more in Supported data types.

Sharing connections within teams

Connections in Prophecy are stored within fabrics, which are assigned to specific teams. Once a MSSQL connection is added to a fabric, all team members who have access to the fabric can use the connection in their projects. No additional authentication is required—team members automatically inherit the access and permissions of the stored connection credentials.

caution

Be mindful of the access level granted by the stored credentials. Anyone on the team will have the same permissions—including access to sensitive data if allowed.

To manage this securely, consider creating a dedicated fabric and team for high-sensitivity connections. This way, only approved users have access to those credentials.

Fetching data

Prophecy fetches data from MSSQL connections in the following ways:

  • When you browse a MSSQL connection in the Environment browser, Prophecy fetches data on demand as you expand folders. You can manually refresh the Environment browser to see updated files.

  • When a pipeline runs, Source gems will read the latest available version of the data. If the schema of your data in MSSQL changes, Prophecy will automatically use the new schema.