Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error when using tContextLoad

Hi all, I am using Implicit tContextLoad.
However I received the following error:

Exception in component Implicit_Context_Regex

java.util.regex.PatternSyntaxException: Unclosed character class near index 11

^([^]*)(.*)$

^

at java.util.regex.Pattern.error(Unknown Source)

at java.util.regex.Pattern.clazz(Unknown Source)

at java.util.regex.Pattern.sequence(Unknown Source)

at java.util.regex.Pattern.expr(Unknown Source)

at java.util.regex.Pattern.group0(Unknown Source)

at java.util.regex.Pattern.sequence(Unknown Source)

at java.util.regex.Pattern.expr(Unknown Source)

at java.util.regex.Pattern.compile(Unknown Source)

at java.util.regex.Pattern.<init>(Unknown Source)

at java.util.regex.Pattern.compile(Unknown Source)

at test.demo_0_1.demo.Implicit_Context_RegexProcess(demo.java:674)

at test.demo_0_1.demo.runJobInTOS(demo.java:7387)

at test.demo_0_1.demo.main(demo.java:7193)



The implicit tContextLoad is from txt file where it consists the following:
"host""localhost"
"database""student"
"username""postgres"
"password""hello"
"port""5432"


I have set the Field Seperator as "". What have I done wrong? Please help.

Labels (2)
5 Replies
vapukov
Master II
Master II

separator is wrong
use as all - , or ; or |
and show this separator in component

in other case if "" separator, localhost" - is "host, postgres" is "user and etc
Anonymous
Not applicable
Author

Hi. Would like to clarify. Do you mean if I put the separator as ;
I can edit the txt file as follow:
host;localhost;
database;student;
username;postgres;
password;hello;
port;5432;
vapukov
Master II
Master II

Talenduseruser wrote:
Hi. Would like to clarify. Do you mean if I put the separator as ;
I can edit the txt file as follow:
host;localhost;
database;student;
username;postgres;
password;hello;
port;5432;

exactly
then before tContextLoad - You use tFileInputDelimited with delimiter ; and schema key;value and connect from it to tLoadContext by main flow
Anonymous
Not applicable
Author

Currently in my job design, I am actually having Student connected to tMap connected to Backup.
So its like Student --> tMap --> Backup  as I am getting both columns from database.
So now, should I place tFileInputDelimited --> tContextLoad-->Student --> tMap --> Backup  ?
vapukov
Master II
Master II

not sure about all steps, but tConextLoad - do not work as standalone component, it must have source - file (or database)
You can do this in Job or Project properties - in this case You just set filename and separator and no more elements in Job