Questions tagged [flat-file]

A flat-file database model is any system using a single file for storage with one record per line, usually plain-text or text mixed with binary data.

A "flat file" is a plain text or mixed text and binary file which usually contains one record per line or 'physical' record (example on disc or tape). Within such a record, the single fields can be separated by delimiters, e.g. commas, or have a fixed length. In the latter case, padding may be needed to achieve this length. Extra formatting may be needed to avoid delimiter collision. There are no structural relationships between the records.

Typical examples of flat files are /etc/passwd and /etc/group on Unix-like operating systems. Another example of a flat file is a name-and-address list with the fields Name, Address, and Phone Number.

Source: Wikipedia (Flat file database)

830 questions
2
votes
2 answers

Insert date while importing a flat file into SQL Server table

I'm trying to import a flat file into SQL Server table using SSIS package. This package is scheduled to run everyday. I've already created an extra column before importing the file. Ex: Flat file on 01/08/2019: 001,Tony Stark,Ironman 014,Steve…
intruder
  • 417
  • 1
  • 3
  • 18
2
votes
4 answers

Read flat file as transpose, python

I'm interested in reading fixed width text files in Python in as efficient a manner as I can. Specifically, most of the time I'm interested in one or more columns in the flat file but not entire records. It strikes me as inefficient to read the…
justin cress
  • 1,745
  • 5
  • 24
  • 35
2
votes
2 answers

Extract Multiple Flat File Lines as One Using C# in SSIS Script Component

Within the Script of the Script Component in SSIS, I am trying to create one record from a flat file as shown here: Starting…
Adam
  • 45
  • 4
2
votes
1 answer

Best Practice. Script task or Truncate Table Reread Flat File

I am wondering which one is the best practice out of these two options: Reverse read text file (.txt) and take the line where the date > max(date) in table by using script task in ssis re-Read Flat File (.txt) every time SSIS runs, truncate and…
Qissy
  • 23
  • 2
2
votes
1 answer

php/oop/mvc order of operation with markdown files (no db)

Goal: understand whether this implemented order/logic of operation indeed belongs to the C part of MVC. Situation: I have nearly finished a simple note-taking site with markdown files. No database is used except for authentication. The lack of…
farhang
  • 407
  • 1
  • 5
  • 13
2
votes
2 answers

Efficiently bulk import data in SSIS with occasional PK duplicate content?

Am regularly loading a flat file with 100k records into a table after some transformations. The table has a PK on two columns. The data on the whole does not contain duplicate PK information but occasionally, there are duplicates. I naively didn't…
Allan G
  • 60
  • 1
  • 6
2
votes
1 answer

SSIS Data Flow Task errors out on Flat File being used by another process

I have a Data Flow that simply reads a Flat File and execute a stored procedure per every line on the file. Every line contains comma separated fields. The stored procedure returns an output parameter that is later to be added to every line as a new…
dotnetspark
  • 551
  • 4
  • 23
2
votes
2 answers

Iterating columns of SQL Server table with loop in Visual Studio SSIS

I am building a simple SSIS project using Visual Studio which needs to copy a standardized column from hundreds of flat files into their respective rows into a SQL Server table. All flat files have the same format and are placed into a folder…
Alex
  • 140
  • 6
  • 19
2
votes
1 answer

Error out of Package If Not Following Specific Design

So I've encountered an interesting situation with importing a flat text file (using commas as a delimiter) into a table in my DB The file is really very simple and the only reason I caught this strange situation was because I wanted to test out some…
FooBun
  • 99
  • 1
  • 9
2
votes
2 answers

How to create flat file XSD-schema, if fractional part of numbers delimited by comma?

I have a csv-file with fractional part of numbers delimited by comma: header1;header2;header3;header4 text1;2,99;0,5;7,35 text2;6,12;3,98;0,15 How to create flat file XSD-schema from it? The problem is that flat file schema wizard expects dot as…
Vitaliy
  • 645
  • 1
  • 10
  • 21
2
votes
1 answer

Flat file CMS with JSON output

I am trying to create a simple site with flat-file content management, and a Vue.js front-end. I hope to approximate the following file structure: app - various vue files and folders - data.json - posts - - post1.md - - post2.md There would be some…
Kevin
  • 21
  • 2
2
votes
2 answers

How can I execute an SSIS Package for every item in a Flat File?

I need to execute a package once for every item in flat file. The package's parameters will be a few of the current item's attributes. What is the best way to proceed? I'm assuming the last thing I do is place an Execute Package Task component…
Michael Drum
  • 1,151
  • 5
  • 14
  • 26
2
votes
1 answer

How to automate export of multiple tables to delimited text in SSIS?

I am trying to create some sort of automation whereby I can generate a series of pipe-delimited text extracts for about 100 different tables each month. Each extract would be based on a simple query like this: SELECT * FROM tablename WHERE AsOfDate…
RMQ1447
  • 21
  • 1
2
votes
1 answer

SSIS Flat file destination export multi-line column

I have a SQL table as Source and I want to export it's contents to a Flat file using SSIS. Simplified example: Source: Notes table (CreatedBy, Description, CreatedOn) The Description field is nText. Destination: Flat file - Fixed length…
Amanvir Mundra
  • 420
  • 1
  • 6
  • 20
2
votes
1 answer

What are advantages and disadvantages of raw files in SSIS and when do we use them?

Could anyone please describe the advantages and disadvantages of Raw file transformations in ssis packages and in which instances do we use them?
Lakshmi
  • 93
  • 1
  • 6