Snowflake is a leading cloud data warehouse and a popular backbone for enterprise BI, analytics, data management, and governance initiatives. Snowflake offers features such as data sharing, real-time data processing, and secure data storage which makes it a common choice for cloud data consolidation.
The CData SSIS Components enhance SQL Server Integration Services by enabling users to easily import and export data from various sources and destinations.
In this article, we explore the data type mapping considerations when exporting to Snowflake and walk through how to migrate Odoo data to Snowflake using the CData SSIS Components for Odoo and Snowflake.
Data Type Mapping
| Snowflake Schema |
CData Schema |
|
NUMBER, DECIMAL, NUMERIC, INT, INTEGER, BIGINT, SMALLINT, TINYINT, BYTEINT
|
decimal
|
|
DOUBLE, FLOAT, FLOAT4, FLOAT8, DOUBLEPRECISION, REAL
|
real
|
|
VARCHAR, CHAR, STRING, TEXT, VARIANT, OBJECT, ARRAY, GEOGRAPHY
|
varchar
|
|
BINARY, VARBINARY
|
binary
|
|
BOOLEAN
|
bool
|
|
DATE
|
date
|
|
DATETIME, TIMESTAMP, TIMESTAMP_LTZ, TIMESTAMP_NTZ, TIMESTAMP_TZ
|
datetime
|
|
TIME
|
time
|
Special Considerations
About Odoo Data Integration
Accessing and integrating live data from Odoo has never been easier with CData. Customers rely on CData connectivity to:
- Access live data from both Odoo API 8.0+ and Odoo.sh Cloud ERP.
-
Extend the native Odoo features with intelligent handling of many-to-one, one-to-many, and many-to-many data properties. CData's connectivity solutions also intelligently handle complex data properties within Odoo. In addition to columns with simple values like text and dates, there are also columns that contain multiple values on each row. The driver decodes these kinds of values differently, depending upon the type of column the value comes from:
- Many-to-one columns are references to a single row within another model. Within CData solutions, many-to-one columns are represented as integers, whose value is the ID to which they refer in the other model.
- Many-to-many columns are references to many rows within another model. Within CData solutions, many-to-many columns are represented as text containing a comma-separated list of integers. Each value in that list is the ID of a row that is being referenced.
- One-to-many columns are references to many rows within another model - they are similar to many-to-many columns (comma-separated lists of integers), except that each row in the referenced model must belong to only one in the main model.
- Use SQL stored procedures to call server-side RFCs within Odoo.
Users frequently integrate Odoo with analytics tools such as Power BI and Qlik Sense, and leverage our tools to replicate Odoo data to databases or data warehouses.
Getting Started
Prerequisites
Create the project and add components
-
Open Visual Studio and create a new Integration Services Project.
๐ Create the SSIS project
-
Add a new Data Flow Task to the Control Flow screen and open the Data Flow Task.
-
Add a CData Odoo Source control and a CData Snowflake Destination control to the data flow task.
๐ Add the source and destination controls (Salesforce is shown)
Configure the Odoo source
Follow the steps below to specify properties required to connect to Odoo.
-
Double-click the CData Odoo Source to open the source component editor and add a new connection.
๐ Open the source component editor (Salesforce is shown)
-
In the CData Odoo Connection Manager, configure the connection properties, then test and save the connection.
To connect, set the Url to a valid Odoo site, User and Password to the connection details of the user you are connecting with, and Database to the Odoo database.
๐ Configure the source connection (Salesforce is shown)
-
After saving the connection, select "Table or view" and select the table or view to export into Snowflake, then close the CData Odoo Source Editor.
๐ Select the table to export (Salesforce is shown)
Configure the Snowflake destination
With the Odoo Source configured, we can configure the Snowflake connection and map the columns.
-
Double-click the CData Snowflake Destination to open the destination component editor and add a new connection.
๐ Open the destination component editor
-
In the CData Snowflake Connection Manager, configure the connection properties, then test and save the connection.
-
The component supports Snowflake user authentication, federated authentication, and SSL client authentication. To authenticate, set User and Password, and select the authentication method in the AuthScheme property. Starting with accounts created using Snowflakeโs bundle 2024_08 (October 2024), password-based authentication is no longer supported due to security concerns. Instead, use alternative authentication methods such as OAuth or Private Key authentication.
Other helpful connection properties
-
QueryPassthrough: When this is set to True, queries are passed through directly to Snowflake.
-
ConvertDateTimetoGMT: When this is set to True, the components will convert date-time values to GMT, instead of the local time of the machine.
-
IgnoreCase: A session parameter that specifies whether Snowflake will treat identifiers as case sensitive. Default: false(case is sensitive).
-
BindingType: There are two kinds of binding types: DEFAULT and TEXT. DEFAULT uses the binding type DATE for the Date type, TIME for the Time type, and TIMESTAMP_* for the Timestamp_* type. TEST uses the binding type TEXT for Date, Time, and Timestamp_* types.
๐ Configure the destination connection
-
After saving the connection, select a table in the Use a Table menu and in the Action menu, select Insert.
๐ Choose the destination table
-
On the Column Mappings tab, configure the mappings from the input columns to the destination columns.
๐ Map the columns (Salesforce is shown)
Run the project
You can now run the project. After the SSIS Task has finished executing, data from your SQL table will be exported to the chosen table.