77b65bea-e766-4e3c-a1ed-c4c2534b6019 true D0001-SQL-11.sdt.local jazz dev master Prod true <ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll Amazon.Lambda.S3Events AWSSDK.Core AWSSDK.S3 Amazon Amazon.Auth.AccessControlPolicy Amazon.Auth.AccessControlPolicy.ActionIdentifiers Amazon.Internal Amazon.Lambda.S3Events Amazon.MissingTypes Amazon.Runtime Amazon.Runtime.CredentialManagement Amazon.Runtime.CredentialManagement.Internal Amazon.Runtime.EventStreams Amazon.Runtime.EventStreams.Internal Amazon.Runtime.Internal Amazon.Runtime.Internal.Auth Amazon.Runtime.Internal.Settings Amazon.Runtime.Internal.Transform Amazon.Runtime.Internal.Util Amazon.Runtime.SharedInterfaces Amazon.Runtime.SharedInterfaces.Internal Amazon.S3 Amazon.S3.Encryption Amazon.S3.Encryption.Internal Amazon.S3.Internal Amazon.S3.IO Amazon.S3.Model Amazon.S3.Model.Internal.MarshallTransformations Amazon.S3.Transfer Amazon.S3.Util Amazon.Util Amazon.Util.Internal Amazon.Util.Internal.PlatformServices Newtonsoft.Json Newtonsoft.Json.Converters Newtonsoft.Json.Linq Newtonsoft.Json.Schema Newtonsoft.Json.Serialization System System.Diagnostics System.Diagnostics.Tracing System.IO.Compression ThirdParty.BouncyCastle.Asn1 ThirdParty.BouncyCastle.Asn1.Utilities ThirdParty.BouncyCastle.Math ThirdParty.BouncyCastle.OpenSsl ThirdParty.BouncyCastle.Utilities.IO.Pem ThirdParty.Ionic.Zlib ThirdParty.Json.LitJson ThirdParty.MD5 var important = new[] { "CaseTypeEntity", "CaseTypeFamilyMetrics", "ChargeCaptureMetricGoal", "ChargeCodeConfig", "ChargeCodeCostDetail", "ClinicalGrowthMetricGoal", "Configuration", "CustomOppMetricLink", "CustomOpportunity", "DepartmentPatientADT", "DepartmentPatientCensus", "DepartmentPatientDailyCensus", "DepartmentPatientHourlyADTCensus", "DepartmentPatientHourlyCensus", "DepartmentStaffHourlyCensus", "DirectCostMetricGoal", "EmployeeWorkedHours", "FactMetric", "FactOpportunityMetric", "FactOpportunitySavings", "FreeFormInitiativeTrackingData", "FreeFormOpportunity", "GLDepartment", "GLOpportunity", "Initiative", "InitiativeComment", "InitiativeCriteria", "InitiativeScore", "InitiativeWorkflowHistory", "FactPatientEncounterSummary", "VariationEncounterSaving", "VariationEncounterSavingInfo"}; var tables = ExecuteQueryDynamic(@"SELECT c.TABLE_NAME, c.COLUMN_NAME, c.ORDINAL_POSITION, c.DATA_TYPE, CASE c.IS_NULLABLE WHEN 'no' THEN 'not null' ELSE '' END [Nullability], CASE WHEN c.COLUMN_DEFAULT IS NULL THEN '' ELSE c.COLUMN_DEFAULT END COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS AS c INNER JOIN INFORMATION_SCHEMA.TABLES t ON c.TABLE_NAME = t.TABLE_NAME AND t.TABLE_TYPE = 'BASE TABLE' WHERE c.TABLE_SCHEMA = 'cci' AND c.TABLE_CATALOG = 'jazz dev master Prod' ORDER BY c.TABLE_NAME, c.ORDINAL_POSITION") .Select(t => new { table = t.TABLE_NAME as string, column = t.COLUMN_NAME as string, position = t.ORDINAL_POSITION as int?, dataType = t.DATA_TYPE as string, nullability = t.Nullability as string, columnDefault = t.COLUMN_DEFAULT as string }).ToList(); tables .Where(t => !important.Contains(t.table)) .GroupBy(t => t.table, (g, d) => d.OrderBy(c => c.position)) .ToList() .ForEach(x => { x.Select(t => new { t.column, t.dataType, t.nullability, t.columnDefault }).Dump(x.First().table); });