Knowledge HubCode Migration & Deployment

Code Migration & Deployment

How to build, package, and deploy DataKnits to Azure App Service, set up the Docker-based on-prem lakehouse, configure CI/CD, and migrate pipelines from legacy ETL tools.

Deploy to Azure App Service

Target environment: Resource group rde-app-group, region South India, App Service RDE (legacy Azure resource name — cannot be renamed in place). Runtime: NODE|24-lts.
Public URL: https://etl.dataknits.com

Prerequisites

Step 1 — Frontend Build (Vite)

cd Frontend
rm -rf dist
npm run build

Outputs Frontend/dist/ containing index.html plus hashed assets in assets/.

Step 2 — Backend Build (TypeScript)

cd ../Backend
rm -rf dist
npm run build

This runs: tsctsc-alias (path rewriting) → copies SQL migrations to dist/db/migrations/.

Step 3 — Wire Frontend into Backend Static Root

rm -rf Backend/dist/public
cp -r Frontend/dist Backend/dist/public

The Node server serves dist/public/ when SERVE_FRONTEND=true.

Step 4 — Package the Deployment ZIP

cd Backend
TS=$(date +%Y%m%d%H%M%S)
ZIP="../etl1-azure-deploy-${TS}.zip"
zip -rq1 -X "$ZIP" dist src/db/migrations node_modules package.json

Step 5 — Deploy to Azure

az webapp deployment source config-zip \
  --resource-group rde-app-group \
  --name RDE \
  --src "$ZIP"

Step 6 — Set Startup Command

az webapp config set \
  --resource-group rde-app-group \
  --name RDE \
  --startup-file "node dist/api/server.js"

Step 7 — Configure App Settings

Set all required environment variables (from Admin Guide → Environment Variables) via the Azure portal or:

az webapp config appsettings set \
  --resource-group rde-app-group \
  --name RDE \
  --settings DB_HOST="..." DB_NAME="etl_db" JWT_SECRET="..." ...

Docker Compose Setup

For on-premises deployments or development environments, DataKnits ships a Docker Compose configuration that provisions the full stack including the Iceberg Lakehouse.

Services in docker-compose.etl.yml

ServiceImagePurpose
etl1-apiDataKnits BackendCore API server and code generation engine.
etl1-dbpostgres:15Metadata database with pgcrypto, ltree, pg_trgm extensions.
etl1-spark-icebergApache Spark + IcebergPySpark execution engine for local/dev pipelines.
etl1-iceberg-restIceberg REST CatalogIceberg table catalog (namespaces, schemas, partitions).
etl1-minioMinIOS3-compatible object storage for lakehouse warehouse files.

Start the Stack

./start.sh
# or manually:
docker compose -f docker-compose.etl.yml up -d

Stop the Stack

./stop.sh
# or:
docker compose -f docker-compose.etl.yml down

CI/CD Pipeline

The recommended CI/CD flow via Azure DevOps or GitHub Actions:

  1. Lint & Type-checktsc --noEmit on both Frontend and Backend.
  2. Unit Testsnpm test in both packages.
  3. Build — Run steps 1–4 from the Azure deployment section above.
  4. Deploy to Staging — Zip-deploy to the staging App Service slot.
  5. Smoke Tests — Run Playwright E2E tests against staging.
  6. Swap Slots — Azure slot swap from staging to production (zero-downtime).

Migrating from Legacy ETL Tools

DataKnits is designed for teams migrating from tools like Informatica, Talend, SSIS, or hand-written PySpark scripts.

Migration Patterns

Source ToolApproach
Informatica / TalendMap each mapping/component to a DataKnits node type. Source/Target connectors map 1:1. Transformations map to DataKnits nodes (Filter, Join, Aggregate, Derive). Complex expressions go in Custom SQL nodes.
SSIS (.dtsx)Parse SSIS package XML to extract source/target connections and data flow tasks. Re-create in DataKnits with equivalent nodes. SSIS Derived Column → DataKnits Derive Node.
Hand-written PySparkReverse-engineer logic into DataKnits nodes. Complex custom logic stays in Custom SQL or Derive nodes. DataKnits can also import and run existing .py scripts as-is via the Execution Service.
SQL stored proceduresWrap in Custom SQL node or break down into Aggregate + Filter + Join nodes for visual representation. DataKnits generates equivalent SQL for pushdown scenarios.

What Carries Over Automatically

Runtime Dependencies

DataKnits does not bundle Spark JARs — they must be on the classpath of your Spark cluster at execution time.

Key Backend NPM Packages

PackageVersionPurpose
express^4.18.2HTTP server and REST API routing.
pg^8.11.3PostgreSQL client.
uuid^9.0.1RFC-4122 UUID generation.
winston^3.11.0Structured JSON logging.
typescript^5.3.0TypeScript compiler (dev).

Required PostgreSQL Extensions

ExtensionPurpose
pgcryptoAES-256 encryption for connector secrets and SSH tunnel configs.
ltreeHierarchical path storage for folder/project trees.
pg_trgmTrigram-based fuzzy text search for the metadata catalog.

Required Spark JARs (examples)

JARConnector
postgresql.jarPostgreSQL, Greenplum
ojdbc11.jarOracle, OCI Autonomous DB
mssql-jdbc.jarSQL Server
snowflake-jdbc.jarSnowflake
hadoop-aws.jar + aws-java-sdk-bundle.jarAmazon S3
gcs-connector-hadoop3-shaded.jarGoogle Cloud Storage
hadoop-azure.jar + azure-storage.jarAzure Blob Storage, ADLS Gen2

See Technologies → individual connector pages for the complete JAR list per technology.