You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by Eric <er...@gmail.com> on 2023/08/24 19:01:15 UTC

Problem in Linux

Hello



I’ve been experiencing issues on Linux. I’ve developed an ETL process in
witch I generate a variable that i subsequently use for an INSERT operation
using an SQL script. It Works fine on Windows, but on Linux the variable is
not recognized. What could be the issue?



Thanks

Re: Problem in Linux

Posted by Bart Maertens <ba...@apache.org>.
Strange that it works on Windows but not on Linux.
Is your IDPROCESS variable as String, Integer or any other data type?
If it's a String, your insert statement should have (single) quotes around
the variable: VALUES ('${IDPROCESS}', 'In Progress', NOW(), null);
If your IDPROCESS values are integers, your current statement should work.

Regards,
Bart


On Fri, Aug 25, 2023 at 9:10 AM Eric <er...@gmail.com> wrote:

> Hi,
>
> In a pipeline, I generate a variable using JavaScript called "idprocess,"
> which is the current date and time in milliseconds. Then, I perform the
> "Set Variable" transformation and refer to that variable as "IDPROCESS."
> In the main workflow, I call that pipeline and subsequently execute an SQL
> script where I perform an insert into the database using the "IDPROCESS"
> variable:
>
> INSERT INTO camerfirma.ctl_process (idprocess, status, fecha_inicio,
> fecha_fin)
> VALUES (${IDPROCESS}, 'In Progress', NOW(), null);
>
> On Windows, this script functions correctly and inserts the "idprocess"
> into the database. However, on Linux, I encounter the following error:
>
> SQL - ERROR: syntax error at or near "$"
>
> Thanks.
>
> El vie, 25 ago 2023 a las 1:02, Diego Mainou (<
> diego.mainou@bizcubed.com.au>) escribió:
>
>> Hi Eric,
>>
>> You'll need to give us more info
>>
>>
>> <https://www.bizcubed.com.au> Diego Mainou
>> Product Manager
>> M. +61 415 152 091
>> E. diego.mainou@bizcubed.com.au
>> www.bizcubed.com.au   <https://www.bizcubed.com.au>
>>
>> ------------------------------
>> *From: *"Eric" <er...@gmail.com>
>> *To: *"users" <us...@hop.apache.org>
>> *Sent: *Friday, 25 August, 2023 5:01:15 AM
>> *Subject: *Problem in Linux
>>
>> Hello
>>
>>
>>
>> I’ve been experiencing issues on Linux. I’ve developed an ETL process in
>> witch I generate a variable that i subsequently use for an INSERT operation
>> using an SQL script. It Works fine on Windows, but on Linux the variable is
>> not recognized. What could be the issue?
>>
>>
>>
>> Thanks
>>
>>
>>
>>

Re: Problem in Linux

Posted by Matt Casters <ma...@leanwithdata.com>.
It might not be the operating system as much as the language and the
resulting default conversions which are at play here.
To consistently format a date-time consider using the "Get System Info"
transform for the system date, and the "Select Values (meta tab)" transform
for the conversion. There are date-time masks as examples in the format
column.

Good luck,

Matt

Op vr 25 aug. 2023 09:10 schreef Eric <er...@gmail.com>:

> Hi,
>
> In a pipeline, I generate a variable using JavaScript called "idprocess,"
> which is the current date and time in milliseconds. Then, I perform the
> "Set Variable" transformation and refer to that variable as "IDPROCESS."
> In the main workflow, I call that pipeline and subsequently execute an SQL
> script where I perform an insert into the database using the "IDPROCESS"
> variable:
>
> INSERT INTO camerfirma.ctl_process (idprocess, status, fecha_inicio,
> fecha_fin)
> VALUES (${IDPROCESS}, 'In Progress', NOW(), null);
>
> On Windows, this script functions correctly and inserts the "idprocess"
> into the database. However, on Linux, I encounter the following error:
>
> SQL - ERROR: syntax error at or near "$"
>
> Thanks.
>
> El vie, 25 ago 2023 a las 1:02, Diego Mainou (<
> diego.mainou@bizcubed.com.au>) escribió:
>
>> Hi Eric,
>>
>> You'll need to give us more info
>>
>>
>> <https://www.bizcubed.com.au> Diego Mainou
>> Product Manager
>> M. +61 415 152 091
>> E. diego.mainou@bizcubed.com.au
>> www.bizcubed.com.au   <https://www.bizcubed.com.au>
>>
>> ------------------------------
>> *From: *"Eric" <er...@gmail.com>
>> *To: *"users" <us...@hop.apache.org>
>> *Sent: *Friday, 25 August, 2023 5:01:15 AM
>> *Subject: *Problem in Linux
>>
>> Hello
>>
>>
>>
>> I’ve been experiencing issues on Linux. I’ve developed an ETL process in
>> witch I generate a variable that i subsequently use for an INSERT operation
>> using an SQL script. It Works fine on Windows, but on Linux the variable is
>> not recognized. What could be the issue?
>>
>>
>>
>> Thanks
>>
>>
>>
>>

