Skip to content

Commit

Permalink
Bump version.
Browse files Browse the repository at this point in the history
Update github repo url.
  • Loading branch information
kai-niemi committed Nov 20, 2023
1 parent 36581f7 commit 9e7ed5a
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 48 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Java CI with Maven](https://github.com/kai-niemi/roach-pipeline/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/kai-niemi/roach-pipeline/actions/workflows/maven.yml)
[![Java CI with Maven](https://github.com/cloudneutral/roach-pipeline/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/cloudneutral/roach-pipeline/actions/workflows/maven.yml)

# Pipeline

Expand Down Expand Up @@ -89,7 +89,7 @@ Confirm the installation by running:

## Clone the project

git clone [email protected]:kai-niemi/roach-pipeline.git pipeline
git clone [email protected]:cloudneutral/roach-pipeline.git pipeline

## Build the executable jar

Expand Down Expand Up @@ -199,7 +199,4 @@ To disable the shell, use:

# Terms of Use

This tool is an experimental prototype and not supported by Cockroach Labs. Use of this driver
is entirely at your own risk and Cockroach Labs makes no guarantees or warranties about its operation.

See [MIT](LICENSE.txt) for terms and conditions.
80 changes: 80 additions & 0 deletions docs/etc/sandbox2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# DDL for PSQL

```sql
drop table transaction_item cascade ;
drop table transaction cascade ;
drop table account cascade ;

create table account
(
id int,
balance numeric(19, 2) not null,
currency varchar(64) not null,
name varchar(128) not null,

primary key (id)
);

create table transaction
(
id int not null,
booking_date date null,
primary key (id)
);

create table transaction_item
(
transaction_id int not null,
account_id int not null,
amount numeric(19, 2) not null,
currency varchar(64) not null,
running_balance numeric(19, 2) not null,
note varchar(255),

primary key (transaction_id, account_id)
);

alter table transaction_item
add constraint fk_txn_item_ref_transaction
foreign key (transaction_id) references transaction (id);
alter table transaction_item
add constraint fk_txn_item_ref_account
foreign key (account_id) references account (id);
```

# DML for PSQL

```sql
insert into account (id,balance,currency,name)
select no,
500.00 + random() * 500.00,
'USD',
md5(random()::text)
from generate_series(1, 10) no;

insert into transaction (id,booking_date)
select no,
now()::date
from generate_series(1, 500000) no;

insert into transaction_item (transaction_id,account_id,amount,currency,running_balance,note)
select no,
round(1 + random() * 9),
500.00 + random() * 500.00,
'USD',
500.00 + random() * 500.00,
'Cockroaches can eat anything'
from generate_series(1, 500000) no;
```

# Get and Post forms

pg_dump --dbname=crdb_test --table=transaction_item --schema-only
curl -X GET http://localhost:8090/sql2sql/form?table=account > account.json
curl -X GET http://localhost:8090/sql2sql/form?table=transaction > transaction.json
curl -X GET http://localhost:8090/sql2sql/form?table=transaction_item > transaction_item.json
curl -X GET http://localhost:8090/datasource/source-tables | grep topologyOrder
curl -d "@account.json" -H "Content-Type:application/json" -X POST http://localhost:8090/sql2sql
curl -d "@transaction.json" -H "Content-Type:application/json" -X POST http://localhost:8090/sql2sql
curl -d "@transaction_item.json" -H "Content-Type:application/json" -X POST http://localhost:8090/sql2sql
86 changes: 45 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<version>3.1.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>io.roach.pipeline</groupId>
<artifactId>pipeline</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>

<name>Pipeline</name>

<description>
Expand All @@ -23,11 +24,41 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<awssdk.version>2.15.58</awssdk.version>
<antlr.version>4.9.3</antlr.version>
<spring-shell.version>3.0.0-RC1</spring-shell.version>
<awssdk.version>2.21.26</awssdk.version>
<antlr.version>4.13.1</antlr.version>
<spring-shell.version>3.1.4</spring-shell.version>
</properties>

<inceptionYear>2023</inceptionYear>

<scm>
<connection>scm:git:https://github.com/cloudneutral/roach-pipeline.git</connection>
<developerConnection>scm:git:https://github.com/cloudneutral/roach-pipeline.git</developerConnection>
<url>https://github.com/cloudneutral/roach-pipeline.git</url>
<tag>HEAD</tag>
</scm>

<developers>
<developer>
<name>Kai Niemi</name>
<organization>Cockroach Labs</organization>
<organizationUrl>https://www.cockroachlabs.com/</organizationUrl>
<timezone>UTC+1</timezone>
</developer>
</developers>

<licenses>
<license>
<name>The MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/cloudneutral/roach-pipeline/issues</url>
</issueManagement>

<dependencies>
<!-- Spring Boot -->
<dependency>
Expand Down Expand Up @@ -86,13 +117,13 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>hal-explorer</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.ttddyy</groupId>
<artifactId>datasource-proxy</artifactId>
<version>1.8.1</version>
<version>1.9</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
Expand Down Expand Up @@ -138,38 +169,9 @@
</dependencies>
</dependencyManagement>

<inceptionYear>2023</inceptionYear>

<scm>
<connection>scm:git:https://github.com/kai-niemi/roach-pipeline.git</connection>
<developerConnection>scm:git:https://github.com/kai-niemi/roach-pipeline.git</developerConnection>
<url>https://github.com/kai-niemi/roach-pipeline.git</url>
<tag>HEAD</tag>
</scm>

<developers>
<developer>
<name>Kai Niemi</name>
<organization>Cockroach Labs</organization>
<organizationUrl>https://www.cockroachlabs.com/</organizationUrl>
<timezone>UTC+1</timezone>
</developer>
</developers>

<licenses>
<license>
<name>The MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/kai-niemi/roach-pipeline/issues</url>
</issueManagement>

<build>
<finalName>pipeline</finalName>

<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -202,7 +204,7 @@
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.14.0</version>
<version>1.19.0</version>
<configuration>
<fetchRemote>false</fetchRemote>
<verbose>true</verbose>
Expand All @@ -216,7 +218,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down Expand Up @@ -260,13 +262,13 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>10.2.0.jre8</version>
<version>11.2.2.jre17</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.5.0.0</version>
<version>23.2.0.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand All @@ -281,7 +283,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.8.1</version>
<version>2.20.1</version>
</dependency>
<!-- EC2 and S3 -->
<dependency>
Expand All @@ -298,6 +300,7 @@
</profile>
</profiles>

<!--
<repositories>
<repository>
<id>spring-milestones</id>
Expand All @@ -308,4 +311,5 @@
</snapshots>
</repository>
</repositories>
-->
</project>
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipeline:
source:
url: jdbc:postgresql://192.168.1.99:26257/tpcc?sslmode=disable
username: root
password:
password:
target:
url: jdbc:postgresql://192.168.1.99:26257/tpcc_copy?sslmode=disable
username: root
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/rel.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html xmlns="http://www.w3.org/1999/html">
<body>
<p>
See <a href="https://github.com/kai-niemi/roach-pipeline/docs" target="_blank">Pipeline REST API Guide</a>.
See <a href="https://github.com/cloudneutral/roach-pipeline/docs" target="_blank">Pipeline REST API Guide</a>.
</p>
</body>
</html>

0 comments on commit 9e7ed5a

Please sign in to comment.