flat-file

SSIS mysterious error

点点圈 提交于 2019-12-18 05:37:35
问题 I got only these 2 errors when converting flat files to database tables. The dataflow seems to work for other flat files with the same layout so I don't understand where these errors could come from. [Flat File Source [204]] Error: An error occurred while skipping data rows. [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202091. The component returned a failure code when the pipeline engine called PrimeOutput(

SSIS - Flat file always ANSI never UTF-8 encoded

不想你离开。 提交于 2019-12-17 18:29:22
问题 Have a pretty straight forward SSIS package: OLE DB Source to get data via a view, (all string columns in db table nvarchar or nchar). Derived Column to format existing date and add it on to the dataset, (data type DT_WSTR). Multicast task to split the dataset between: OLE DB Command to update rows as "processed". Flat file destination - the connection manager of which is set to Code Page 65001 UTF-8 and Unicode is unchecked. All string columns map to DT_WSTR. Everytime I run this package an

Output SQL query results to flat-file with Java

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 04:05:03
问题 Is there an easy or straightforward way in Java to output the results of a DB Query to a file (either csv, tab, etc). Perhaps even in Hibernate? I know that a query results can be dumped to a flat file on the DB Server. I am looking for a way that an application can run a query and get those results into a file. I realize one option is to just iterate over the result set and output the records one row at a time separating with a delimiter. But if there is a built in way, or a Hibernate way -

How to traverse multiple folders & multiple files & dump data to SQL tables with same filename? SSIS

久未见 提交于 2019-12-14 03:53:08
问题 This will be a bit of an update from the question I asked here before. I need to traverse folders & dump txt files to SQL tables with the same name (barring the .txt extension) My folder/file structure is setup as shown below Now the FileA,B,C are consistent throughout all the folders & there happens to be a [dbo].[FileA],[dbo].[FileB],[dbo].[FileC] etc sitting on the server. So Data1 Folder will have FileA,FileB...FileZ & so will Data200 Folder. The goal is to traverse through all the

Unpivot data excel with merged column using SSIS

我怕爱的太早我们不能终老 提交于 2019-12-14 02:36:50
问题 I'm using SSIS to export from Excel to text and in my case, I need to export where the file contains merged columns anyone can help or have suggest for my case? Input Excel A B C D E +-------------+-----------------+-----------------+ | Shop Name | Monday | Tuesday | | +---------+-------+---------+-------+ | | Jackson | Steve | Jackson | Steve | +-------------+---------+-------+---------+-------+ | 7Eleven | 11 | 30 | 23 | 21 | +-------------+---------+-------+---------+-------+ | Delta Shop

Split Flat Files into smaller files (on row count) using Custom Pipeline

扶醉桌前 提交于 2019-12-14 01:49:17
问题 I am trying to create a custom pipeline component for BizTalk 2010 that splits an incoming flat file into multiple smaller files. I want to split the file (lets say of ~30 000 rows) into files of about 5000 rows each or a bit less (lets say if the file includes 33 000 rows). I have tried using Selvan's great example of a custom dissassembly pipeline to no avail. I have used the Pipeline Component Wizard to generate a pipeline skeleton, but would be very happy with any tips or pointers on how

Backspace delimited flat files

梦想的初衷 提交于 2019-12-13 19:42:25
问题 Has any one ever seen a backspace delimited flat file? My requirement is to parse such a file but I am not able to put a backspace character into a file to check if I am able to detect it. 回答1: Splitting shouldn't be any harder than using any other delimiter. It's just another character, after all. In Python, for instance: >>> x = "apples\bbanana\bcoconut\bthese are delicious!" >>> x.split('\b') ['apples', 'banana', 'coconut', 'these are delicious!'] Most languages use \b as the escape

SSIS package .csv to .xlsx need to overwrite instead of adding data

隐身守侯 提交于 2019-12-13 08:39:59
问题 I have an SSIS package that converts a .csv file into an .xlsx file before being loaded into SQL. Is there a way to have a process that overwrites the current .xlsx file instead of adding data into the .xlsx that currently exists? 来源: https://stackoverflow.com/questions/34180563/ssis-package-csv-to-xlsx-need-to-overwrite-instead-of-adding-data

Why won't Strawberry Perl remove these form feed characters?

柔情痞子 提交于 2019-12-13 05:17:46
问题 I'm currently running Strawberry Perl on WinXP, and I'm trying to process a unix-formatted flat file. The flat file uses line feed characters to delimit fields, and form feed characters to delimit a record. I am trying to convert the FF to anything else (CRLF, ';', TAB, etc). I have tried using the following perl one-liners with no success: perl -p -e 's/\f/\r\n/g' < unix.txt > dos.txt perl -p -e 's/\x0c/\x0d\x0a/g' < unix.txt > dos.txt perl -p -e 's/\f/\t/g' < unix.txt > dos.txt The only

Working code to import tab delimited txt file with more than 255 fields into two Access Tables

耗尽温柔 提交于 2019-12-13 04:32:34
问题 This code below will import a tab delimited file with over 255 fields into two tables. Just make sure when you design your two tables all your fields have the correct data types for the fields being imported. I originally created my tables by using Access import text file wizard. Before using the wizard I deleted the fields after 255 to create the first table and then deleted the first 255 to create the second table. Hopes this helps someone and thanks to everyone below who helped me with