Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
99f3934
Modify HashLinkSet class.
RQWangXiaoJun Aug 29, 2024
577b386
Removed dependency on DB2JDBC
wunanraq Aug 29, 2024
9f739a7
Modify error message.
RQWangXiaoJun Aug 29, 2024
92789f8
Confirm cs.group bug.
RQWangXiaoJun Aug 30, 2024
ecc3e17
Fix bug in JDBC
wunanraq Aug 30, 2024
393e084
Fix bug of read block data.
liwe1980 Aug 30, 2024
5d676cc
Fix bug of function structure.
liwe1980 Aug 30, 2024
15a4f80
Modify icount.
RQWangXiaoJun Aug 30, 2024
ff21b66
Fix bug of t.news.
liwe1980 Sep 1, 2024
0ef7595
Modify icount.
RQWangXiaoJun Sep 2, 2024
ead8698
Modify data block writer.
liwe1980 Sep 2, 2024
b0111ce
Modify CursorUtil class.
RQWangXiaoJun Sep 4, 2024
1c0b793
Modified the issue of handling BigDecimal data when returning it to t…
wunanraq Sep 4, 2024
787d10e
Modify cs.groups function.
RQWangXiaoJun Sep 4, 2024
827b9f8
Modify cs.groups function.
RQWangXiaoJun Sep 4, 2024
d461cd8
Modify icount function.
RQWangXiaoJun Sep 5, 2024
188ae64
IDE optimization.
wunanraq Sep 6, 2024
2d40b91
Delete function file.sortx.
liwe1980 Sep 9, 2024
4f030a8
Modify CellSetUtil class.
RQWangXiaoJun Sep 9, 2024
9b70d69
Modify IDE resources
wunanraq Sep 10, 2024
3b6e698
Delete sequence.sortx.
liwe1980 Sep 10, 2024
35aebc8
JDBC optimization.
wunanraq Sep 10, 2024
7974a2a
Optimize ifn function.
RQWangXiaoJun Sep 10, 2024
34c0bd9
JDBC optimization.
wunanraq Sep 10, 2024
3d4e622
JDBC unit connection contains a spaceId,sub statements share same space.
XiaoQiongBao Sep 11, 2024
a8fd0c4
Modify pdate function.
RQWangXiaoJun Sep 11, 2024
983d919
Modify PgmCellSet function.
RQWangXiaoJun Sep 12, 2024
cba5979
Optimize day@w function.
RQWangXiaoJun Sep 12, 2024
b8e5b44
IDE optimization.
wunanraq Sep 12, 2024
651626e
String \n do not break lines, only line breaks char is allowed
wunanraq Sep 12, 2024
bef866c
String \n do not break lines, only line breaks char is allowed
wunanraq Sep 12, 2024
e0786c1
Modify cs.cursor function.
RQWangXiaoJun Sep 12, 2024
d83c9e4
update function.xml
minimaomi Sep 12, 2024
3299ccf
IDE optimization.
wunanraq Sep 13, 2024
8bae867
Modify IDE Resources
wunanraq Sep 13, 2024
9543621
Modify IDE Resources
wunanraq Sep 13, 2024
64b18a9
Modify groups@z.
liwe1980 Sep 13, 2024
de52d43
Confirm ConstArray bug.
RQWangXiaoJun Sep 13, 2024
c154cdf
Confirm ConstArray bug.
RQWangXiaoJun Sep 13, 2024
608859f
Fix bug in parameter editor
wunanraq Sep 13, 2024
70e3742
IDE optimization.
wunanraq Sep 13, 2024
8fbd669
JDBC optimization.
wunanraq Sep 14, 2024
6b7af09
Add s.split@g option.
RQWangXiaoJun Sep 18, 2024
4850303
IDE optimization.
wunanraq Sep 18, 2024
e8a2677
Modify 'for cs' statement.
RQWangXiaoJun Sep 19, 2024
7fb2aec
When listing the names of data source tables, support displaying 'BAS…
wunanraq Sep 20, 2024
7d022ac
Fix bug of f.sortx.
liwe1980 Sep 20, 2024
6d08990
Modify ConjxCursor class.
RQWangXiaoJun Sep 20, 2024
54d1c8c
Modify PgmCellSet class.
RQWangXiaoJun Sep 20, 2024
72122e5
Add T.cursor@p option.
RQWangXiaoJun Sep 20, 2024
7187534
Add xml@b option.
RQWangXiaoJun Sep 23, 2024
63b1282
Modify array class.
RQWangXiaoJun Sep 23, 2024
10a0ed4
Modify CellSetUtil class.
RQWangXiaoJun Sep 24, 2024
73b8986
Modify CellSetUtil class.
RQWangXiaoJun Sep 24, 2024
e89160a
IDE optimization.
wunanraq Sep 24, 2024
1d9b956
Confirm MinHeap class bug.
RQWangXiaoJun Sep 24, 2024
6263a80
Modify IDE resources
wunanraq Sep 24, 2024
581e925
Modify IDE resources
wunanraq Sep 24, 2024
ad68a1e
Modify IDE resources
wunanraq Sep 24, 2024
1bcba6c
Modify IDE resources
wunanraq Sep 25, 2024
88e94ad
Modify IDE resources
wunanraq Sep 25, 2024
842af08
Fix bug in xlsopen function
wunanraq Sep 25, 2024
3f6f298
Modify IDE resources
wunanraq Sep 25, 2024
2b72c20
Modify release date
wunanraq Sep 26, 2024
6dd09c3
compatible with commons-compress-1.27.0
barbosa90 Sep 26, 2024
fe6f991
commons-io change to version 2.17.0
barbosa90 Sep 26, 2024
d558dda
Modify IDE resources
wunanraq Sep 26, 2024
8094141
Confirm ConjxCursor class bug.
RQWangXiaoJun Sep 26, 2024
919944a
Modified support for Boolean in JDBC
wunanraq Sep 27, 2024
e5c7032
Modified support for bytes in JDBC.
wunanraq Sep 27, 2024
00d9a1d
update 20240926
minimaomi Sep 27, 2024
15bfd68
Modify ObjectReader class.
RQWangXiaoJun Sep 29, 2024
a3d0dad
IDE optimization.
wunanraq Sep 29, 2024
0e692b3
IDE optimization.
wunanraq Sep 29, 2024
e6702ce
IDE optimization.
wunanraq Sep 29, 2024
78c1700
IDE optimization.
wunanraq Sep 29, 2024
09620d7
IDE optimization.
wunanraq Sep 30, 2024
c40f4bd
Modify split and replace functions.
RQWangXiaoJun Oct 8, 2024
34a687a
Modify replace function.
RQWangXiaoJun Oct 8, 2024
4d46269
Modify replace function.
RQWangXiaoJun Oct 9, 2024
dbf9127
IDE optimization.
wunanraq Oct 10, 2024
276af09
IDE optimization.
wunanraq Oct 10, 2024
5dc5d64
Modify f.iselect function.
RQWangXiaoJun Oct 10, 2024
0de83e9
Add cmps function.
RQWangXiaoJun Oct 12, 2024
e0c46b7
Sortx optimization.
Oct 12, 2024
307ee7f
Optimization xlsimport@c
wunanraq Oct 12, 2024
d08ffb7
Merge branch 'master' of github.com:SPLWare/esProc
wunanraq Oct 12, 2024
165397e
Optimization xlsimport@c
wunanraq Oct 12, 2024
e999146
Confirm ObjectReader class bug.
RQWangXiaoJun Oct 12, 2024
21a81c0
Modify LineImporter class.
RQWangXiaoJun Oct 12, 2024
ccf63b4
Modify RowBufferReader class.
RQWangXiaoJun Oct 13, 2024
a7c47f5
Add f.iselect@e option.
RQWangXiaoJun Oct 14, 2024
ce8e415
Modify ObjectReader class.
RQWangXiaoJun Oct 14, 2024
a0be4e2
Modify file.create@y option.
liwe1980 Oct 16, 2024
3194028
Add f.import@y option.
RQWangXiaoJun Oct 16, 2024
970f425
Modify A.m function.
RQWangXiaoJun Oct 17, 2024
02bb635
IDE optimization.
wunanraq Oct 25, 2024
e196a9b
Fix bug of file group reset.
liwe1980 Oct 29, 2024
035e9d3
Modify iterate function.
RQWangXiaoJun Oct 29, 2024
a351be6
Add A.merge@x option.
RQWangXiaoJun Oct 29, 2024
3dbbcaa
IDE optimization.
wunanraq Oct 30, 2024
028faed
correct the bug that svg format can not display tips
XiaoQiongBao Oct 30, 2024
6c0edf7
correct the bug that svg format can not display tips
XiaoQiongBao Oct 31, 2024
cd44bbd
Adjusted the resources of function auxiliary function.
XiaoQiongBao Nov 5, 2024
cc63c25
Adjusted the resources of function auxiliary function.
XiaoQiongBao Nov 5, 2024
200b789
Fix bug in value panel
wunanraq Nov 5, 2024
bacba86
Add joinx@x option.
RQWangXiaoJun Nov 6, 2024
182325e
modify SplxHttpHandler
shenjianrong Nov 10, 2024
95b4c91
Optimize Cursor class.
RQWangXiaoJun Nov 10, 2024
cb5aca3
Modify pfind class.
RQWangXiaoJun Nov 11, 2024
68bc010
Modify MultiThreadUtil class.
RQWangXiaoJun Nov 11, 2024
8fa2bbb
Fix a bug of DrawBase
XiaoQiongBao Nov 13, 2024
8f9a6c2
Fix bug of groups@z.
liwe1980 Nov 15, 2024
f8f7336
JDBC optimization.
wunanraq Nov 17, 2024
1464d82
JDBC optimization.
wunanraq Nov 18, 2024
06fc7cb
Confirm T.cursor@w(...;mcs) bug.
RQWangXiaoJun Nov 18, 2024
f3ac48b
JDBC optimization.
wunanraq Nov 20, 2024
9e817b4
Confirm A.merge bug.
RQWangXiaoJun Nov 24, 2024
d6926e5
Add gridline option
wunanraq Nov 25, 2024
57ff85a
JDBC optimization.
wunanraq Nov 25, 2024
846eb3c
Modify IDE Resources.
wunanraq Nov 26, 2024
2c34196
Modify T.select@t.
RQWangXiaoJun Nov 26, 2024
3db49a1
Modify release date
wunanraq Nov 26, 2024
e97a8e4
update 20241126
minimaomi Nov 26, 2024
70b78cc
Add interval@ymd.
RQWangXiaoJun Nov 27, 2024
2ed4619
JDBC optimization.
wunanraq Nov 27, 2024
763789d
Modify Array's ensureCapacity function.
RQWangXiaoJun Nov 28, 2024
e358195
update doc
minimaomi Nov 29, 2024
cf3d4fd
Add support for Snowflake Container Service
Ishiihara Dec 1, 2024
cc96841
Modify the necessary assets
Ishiihara Mar 18, 2025
1bb2c17
Fix bin/ServerConsole2.sh
Ishiihara Mar 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/
.idea/
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM openjdk:8-jdk-alpine
WORKDIR /app
COPY bin /app/bin
COPY config /app/config
COPY importlibs /app/importlibs
COPY jdbc /app/jdbc
COPY lib /app/lib
COPY mainPath /app/mainPath
COPY target /app/target
# Set executable permission for esprocx.sh
RUN chmod +x /app/bin/ServerConsole2.sh
ENTRYPOINT ["/bin/sh", "/app/bin/ServerConsole2.sh", "-h"]
180 changes: 180 additions & 0 deletions SNOWFLAKE_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# Snowflake Container Service Setup

