bulk

How can I easily bulk rename files with Perl?

浪尽此生 提交于 2019-11-30 05:44:49
问题 I have a lot of files I'm trying to rename, I tried to make a regular expression to match them, but even that I got stuck on the files are named like: File Name 01 File Name 100 File Name 02 File Name 03 etc, I would like to add a "0" (zero), behind any of file that are less than 100, like this: File Name 001 File Name 100 File Name 002 File Name 003 The closest I got to so much as matching them was using this find -type d | sort -r | grep ' [1-9][0-9]$' however I could not figure out how to

How do I bulk upload to s3?

折月煮酒 提交于 2019-11-30 05:03:09
问题 I recently refactored some of my code to stuff rows into a db using 'load data' and it works great -- however for each record I have I must upload 2 files to s3 -- this totally destroys the magnificent speed upgrade that I was obtaining. Whereas I was able to process 600+ of these documents/second they are now trickling in at 1/second because of s3. What are your workarounds for this? Looking at the API I see that it is mostly RESTful so I'm not sure what to do -- maybe I should just stick

How can I delete expired data from a huge table without having the log file grow out of control?

情到浓时终转凉″ 提交于 2019-11-30 04:28:55
问题 I have a huge table (3 billion rows), which unfortunately contains mostly expired data. I want to simply delete all of these expired rows, and keep the rest. I can execute a statement like this: delete from giganticTable where exp_date < getDate() The execution plan somehow estimates that about 400 million rows will be deleted. When executed, not only does this not finish after an hour, but the database transaction log file is also growing from 6 GB to 90 GB. Note that the database was in

Is there a bulk email plugin for Rails apps?

爱⌒轻易说出口 提交于 2019-11-30 03:53:42
Does anyone know of a plugin or something that can be used to send bulk emails for a Rails app? Specifically, I'd like to be able to pass an HTML email file to a rake task or something and have it emailed out to everyone who has signed up to my site and checked the "please send me info about XXX" box. I wrote kind of a hacked-together version for myself, but I'd like something that throttles itself somewhat smartly and can pick up where it left off if interrupted. Update : I eventually broke down and got out my credit card and signed up for a real bulk email service, and damn was that the

Bulk delete (truncate vs delete)

我的梦境 提交于 2019-11-30 03:11:10
问题 We have a table with a 150+ million records. We need to clear/delete all rows. Delete operation would take forever due to it writing to the t-logs and we cannot change our recovery model for the whole DB. We have tested the truncate table option. What we realized that truncate deallocates pages from the table, and if I am not wrong makes them available for reuse but doesn't shrink the db automatically. So, if we want to reduce the DB size, we really would need to do run the shrink db command

How to: Implement a BatchMessageListenerContainer for bulk consuming a JMS queue

跟風遠走 提交于 2019-11-30 00:34:10
问题 I recently faced the need for a JMS consumer in Spring Integration - capable of consuming burst of high volume without stressing my target Oracle database with too many commits. The DefaultMessageListenerContainer does not seem to support anything but message by message transactions. I googled for solutions and found a couple - but the lot of them suffered from being implemented not by inheritance from DMLC but rather by cloning and modifying the original source code from same - making it

C# mongodb driver 2.0 - How to upsert in a bulk operation?

白昼怎懂夜的黑 提交于 2019-11-29 18:52:54
问题 I migrated from 1.9 to 2.2 and reading the documentation I was surprised to discover that is not possible to upsert during a bulk operation anymore, since operations don't allow options. bulkOps.Add(new UpdateOneModel<BsonDocument>(filter, update)); collection.BulkWrite(bulkOps); Should be options.isUpsert = true; bulkOps.Add(new UpdateOneModel<BsonDocument>(filter, update, options)); collection.BulkWrite(bulkOps); Is this work in progress, intended, or I'm missing something? Thank you. 回答1:

bulk insert a date in YYYYMM format to date field in MS SQL table

可紊 提交于 2019-11-29 17:01:58
I have a large text file (more than 300 million records). There is a field containing date in YYYYMM format. Target field is of date type and I'm using MS SQL 2008 R2 server. Due to huge amount of data I'd prefer to use bulk insert. Here's what I've already done: bulk insert Tabela_5 from 'c:\users\...\table5.csv' with ( rowterminator = '\n', fieldterminator = ',', tablock ) select * from Tabela_5 201206 in file turns out to be 2020-12-06 on server, whereas I'd like it to be 2012-06-01 (I don't care about the day). Is there a way to bulk insert date in such format to a field of date type? kind

Add multiple users to multiple groups from one import csv

北城余情 提交于 2019-11-29 11:28:36
I have a csv with 2 columns, one column is AD group names and one is user account names. I am trying to read the csv and import the users into their corresponding group. Here is what i have to so far. It's saying both arguments(identity,member) are null, which makes no sense since the headers are correctly specified. import-module activedirectory $list = import-csv "C:\Scripts\Import Bulk Users into bulk groups\bulkgroups3.csv" Foreach($user in $list){ add-adgroupmember -identity $_.Group -member $_.Accountname } Heres whats in the csv file Group Accountname group1 user1 group1 user2 group1

Building a bulk mail sender [closed]

回眸只為那壹抹淺笑 提交于 2019-11-29 10:24:16
问题 I want to build an application that will allow my customers to send marketing information by e-mail. This will be a carefully monitored tool used for legitimate bulk mailing only. It's going to have all of the necessary 'unsubscribe' functionality etc. The solution will be built using VB.NET. My question relates to the best way to actually send the e-mails. We have an SMTP server in our data centre which we can use. I'm thinking we could write some kind of multi-threaded windows service to