Pull: Difference between revisions

From Data Islands
(LIKE operator Replaced with ILIKE)
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
Syntax
'''Syntax''' :


pull island destinationname "<whereclause>"
For All: pull <ISLANDNAME> <SERVER TABLENAME> [WHERE CLAUSE] <ENTER>
 
For Files: pull <ISLANDNAME> "<FOLDER PATH>" <ENTER>
 
Eg:
 
For All: eg. pull sqldata sqldata.csv "Country" = 'Germany'
 
Description : User can pull the available island's data and then store the data to connected database server.
 
Column names are in SQUARE BRACKETS
 
 
 
For Files provider, we need to give folder path in the place of Server islandname, where all the files will get downloaded from server. 
 
 
We also have one optional parameter as where clause if we wants to narrow down our result.
 
----




Please note:
Please note:


If we use LIKE operator in where clause then we are replacing to ILIKE as PostgreSQL understand ILIKE to make where condition as case in-sensitive, so for example, if we give the payload as:
If we wants to use query select statement with LIKE operator as case insenstive then we need to use ILIKE instead of LIKE operator as PostgreSQL understand ILIKE to make where condition as case in-sensitive, so for example, we need to give the payload as:




"{\"Query\": \"select * from customers where \\\"CompanyName\\\" like '%Ana%'\"}"
"{\"Query\": \"select * from customers where \\\"CompanyName\\\" ILIKE '%Ana%'\"}"


then internally (in backend side) it will replaced as below and then process:
----


"{\"Query\": \"select * from customers where \\\"CompanyName\\\" ilike '%Ana%'\"}"


Example query using a date filter


In case if we already given ilike then it will not replaced.
pull prospects prospects "acdatadatetime>now()::date - 2"

Latest revision as of 13:25, 30 March 2023

Syntax :

For All: pull <ISLANDNAME> <SERVER TABLENAME> [WHERE CLAUSE] <ENTER>

For Files: pull <ISLANDNAME> "<FOLDER PATH>" <ENTER>

Eg:

For All: eg. pull sqldata sqldata.csv "Country" = 'Germany'

Description : User can pull the available island's data and then store the data to connected database server.

Column names are in SQUARE BRACKETS


For Files provider, we need to give folder path in the place of Server islandname, where all the files will get downloaded from server. 


We also have one optional parameter as where clause if we wants to narrow down our result.



Please note:

If we wants to use query select statement with LIKE operator as case insenstive then we need to use ILIKE instead of LIKE operator as PostgreSQL understand ILIKE to make where condition as case in-sensitive, so for example, we need to give the payload as:


"{\"Query\": \"select * from customers where \\\"CompanyName\\\" ILIKE '%Ana%'\"}"



Example query using a date filter

pull prospects prospects "acdatadatetime>now()::date - 2"