Re: Problem in Linux

Posted by Eric <er...@gmail.com>.
Hi,

In a pipeline, I generate a variable using JavaScript called "idprocess,"
which is the current date and time in milliseconds. Then, I perform the
"Set Variable" transformation and refer to that variable as "IDPROCESS."
In the main workflow, I call that pipeline and subsequently execute an SQL
script where I perform an insert into the database using the "IDPROCESS"
variable:

INSERT INTO camerfirma.ctl_process (idprocess, status, fecha_inicio,
fecha_fin)
VALUES (${IDPROCESS}, 'In Progress', NOW(), null);

On Windows, this script functions correctly and inserts the "idprocess"
into the database. However, on Linux, I encounter the following error:

SQL - ERROR: syntax error at or near "$"

Thanks.

El vie, 25 ago 2023 a las 1:02, Diego Mainou (<di...@bizcubed.com.au>)
escribió:

> Hi Eric,
>
> You'll need to give us more info
>
>
> <https://www.bizcubed.com.au> Diego Mainou
> Product Manager
> M. +61 415 152 091
> E. diego.mainou@bizcubed.com.au
> www.bizcubed.com.au   <https://www.bizcubed.com.au>
>
> ------------------------------
> *From: *"Eric" <er...@gmail.com>
> *To: *"users" <us...@hop.apache.org>
> *Sent: *Friday, 25 August, 2023 5:01:15 AM
> *Subject: *Problem in Linux
>
> Hello
>
>
>
> I’ve been experiencing issues on Linux. I’ve developed an ETL process in
> witch I generate a variable that i subsequently use for an INSERT operation
> using an SQL script. It Works fine on Windows, but on Linux the variable is
> not recognized. What could be the issue?
>
>
>
> Thanks
>
>
>
>

Re: Problem in Linux

Posted by Diego Mainou <di...@bizcubed.com.au>.
Hi Eric, 

You'll need to give us more info 


[ https://www.bizcubed.com.au/ | 
						                
										             ] 	Diego Mainou 
Product Manager 
M. +61 415 152 091 
E. [ mailto:diego.mainou@bizcubed.com.au | diego.mainou@bizcubed.com.au ] 
[ https://www.bizcubed.com.au/ | www.bizcubed.com.au ] 		[ https://www.bizcubed.com.au/ | 
																																																
																																																 	 ] 


From: "Eric" <er...@gmail.com> 
To: "users" <us...@hop.apache.org> 
Sent: Friday, 25 August, 2023 5:01:15 AM 
Subject: Problem in Linux 



Hello 



I’ve been experiencing issues on Linux. I’ve developed an ETL process in witch I generate a variable that i subsequently use for an INSERT operation using an SQL script. It Works fine on Windows, but on Linux the variable is not recognized. What could be the issue? 



Thanks 




Re: Problem in Linux

Posted by Bart Maertens <ba...@apache.org>.
Hi Eric,

Can you provide some more information?
What kind of variable is this, how do you set and retrieve it?
Do you have any pointers to where the differences between Windows and Linux
could be?

Regards,
Bart


On Thu, Aug 24, 2023 at 9:01 PM Eric <er...@gmail.com> wrote:

> Hello
>
>
>
> I’ve been experiencing issues on Linux. I’ve developed an ETL process in
> witch I generate a variable that i subsequently use for an INSERT operation
> using an SQL script. It Works fine on Windows, but on Linux the variable is
> not recognized. What could be the issue?
>
>
>
> Thanks
>