SAS → PySpark

Automated SAS to PySpark migration

A SAS‑to‑cloud migration acceleration toolkit: analysis, deterministic conversion to PySpark, and automation, built for PySpark-compatible platforms: Databricks, Snowflake and Microsoft Fabric.

Free trial account. Code Analyzer on any number of SAS assets,
no time limit, no usage limit.

SAS key_orders.sas
%macro key_orders(min);
  data work.key_orders;
    set sales.orders;
    where amt > &min;
    keep id region amt;
  run;
%mend;
%key_orders(1000);
PySpark key_orders.py
# Converted by Alchemist
def key_orders(min):
	df_key_orders = (
		spark.table("SALES.ORDERS")
		.filter(f"AMT > {min}")
		.select(
		    "ID",
		    "REGION",
		    "AMT",
		)
	)
	df_key_orders.createOrReplaceTempView(
		"KEY_ORDERS"
	)

key_orders("1000")

A macro-driven DATA step becomes a Python function: a DataFrame chain and a temp view.

Why Alchemist

Why do teams migrate with Alchemist?

Because the output, the kits and the cost are settled before the project starts.

  1. Deterministic conversion, not guesswork

    The Converter parses SAS into a syntax tree (a structured map of the code) and rewrites it with pattern matching and templates. Same input, same output, every run. An LLM pass is optional, never the engine.

  2. Toolkit, not a monolith

    Analyzers, the Converter and the migration frameworks are separate tools. Run only the ones your migration needs, in your own infrastructure and your own process, and add the next one when the project calls for it.

  3. Self-serve, with the cost known first

    The Assessment and Conversion Kits need no services: sign up, download, run your first analysis in minutes. The free Code Analyzer counts the tokens in your estate (Alchemist's own code metric, not an LLM token), and the calculator in your account turns that count into a figure before you talk to anyone.

Toolkit

End‑to‑end migration with the Alchemist toolkit

Analyze the estate, convert data pipelines and macro-driven workflows to PySpark, automate the rest.

  1. 01

    Analysis

    Four analyzers read the code, the logs and the metadata server, so the scope is measured before anything is rewritten.

    • Alchemist trial dashboard for a sample SAS estate: token count, source files, executable types (SAS programs, EG flows, DI jobs) and workload types

      Free Dashboard

      Included in: Trial

      Runs on the trial license against any number of SAS assets and reports the token count, executable types and workload mix of the whole scope.

    • Alchemist Code Analyzer network graph of a SAS estate: clusters of jobs and datasets linked by lineage, with the filter panel open and a Graph view / Lineage switch

      Code Analyzer

      Included in: Assessment · Conversion · Full

      Parses SAS programs, EG projects and DI jobs into a syntax tree and returns statement-level statistics, complexity scores, and data and macro lineage as a dependency graph.

    • Alchemist Log Analyzer, Data Access view: counts of open operations by mode, status and engine, and a table of dataset accesses with library, user and source log file

      Log Analyzer

      Included in: Assessment · Full

      Reads SAS server and audit logs and lists who ran what: every dataset opened, read, written or updated, by user, library and engine, with runtimes and failures.

    • Metascope by T1A: inventory of stored processes from the SAS metadata server with folder, usage version, description and ID; the sidebar lists users, groups, libraries, jobs, tables, servers and EG projects

      Metascope

      Included in: Assessment · Full

      Extracts the SAS metadata server data: users, groups, libraries, tables, jobs, stored processes, EG projects, deployed flows and servers, exportable as CSV.

  2. 02

    Conversion

    Deterministic SAS‑to‑PySpark conversion you configure.

    Same input, same output: the tree decides, not a model.

    Code Converter

    Included in: Conversion · Full

    Deterministic SAS‑to‑PySpark conversion: pattern matching on the syntax tree, templates and data-object remapping, tuned for readable output.

    • EG projects and DI jobs converted from their metadata, not only their code
    • Configurable output format, code structure and formatting
    • Templates adapt the conversion to your architecture decisions
    • An LLM refinement is available as an optional second step
    • No standalone runtime framework required
    Inputs
    • SAS Base.sas
    • Enterprise Guide.egp
    • DI jobs.spk
    Output: PySpark, for three platforms
    • DatabricksNativeNative output, including Databricks notebooks.
    • SnowflakeCompatibleFully compatible. Snowflake guide
    • Microsoft FabricCompatibleFully compatible.

    Prophecy is also a target, for SAS DI sources.

  3. 03

    Automation

    Frameworks and tools that turn conversion into migration.

    Included in: Full Kit

    Three routes in, one deterministic conversion out.

    E2E Migration Framework

    Analysis, conversion, validation and deployment as one repeatable, agent‑orchestrated workflow.

    • One‑click conversion at scale (100+ assets)
    • Validation and troubleshooting inside the workflow
    • Configured for your environment with T1A.

    Change Management Platform

    Tracks and governs migration changes across teams and phases: versioning, approvals, rollout control.

    • Work items, UAT records, progress dashboards
    • Gantt timelines and incident management in one place

    Self-Service Conversion

    Teams convert their own scope on demand: in the Alchemist UI, via API and MCP, or from a coding agent.

    • Skills and MCP in your local agents or your cloud platform's agent (Genie, Cortex, Copilot)
    • Deployed locally or in‑platform, code never leaves your workspace
    How coding agents drive Alchemist

    SAS–Cloud Coexistence Framework

    SAS and Databricks run side by side during the migration, so each team cuts over at its own pace.

    • Shared data access between SAS and Databricks
    • Phased cutover, no big-bang switch
Pricing

How is Alchemist priced?

One-time license per kit, plus pay-as-you-go on the tokens you convert. No subscription, no renewal. Only the Converter is metered; the analyzers run without usage limits. Licenses start at $10K.

Calculate your priceHow pricing works

The calculator is in your Alchemist account: run the free Code Analyzer on your own SAS assets, and it turns the token count into a figure.

The four kits compared: tools, metering, T1A services and fit
KitTrialFreeAssessment KitOne-time licenseConversion KitOne-time license + pay-as-you-goFull KitOne-time license + pay-as-you-go, with T1A enablement
Tools
  • Code Analyzer dashboard
  • Code Analyzer
  • Log Analyzer
  • Metascope
  • Code Converter
  • Code Analyzer
  • Assessment and Conversion Kits
  • E2E Migration Framework
  • Other tools on request
MeteringAny number of assets, no time limit, no usage limitAny number of assets, no time limit, no usage limitToken allowance included, then pay-as-you-goToken allowance included, then pay-as-you-go at a discount
T1A servicesNot requiredNot requiredNot requiredT1A migration enablement, scoped separately
Best forMeasure your token count before you buy anythingFull discovery of a SAS environment before a large migrationKnown scope, under about 100 assetsHundreds of assets; comes with T1A services
  • Trial

    Free

    • Code Analyzer dashboard
    Metering
    Any number of assets, no time limit, no usage limit
    T1A services
    Not required
    Best for
    Measure your token count before you buy anything
  • Assessment Kit

    One-time license

    • Code Analyzer
    • Log Analyzer
    • Metascope
    Metering
    Any number of assets, no time limit, no usage limit
    T1A services
    Not required
    Best for
    Full discovery of a SAS environment before a large migration
  • Conversion Kit

    One-time license + pay-as-you-go

    • Code Converter
    • Code Analyzer
    Metering
    Token allowance included, then pay-as-you-go
    T1A services
    Not required
    Best for
    Known scope, under about 100 assets
  • Full Kit

    One-time license + pay-as-you-go, with T1A enablement

    • Assessment and Conversion Kits
    • E2E Migration Framework
    • Other tools on request
    Metering
    Token allowance included, then pay-as-you-go at a discount
    T1A services
    T1A migration enablement, scoped separately
    Best for
    Hundreds of assets; comes with T1A services

T1A services: migration enablement delivered by T1A, the company behind Alchemist, as your migration partner.
Other migration partners are listed on the partners page.

License cost references

Four real cases, license cost only. Full Kit engagements add T1A services, scoped separately.

CaseSAS scopeTokensKitLicense cost*Use
Healthcare150 SAS EGP200K tokensFull Kit$37,500BU self-service analytics
Health insurance (reporting)3 SAS EGP67K tokensConversion Kit$13,600Analytical reporting
Health insurance (DWH)1,600 SAS DI997K tokensFull Kit$89,000EDWH: ODS + DM
Health insurance (data mart)75 SAS scripts101K tokensFull Kit$35,000Data mart

* License cost only, as of 2026. Full Kit engagements add T1A services, scoped separately.

Customers

What has Alchemist already migrated?

Production SAS migrations since 2022, delivered on Databricks: a company-wide data warehouse, reporting estates, predictive models.

Delivered migrations

CustomerYearsSourceScaleMigration
Major insurer, Benelux2022–2025SAS DI jobs1,600 ETL jobsCompany-wide enterprise data warehouse (EDWH) to Databricks, with SAS and Databricks running side by side during conversion. Delivered as a multi-phase program of several projects.80% automation70% less UAT time
Healthcare company, Japan2024SAS Enterprise Guide150+ pipelinesReporting from on-prem SAS Enterprise Guide to Azure Databricks, with a data mart and user training.40% scope reduction in discovery
Luxury fashion house, Italy2026SAS Base scripts100+ scriptsEnd‑to‑end migration of predictive models to Databricks: business-driven model validation, automated validation agents, scalable pipelines.50% faster runtime
Telco, Canada2022–presentSAS platformPer business unitTechnical audit and business discovery of the SAS platform, then cloud enablement and workload migration, one business unit at a time.
SAS environments analyzed
50+
SAS DI jobs migrated
3,000+
Enterprise Guide flows migrated
400+
lines of SAS code migrated
2M+

as of 2026

Start

Start with your own SAS code

Sign up, run the free Code Analyzer on your own assets and see the size of the job today. Or try the live demo without an account.

Sign-up to first analysis takes minutes; the quick start walks through it.

Or talk to us

We answer within a business day.

FAQ

What do evaluators ask before a trial?

Short answers to what evaluators ask first. For licensing details, see the pricing page; for everything else, the documentation.

Which platforms does Alchemist support?

Inputs are SAS Base scripts (.sas), Enterprise Guide projects (.egp) and DI jobs (.spk). The output is PySpark for every PySpark-compatible platform: native on Databricks, including Databricks notebooks, and fully compatible with Snowflake and Microsoft Fabric. A SAS-to-Snowflake guide was written with the Snowflake team. Prophecy is a target for SAS DI sources.

How long does a SAS migration with Alchemist take?

Even with automation, an end‑to‑end migration takes at least 2–3 months, mostly organizational time in larger companies. Mid-size projects have taken 4–6 months to move the business process fully. The conversion step alone ran up to 20× faster with 10× less manual effort than LLM-only conversion. That figure covers the conversion step, not the whole migration.

Does my code leave my environment?

Not if you run Alchemist locally or inside your cloud platform. The Code Analyzer and Converter are binaries that run on your SAS assets where they sit. The full stack can also be deployed air-gapped, as a Docker image inside your own network. A hosted service also exists for teams that prefer nothing to install; connection details are in your Alchemist account.

Do I need T1A services to use Alchemist?

No. The Assessment Kit and the Conversion Kit work standalone: sign up, download, activate the license and run, without talking to anyone. The Full Kit adds the end‑to‑end framework and other tooling that needs enablement and configuration for your environment. It therefore comes with T1A services, and is recommended only for migrations with hundreds of assets.

Can coding agents drive Alchemist?

Yes. Alchemist skills and MCP are available in your local coding agents or in your cloud platform's agent. The agent delegates SAS‑to‑PySpark conversion to Alchemist and receives the converted code back. The conversion itself stays deterministic; the agent only orchestrates it. Setup is described on the Agents page and in the documentation.