Exemplo n.º 1
0
 public static async Task WriteReport(SqlExportArguments args, string content)
 {
     if (!String.IsNullOrEmpty(args.OutputDirectory))
     {
         await WriteToFile(args.OutputDirectory, content, args.Name);
     }
     else
     {
         await WriteToBlob(args.DestinationContainer, content, args.Name);
     }
 }
Exemplo n.º 2
0
        public static async Task <bool> RunSqlExport(SqlExportArguments args, string sql, string col0, string col1)
        {
            JobHelper.TraceSqlExportArguments(args);

            using (SqlConnection connection = new SqlConnection(args.ConnectionString))
            {
                connection.Open();
                SqlCommand command = new SqlCommand(sql, connection);
                command.CommandType = CommandType.Text;
                JArray result = JobHelper.SqlDataReader2Json(command.ExecuteReader(), col0, col1);
                await JobHelper.WriteReport(args, result.ToString(Formatting.None));
            }

            return(true);
        }
Exemplo n.º 3
0
 public static void TraceSqlExportArguments(SqlExportArguments args)
 {
     Trace.TraceInformation(String.Format("Generating Curated feed report from {0}.", TracableConnectionString(args.ConnectionString)));
 }