SSIS vs. Dynamic CRM: The .CSV file should not have size greater than 8MB

MohitPandit
MohitPandit used Ask the Experts™
on
Hello,

I am creating a SSIS package to generate .CSV files. But I came to know that we have constraint in Microsoft Dynamic CRM i.e. the .csv file size should not greater than 8MB.

I might have 5 GB data in .csv file.

Do you have best & optimal solution (like split file with 8MB after generate 5GB)?

Best Regards
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jim HornSQL Server Data Dude
Most Valuable Expert 2013
Author of the Year 2015
Commented:
<Knee jerk reactions>
If the consumer of an SSIS destination .csv has a hard restriction like Max 8Gb size, the only things that come to mind are..
  • Throw the data pump that creates this file into some kind of loop which guarantees only the TOP x rows are processed that will insure that the file is under 8Gb.  Make sure the naming convention of the file is such that this can be consumed by the CRM.
  • Look at the data and make any modeling changes so that the csv sends less data / no spaces / whatever to shrink the output file size.
  • Ask the consumers of this data why the eff they need a potentially 8Gb file.  A likely possibility is that this is a 'full load' file containing all rows in a table, and a discussion can be opened up to change this to a change-only file that will be much smaller in size.
Dung DinhDBA and Business Intelligence Developer

Commented:
Dear,

What if you zip 5GB .csv file and split it into smaller parts by using 7zip application. SSIS has a Execute Task component that helps us call a third party application such 7zip via command lines.

Author

Commented:
CRM Import Data Wizard takes "8MB" each .csv file. In case of .zip file, the maximum .zip file size will be "32MB".
But still in .zip file, each .csv file size shouldn't be greater than "8MB"
DBA and Business Intelligence Developer
Commented:
Hmm.. You have to customize the SSIS to split the .csv file into the smaller files (8MB per file).
- Count number of rows (N)
- Calculate file size (S = 5GB)
- Calculate number of rows per file Nf = (8 * N) / (S* 1024)
- Use Sequence and Loop Component to extract data for multiple files (https://social.technet.microsoft.com/wiki/contents/articles/3172.split-a-flat-text-file-into-multiple-flat-text-files-using-ssis.aspx)

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial