input {
  file {
    path => "</path/to/Calcs.csv>"
    start_position => "beginning"
    sincedb_path => "<path to Logstash'es sincedb>"
    tags => ["calcs"]
  }
  file {
    path => "</path/to/Staples_utf8.csv>"
    start_position => "beginning"
    sincedb_path => "<path to Logstash'es sincedb>"
    tags => ["staples"]
  }
}

filter {
  if "calcs" in [tags] {
      csv {
        separator => ","
        columns => ["key","num0","num1","num2","num3","num4","str0","str1","str2","str3","int0","int1","int2",
        "int3","bool0","bool1","bool2","bool3","date0","date1","date2","date3","time0","time1","datetime0","datetime1","zzz"]
      }
  } else if "staples" in [tags] {
      csv {
        separator => ","
        columns => ["Item Count","Ship Priority","Order Priority","Order Status","Order Quantity","Sales Total",
        "Discount","Tax Rate","Ship Mode","Fill Time","Gross Profit","Price","Ship Handle Cost","Employee Name",
        "Employee Dept","Manager Name","Employee Yrs Exp","Employee Salary","Customer Name","Customer State",
        "Call Center Region","Customer Balance","Customer Segment","Prod Type1","Prod Type2","Prod Type3","Prod Type4",
        "Product Name","Product Container","Ship Promo","Supplier Name","Supplier Balance","Supplier Region",
        "Supplier State","Order ID","Order Year","Order Month","Order Day","Order Date","Order Quarter","Product Base Margin",
        "Product ID","Receive Time","Received Date","Ship Date","Ship Charge","Total Cycle Time","Product In Stock","PID","Market Segment" ]
      }
  }
}

output {
    if "calcs" in [tags] {
        elasticsearch {
            hosts => "<elastic-host>:9200"
            index => "calcs"
            pipeline => "calcs-pipeline"
            manage_template => false
            user => "elastic"
            password => "<password>"
        }
    } else if "staples" in [tags] {
        elasticsearch {
            hosts => "<elastic-host>:9200"
            index => "staples"
            manage_template => false
            user => "elastic"
            password => "<password>"
        }
    }
}
