Skip to content

Instantly share code, notes, and snippets.

@matthinea
Last active August 24, 2020 07:04
Show Gist options
  • Save matthinea/aeaf489966ca6acadd8b37e20ba82276 to your computer and use it in GitHub Desktop.
Save matthinea/aeaf489966ca6acadd8b37e20ba82276 to your computer and use it in GitHub Desktop.
# the processed file here will be copied to the new transform below
transform = B2CLinkTransform.create!(output_uri: 's3://axle-legacy-importer-qa/b2c_link/2020-08-03')
drop = transform.s3_drops.create!(base_uri: 's3://axle-tmp/execureach/2020-08-03', transformer_type: 'DataTransforms::B2CLink::ExecureachTransformer')
s3_file = drop.s3_files.create!(file_name: 'execureach_01.csv.gz', completed: true)
processed_file = s3_file.processed_files.create!(file_name: 'execureach_01_0000.csv.gz', records: 500)
new_transform = B2CLinkTransform.build("2020-06-04", ["s3://axle-consumer/emaildb/2020-06-04/"])
ActiveRecord::Base.transaction do
new_transform.save!
new_transform.enqueue!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment