Skip to content

Instantly share code, notes, and snippets.

yogendra yogendra689

Block or report user

Report or block yogendra689

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:01bcff0697a767d3717644e3441f5484

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

View ecl_hpe_lynda_source_cards_update
# edcast query:
select cards.id, resources.url, cards.ecl_id from cards inner join resources on cards.resource_id = resources.id where resources.url like '%www.lynda.com%' and cards.organization_id=428 and cards.ecl_id is not null and ecl_metadata like '%68c2d101-21ca-4738-a289-61b33ad3e412%'
# approx 1882 cards
# get csv
# Ecl app
require 'open-uri'
require 'csv'
contents = open("/Users/yogendra/Desktop/hpe_ecl_cards.csv")
View backfill csv source types and lynda source types
require 'uri'
namespace :ecl do
desc 'Update csv source types and sources for delimiter option'
task update_csv_source_types_and_sources: :environment do
csv_source_types = SourceType.all.select{|st| st.required_keys.include?('csv_file_url') }
csv_source_types.each do |cst|
existing_required_keys = cst.required_keys
existing_required_keys << 'delimiter'
cst.required_keys = existing_required_keys.compact.uniq
You can’t perform that action at this time.