Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect Header DataTypes during File Parsing #10

Open
papyr opened this issue Feb 16, 2020 · 2 comments
Open

How to detect Header DataTypes during File Parsing #10

papyr opened this issue Feb 16, 2020 · 2 comments

Comments

@papyr
Copy link

papyr commented Feb 16, 2020

in my case, the source CSV data file and header content/types change often -- basically unknown, while parsing or before parsing I need to first Discover the Data Types of the data in the cols.

I just need to load & save the data into a Sql table based on whatever data & DataTypes there are in the CSV file. Can I auto load the CSV data and datatypes into the DB automatically with ETL box. I saw your expando example but was a little lost how to achieve a high level task

For e.g high level algorithm, how would I achieve this in your lib.

// Scan first 9 rows to discover the datatypes in the CSV file cols
var etlPrasedFile = DaleNewMan.Trans.Open/parseCSV(someUnknownData.csv).ScanRows(9)
foreach (var col in etlPrasedFile )
new dataTable.addColumn(etlParsedFile.GetNextHeaderCol)
CreateNewSqlServerTable
LoadDatatoSqlTable??

thanks

@dalenewman
Copy link
Owner

This doesn't look like code that uses my library.

@papyr
Copy link
Author

papyr commented Apr 23, 2020

hello, yes true.

I was simply giving and example of what I want to achieve, and did not want to leave it vague, so I added some snippets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants