Adding Flat File

Last updated: 2024-09-08 23:05:36

Generally, data is stored in many different data storage systems, and you need to extract data from these data sources, transform it, and load it into one or multiple objects. The SSIS feature of TencentDB for SQL Server supports flat files. If your SSIS project involves a flat file, you need to deploy it to a business intelligence server first before deploying the project.
Note
If your SSIS project doesn't involve flat files, you can skip this step.
This document describes how to use the SSIS management feature to add and deploy a flat file for easier data use and management.

Operation step

1. Log in to SQL Server Console.
2. In the instance list, find the required Business Intelligence server instance, click its Instance ID or the Manage option in the action column to enter the instance management page.


3. On the instance management page, select SSIS Management > Add File.


4. In the Add File window, paste the COS source file link, click OK.


Note
Flat files need to be uploaded to COS in order to obtain the COS source file link for uploading, thus deploying the flat files to the Business Intelligence server.
Using Tencent Cloud COS, the COS source file link can be obtained. Please note that the COS object's access permissions need to be set to Public Read/Private Write, otherwise the deployment of the flat file will not be successful. For operational guidance, please refer to Appendix 1.
Only flat files in .txt, .csv, .xlsx, or .xls format are supported. The filename must start with a letter and can contain only digits, letters, underscores, and hyphens.
5. After successfully adding a flat file, you can check the file information in the list, including the file name, file size, file path, status, and operations (Delete, Copy MD5).
File Name: Name of the flat file.
File Size: Size of the flat file. A flat file uses the disk space of the business intelligence server.
File Path: Displays the path of the flat file, which is fixed as "D:\SSIS\FlatFileName". You need to fill in this path when deploying the SSIS project.
Status:Displays the deployment status of flat files, including successful deployment, in process, and failed deployment. If the deployment is successful, it means the flat file has been successfully deployed to the Business Intelligence server and the SSIS project containing the flat file can be deployed. If the deployment fails, please check whether the COS object's access permissions have been set to Public Read/Private Write.
Operation (Delete): You can delete the flat file uploaded to the business intelligence server.
Operation (Copy MD5): Used to verify whether the flat file uploaded to the Business Intelligence server matches the content in the local flat file, click Copy MD5 to obtain the file's password, and compare it with the local file. 

Appendix 1

Below we will introduce how to upload flat files (with extensions like txt, csv, xlsx, xls) to COS, and then obtain the COS source file link.
Step 1: Create a bucket
1. Log in to the COS Console.
2. In the left-side navigation, click bucket list to enter the bucket list page.
3. Click Create Bucket.
4. In the pop-up Create Bucket dialog box, configure the settings as needed, verify the information, and then click Create to create the bucket.
Step 2: Upload an Object
1. Log in to the COS Console.
2. In the left sidebar, click Bucket List to go to the bucket list page.
3. Click the bucket where you want to store objects to enter its file list page.
4. In the file list, click Upload File.
5. In the pop-up window, click Select File or Select Folder. Depending on your needs, select one or more local files (or folders), then Set Object Attributes, choose Public Read Private Write for access permissions, and finally click Upload.
Note
Since some browsers do not support uploading multiple files, we recommend you use popular browsers such as Internet Explorer 10 or later, Firefox, or Chrome.

Step 3: Get the COS Source File Link
1. Log in to the COS Console.
2. In the left sidebar, click Bucket List to go to the bucket list page.
3. Click the bucket that contains the target file to enter its file list page.
4. Find the file for which you need the COS source file link and click Details in the action column.
5. Under Basic Information, after Object Address, click the copy icon to get the COS source file link for that file.