Documentation states that I can also use environment variables for Flyway configuration, instead of specifying them in Gradle files.
However, since placeholder are multivalued, how are these handled via environment variables? Are they comma separated key value pairs?
"key1=val1,key2=val2"?
I cannot seem to find any such examples.
NAME refers to the placeholder name.
To set the environment variable for placeholder key1 use
FLYWAY_PLACEHOLDERS_KEY1=val1
Related
I need to create an HTTP-sourced dictionary in Clickhouse with DDL-request (https://clickhouse.com/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources/#dicts-external_dicts_dict_sources-http).
My DDL request so far looks like:
CREATE DICTIONARY some_dictionary (id String, name String)
PRIMARY KEY id
SOURCE(HTTP(
url 'http://127.0.0.1:5050/my-service/some-dictionary'
format 'JSONEachRow'
))
LIFETIME(MIN 240 MAX 300)
LAYOUT(COMPLEX_KEY_HASHED());
My problem is that I need to specify different url for different stands (dev, test, prod) - means I need to externalize url value.
I tried named connections (https://clickhouse.com/docs/en/operations/named-collections/), but they seem to work with odbc sourced dictionaries only.
I also tried defining substitution parameter in macros section and stating my url like '{url}/my-service/some-dictionary' (https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings/#macros), but it also seems to be for creating replicated tables only.
Any way to externalize http-sourced dictionary url for DDL query?
Does PeopleCode have something similar to reflection in C# whereby I can access a variable with the variable name stored in a string? I am aware of the # operator but I think it only applies to fields and records (correct me if I am wrong. I tried and couldn't get it to work.)
Basically, I need to access a Component variable by name with the name itself being variable.
You can do it by # :
Local string &sValue1 = "var1";
getting the value :
winmessage(#(&sValue1));
I have a table created successfully.
1 of the column name is code and another 1 is "deleted".
Thus, I plan to use this 2 field to create its index. I am doing something like follow:
CREATE INDEX SADM.IDX_SC_IDX1 on SADM.SC ("code" ASC, "DELETED") ALLOW REVERSE SCANS;
This is working fine in my local. However, I hit this error in UAT:
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0205N Column, attribute, or period "code" is not defined in
"SADM.SC". SQLSTATE=42703
I double check the table and confirm the "code" column or "deleted" is exist and same with my local.
I believe something wrong is inside but I cant find the root cause.
Kindly advise.
As per my comment. You are using double-quotes around the column names the column case (uppercase, lowercase) must match between the table-definition and the index definition.
Make sure to name the columns as they were created and are listed in the system catalog. Look for the column names in SYSCAT.COLUMNS (for most Db2 versions). If you don't use quotes, Db2 converts identifiers to uppercase by default. However, if you use quotes they always need to be referenced exactly as written.
"code" is different from "Code" or "COde" or CODE. Thus, check how the column is really named.
I have to set default values for the lookup transformation. Default values are stored in separate file.
Input file is in XML format.
So need to write Unix script for this.
Thanks in advance.
Ok... so take your lookup returned port to another expression tramsformation which has all your fields set via iif to be equal to the value they would get set or the desired default value when the lookup returned field is null.
In the following piece of code, what is the purpose of the square?
SELECT Value, [Default] AS Selected FROM SKUOptVal WHERE SKUOptID = ?
Cheers.
This code is written for SQLite3.
It's an identifier. It's the same as saying "Default". It's included for compatibility with MS Access. Since Default is a keyword in SQL, it needs to be quoted if used as an identifier, as it is here.
The column is named default, which is the same as an SQL keyword. Thus, the brackets are used to denote we are referring to the column default and not the keyword default.