## Role Setup

This section sets up a new role named `test_role` in Snowflake. Roles are used to manage permissions and control access to different resources.

```sql
USE ROLE ACCOUNTADMIN;

CREATE ROLE test_role;
```

## Database and Warehouse Setup

In this section, we create a new database (`tutorial_db`) and a virtual warehouse (`tutorial_warehouse`). The warehouse is used to run SQL queries. Ownership of the database is granted to `test_role`, and usage permissions for the warehouse are also granted to `test_role`.

```sql
CREATE DATABASE IF NOT EXISTS tutorial_db;
GRANT OWNERSHIP ON DATABASE tutorial_db TO ROLE test_role COPY CURRENT GRANTS;

CREATE OR REPLACE WAREHOUSE tutorial_warehouse WITH
WAREHOUSE_SIZE='X-SMALL';
GRANT USAGE ON WAREHOUSE tutorial_warehouse TO ROLE test_role;
```

## Service Endpoint and Compute Pool Setup

This section grants permission to bind service endpoints to the `test_role` and creates a compute pool (`tutorial_compute_pool`). A compute pool is used to manage resources for scaling and processing. The `test_role` is granted usage and monitoring permissions for the compute pool.

```sql
GRANT BIND SERVICE ENDPOINT ON ACCOUNT TO ROLE test_role;

CREATE COMPUTE POOL tutorial_compute_pool
MIN_NODES = 1
MAX_NODES = 1
INSTANCE_FAMILY = CPU_X64_XS;
GRANT USAGE, MONITOR ON COMPUTE POOL tutorial_compute_pool TO ROLE test_role;
```

