Is the database-type = "sqldw" or "dwsql" for the SQL datawarehouse? #2505
Unanswered
mahadevan-lakshminar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Validated the dab-config.json file with DAB CLI and I get validation error message on both database-type = "dwsql" or "sqldw".
dwsql at least goes further to validate the schema, complaining next about the Primary key (though the table has primary key). But when deployed the Container will not even start with this database-type.
########### Validate database-type = "dwsql" ###########
C:\apibuilder-dev>dab validate dab-config.json
Information: Microsoft.DataApiBuilder 1.3.19
Information: Config not provided. Trying to get default config based on DAB_ENVIRONMENT...
Information: Environment variable DAB_ENVIRONMENT is (null)
Information: Validating config file: dab-config.json
Loading config file from C:\apibuilder-dev\dab-config.json.
Information: Validating entity relationships.
Information: [temp2] REST path: /api/temp2
Error: > Total schema validation errors: 1
> NotInEnumeration: #/data-source.database-type at 4:28 <<<<<<< this is the line in DAB file that has "dwsql" value >>>>>>>
Error: Primary key not configured on the given database object temp2
Error: Config is invalid. Check above logs for details.
sqldw DAB file validation fails but when deployed the Container successfully starts (though I get a 503 Service Unavailable on the Entity path /api/temp2)
########### Validate database-type = "sqldw" ###########
C:\apibuilder-dev>dab validate dab-config.json
Information: Microsoft.DataApiBuilder 1.3.19
Information: Config not provided. Trying to get default config based on DAB_ENVIRONMENT...
Information: Environment variable DAB_ENVIRONMENT is (null)
Information: Validating config file: dab-config.json
Loading config file from C:\apibuilder-dev\dab-config.json.
Deserialization of the configuration file failed.
Message:
The value sqldw is not a valid enum value of Azure.DataApiBuilder.Config.ObjectModel.DatabaseType
Stack Trace:
at Azure.DataApiBuilder.Config.Converters.EnumMemberJsonEnumConverterFactory.JsonStringEnumConverterEx
1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in /_/src/Config/Converters/EnumMemberJsonEnumConverterFactory.cs:line 129 at Azure.DataApiBuilder.Config.Converters.EnumExtensions.Deserialize[T](String value) in /_/src/Config/Converters/EnumMemberJsonEnumConverterFactory.cs:line 31 at Azure.DataApiBuilder.Config.Converters.DataSourceConverterFactory.DataSourceConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in /_/src/Config/Converters/DataSourceConverterFactory.cs:line 63 at System.Text.Json.Serialization.JsonConverter
1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)at System.Text.Json.Serialization.JsonConverter
1.TryReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Object& value) at System.Text.Json.Serialization.Converters.LargeObjectWithParameterizedConstructorConverter
1.ReadAndCacheConstructorArgument(ReadStack& state, Utf8JsonReader& reader, JsonParameterInfo jsonParameterInfo)at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter
1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter
1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable
1 actualByteCount)at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 json, JsonTypeInfo
1 jsonTypeInfo)at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Azure.DataApiBuilder.Config.RuntimeConfigLoader.TryParseConfig(String json, RuntimeConfig& config, ILogger logger, String connectionString, Boolean replaceEnvVar, EnvironmentVariableReplacementFailureMode replacementFailureMode) in /_/src/Config/RuntimeConfigLoader.cs:line 142
Information: Failed to parse the config file
Error: Config is invalid. Check above logs for details.
Beta Was this translation helpful? Give feedback.
All reactions