## Role Assignment

This section assigns the `test_role` to the user `user`. This allows the user to use the permissions granted to `test_role`. You should change it to the user you would like to assign the test_role to.

```sql
GRANT ROLE test_role TO USER user;
```

## Setting Active Role, Database, and Warehouse

This section sets the active role, database, and warehouse for the current session. This is necessary to ensure that subsequent commands are executed with the correct context.

```sql
USE ROLE test_role;
USE DATABASE tutorial_db;
USE WAREHOUSE tutorial_warehouse;
```

## Schema, Repository, and Stage Setup

In this section, a schema (`data_schema`) is created within the database. The schema helps organize database objects. Additionally, an image repository (`tutorial_repository`) and a stage (`tutorial_stage`) are created. The stage is used to manage external data files, and the repository is for managing container images.

```sql
CREATE SCHEMA IF NOT EXISTS data_schema;
USE SCHEMA data_schema;
CREATE IMAGE REPOSITORY IF NOT EXISTS tutorial_repository;
CREATE STAGE IF NOT EXISTS tutorial_stage
DIRECTORY = ( ENABLE = true );
```

## Setting Up the Environment for Snowflake SPL Service

This guide will walk you through installing the required tools, building and uploading the project image, and creating the compute pool and SPL service in Snowflake.

### 1. Install JDK 1.8

The project requires **JDK 1.8**. Please download it from [Oracle's website](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html) and set the appropriate `JAVA_HOME` environment variable.

To verify that JDK is installed correctly, run:
```bash
java -version
```
Make sure the output shows the correct version (Java 1.8).

### 2. Install Maven

You also need to install **Maven**. On macOS, it can be easily installed via [Homebrew](https://brew.sh/):
```bash
brew install maven
```
To verify Maven installation, run:
```bash
mvn -version
```
Ensure that the version output matches your requirements.

### 3. Build

You need to build the code using the following command. Note that the build may fail at the last step, however, all the necessary asset will be generated.
```
mvn clean package -Prelease
```

### 4. Upload the Docker Image

We provide a script to **build** the project and **upload** the resulting Docker image to a repository managed by Snowflake. You can customize the repository location if needed.

Before running the script, set your Snowflake account as an environment variable:
```bash
export SNOWFLAKE_ACCOUNT=your-snowflake-account
```
Then run the build script:
```bash
./push_to_snowflake.sh
```
This script will build the Docker image and upload it to the Snowflake-managed Docker repository.

### 5. Create the Compute Pool and SPL Service in Snowflake

To create the SPL service in Snowflake, run the following SQL command in your Snowflake workbook. This command will create a service that provides endpoints to execute SPL files saved in the specified path.
```sql
CREATE SERVICE spl_service
IN COMPUTE POOL tutorial_compute_pool
FROM SPECIFICATION $$
spec:
container:
- name: main
image: /tutorial_db/data_schema/tutorial_repository/spl_service:latest
env:
SNOWFLAKE_WAREHOUSE: tutorial_warehouse
volumeMounts:
- name: data
mountPath: /opt/data
endpoints:
- name: spl
port: 8502
public: true
volumes:
- name: data
source: "@tutorial_stage"
$$
MIN_INSTANCES=1
MAX_INSTANCES=1;
```

The service will provide endpoints to allow users to execute SPL files located in the main path, which is backed by the stage. As long as the SPL file is in the stage, it can be executed via REST APIs.

To **check the status** of the service or **retrieve logs**, use the following SQL commands:
```sql
SELECT SYSTEM$GET_SERVICE_STATUS('spl_service');
SELECT SYSTEM$GET_SERVICE_LOGS('spl_service', '0', 'main');
```

### 6. Execute SPL Using REST API

To execute SPL via REST API, first get the service endpoint:
```sql
SHOW ENDPOINTS IN SERVICE spl_service;
```

From the result, copy the `ingress_url` and paste it into your web browser (e.g., Chrome). You can then invoke the SPL using a REST API request like this:
```bash
https://your-ingress-url.snowflakecomputing.app/file_test.splx()
```
Replace `your-ingress-url` with the actual URL obtained from the `SHOW ENDPOINTS` command.

This assumes that both the `file_test.splx` and any relevant data are in the `mainPath` backed by the stage.

### 7. Upload Data and SPL Files to Snowflake Stage

To upload data or SPL files into the Snowflake stage, use **SnowSQL** (see [SnowSQL documentation](https://docs.snowflake.com/en/user-guide/snowsql)). For example, to upload the `employee.btx` file:
```sql
PUT file:////path-to-esproc/mainPath/employee.btx @tutorial_stage
AUTO_COMPRESS=FALSE
OVERWRITE=TRUE;
```
Change `path-to-esproc` to the actual path on your machine. This command will place the file into the `tutorial_stage`, making it accessible for SPL execution.

### Summary

In this guide, you've set up your environment, built the project Docker image, created a Snowflake SPL service, and learned how to execute SPL files. Make sure to verify each step, ensuring everything is correctly configured for smooth operation.
3 changes: 3 additions & 0 deletions bin/ServerConsole2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
source /app/bin/setEnv2.sh
"$EXEC_JAVA" -Xms128m -Xmx1024m -cp "$START_HOME"/app/target/classes:"$START_HOME"/app/lib/*:"$START_HOME"/app/jdbc/* -Duser.language="$language" -Dstart.home="$START_HOME"/app com.scudata.ide.spl.ServerConsole $1 $2
2 changes: 1 addition & 1 deletion bin/config.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jvm_args=-Xms128m -Xmx1024m
esproc_port=41733;jvm_args=-Xms128m -Xmx1024m
4 changes: 4 additions & 0 deletions bin/setEnv2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
START_HOME=/
JAVA_HOME=/usr/bin/
EXEC_JAVA=$JAVA_HOME/java
language=en
2 changes: 1 addition & 1 deletion bin/startDataBase.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
source /Applications/esProc.app/Contents/raqsoft/esProc/bin/setEnv.sh
RAQCLASSPATH=$START_HOME/common/jdbc/hsqldb-2.2.8.jar:
RAQCLASSPATH=$START_HOME/common/jdbc/hsqldb-2.7.3-jdk8.jar:
"$EXEC_JAVA" -Xms128m -Xmx1024m -cp "$RAQCLASSPATH" org.hsqldb.server.Server -database.0 file:"$START_HOME"/esProc/database/demo/demo -dbname.0 demo
18 changes: 10 additions & 8 deletions config/raqsoftConfig.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>

<Config Version="3">
<Runtime>
<DBList>
<DBList>
</DBList>
<Esproc>
<charSet>GBK</charSet>
Expand All @@ -11,7 +12,7 @@
<dateFormat>yyyy-MM-dd</dateFormat>
<timeFormat>HH:mm:ss</timeFormat>
<dateTimeFormat>yyyy-MM-dd HH:mm:ss</dateTimeFormat>
<mainPath />
<mainPath>/opt/data</mainPath>>
<tempPath />
<bufSize>65536</bufSize>
<parallelNum>1</parallelNum>
Expand All @@ -21,13 +22,14 @@
<fetchCount>9999</fetchCount>
<extLibsPath/>
<customFunctionFile>customFunctions.properties</customFunctionFile>

</Esproc>
<Logger>
<Level>INFO</Level>
</Logger>
</Runtime>
<JDBC>
<load>Runtime,Server</load>
<gateway></gateway>
</Runtime>
<JDBC>
<load>Runtime,Server</load>
<gateway></gateway>
</JDBC>
</Config>
</Config>
Loading