Skip to content

Commit

Permalink
Gh action new pr, oracle doc & changelog, sql quickstart, changelog Y…
Browse files Browse the repository at this point in the history
…outube videos
  • Loading branch information
hcourdent committed Jan 17, 2025
1 parent f17d491 commit 5aa8743
Show file tree
Hide file tree
Showing 16 changed files with 170 additions and 30 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/trigger_webhook_on_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Trigger Webhook on PR Ready for Review

on:
pull_request:
types: [ready_for_review]

jobs:
trigger-webhook:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Trigger Webhook
uses: fjogeleit/http-request-action@master
with:
url: 'https://app.windmill.dev/api/w/windmill-labs/jobs/run/f/f/docs/new_pr'
method: 'POST'
contentType: 'application/json'
customHeaders: |
{
"Authorization": "Bearer QfrOKeyXeSHT7C3IgZYF3WnBrssRokxN",
"Content-Type": "application/json"
}
data: |
{
"author": "${{ github.event.pull_request.user.login }}",
"title": "${{ github.event.pull_request.title }}",
"number": "${{ github.event.pull_request.number }}"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions changelog/2025-01-15-oracle-support/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
slug: oracle-support
version: v1.447.0
title: Oracle support
tags: ['Oracle', 'SQL', 'Enterprise']
description: Windmill now supports Oracle scripts.
features:
[
'Write your Windmill script in Oracle.',
'Run your Oracle scripts locally or in the cloud.',
]
image: ./editor_oracle.png
docs: /docs/getting_started/scripts_quickstart/sql
---
2 changes: 2 additions & 0 deletions docs/core_concepts/1_scheduling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ Go the the script or flow's page, click on the `Advanced` button, fill in the da

![Schedule to run later](./16_schedule_to_run_later.png 'Schedule to run later')

You can see the future runs in the [Runs menu](../../core_concepts/5_monitor_past_and_future_runs/index.mdx), with toggle 'Planned later'.

<!-- Resources -->

[flows]: ../../getting_started/6_flows_quickstart/index.mdx
Expand Down
5 changes: 4 additions & 1 deletion docs/core_concepts/38_object_storage_in_windmill/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ S3 files in Windmill are just pointers to the S3 object using its key. As such,
}
```

You can read a file from S3 or object storage within a script using the `loadS3File` and `loadS3FileStream` functions from the [TypeScript client](../../advanced/2_clients/ts_client.mdx) and the `wmill.load_s3_file` and `wmill.load_s3_file_stream` functions from the [Python client](../../advanced/2_clients/python_client.md).
You can read a file from S3 or object storage within a script using the `loadS3File` and `loadS3FileStream` functions from the [TypeScript client](../../advanced/2_clients/ts_client.mdx) and the `wmill.load_s3_file` and `wmill.load_s3_file_stream` functions from the [Python client](../../advanced/2_clients/python_client.md). When writing or manipulating file content, consider using `Blob` objects to efficiently handle binary data and ensure compatibility across different file types.

- **`loadS3File`**: This function loads the entire file content into memory as a single unit, which is useful for smaller files where you need immediate access to all data.
- **`loadS3FileStream`**: This function provides a stream of the file content, allowing you to process large files incrementally without loading the entire file into memory, which is ideal for handling large datasets or files.

<Tabs className="unique-tabs">

Expand Down
4 changes: 2 additions & 2 deletions docs/core_concepts/3_resources_and_types/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Check our [list of integrations](../../integrations/0_integrations_on_windmill.m

## Create a resource

To create a resource using an existing type, go to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources </a> page and click "Add a resource/API".
To create a resource using an existing type, go to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources </a> page and click "Add resource".

![Add a resource](./add_resource.png.webp 'Add a resource')

Expand Down Expand Up @@ -76,7 +76,7 @@ a link, for example:
## Create a resource type

Windmill comes preloaded with some common Resource types, such as databases, apps, SMTP, etc. You can see the full list on [Windmill Hub](https://hub.windmill.dev/resources).
You can also add custom Resource types by clicking "Add a resource type" on the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a> page.
You can also add custom Resource types by clicking "Add a resource type" on the Resources page.

![Create resource type](./add_resource_type.png.webp)

Expand Down
2 changes: 2 additions & 0 deletions docs/getting_started/00_how_to_use_windmill/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Windmill is a fast, **<a href="https://github.com/windmill-labs/windmill">open-s

Quickly get started with our [Cloud App](https://app.windmill.dev/), no credit card required. Sign up using GitHub, GitLab, Google, or Microsoft SSO. Start with 1,000 monthly executions on our Community Plan, and easily upgrade for more. [Start with Windmill cloud](https://app.windmill.dev/).

Windmill cloud is hosted in the US. We offer dedicated cloud instances in the EU for [Cloud Enterprise](/pricing) customers.

<div className="grid grid-cols-2 gap-6 mb-4">
<DocCard
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import DocCard from '@site/src/components/DocCard';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# PostgreSQL, MySQL, MS SQL, BigQuery, Snowflake
# PostgreSQL, MySQL, MS SQL, BigQuery, Snowflake, Redshift, Oracle

In this quick start guide, we will write our first script in SQL. We will see how to connect a Windmill instance to an external SQL service and then send queries to the database using Windmill Scripts.

![Windmill & PostgreSQL, MySQL, BigQuery and Snowflake](./sqls.png.webp)
![Windmill & PostgreSQL, MySQL, BigQuery and Snowflake](./sqls.png)

This tutorial covers how to create a simple script through Windmill web IDE. See the dedicated page to [develop scripts locally](../../../advanced/4_local_development/index.mdx).

Expand All @@ -34,7 +34,7 @@ This tutorial covers how to create a simple script through Windmill web IDE. See

Windmill supports [PostgreSQL](https://www.postgresql.org/), [MySQL](https://www.mysql.com/), [Microsoft SQL Server](https://www.microsoft.com/sql-server), [BigQuery](https://cloud.google.com/bigquery) and [Snowflake](https://www.snowflake.com/). In any case, it requires creating a dedicated resource.

Although all users can use BigQuery, Snowflake and MS SQL through resources and [community-available languages](../index.mdx) (TypeScript, Python, Go, Bash etc.), only instances under [Enterprise edition](/pricing) and cloud workspaces can use BigQuery, Snowflake and MS SQL runtimes as a dedicated language.
Although all users can use BigQuery, Snowflake and MS SQL through resources and [community-available languages](../index.mdx) (TypeScript, Python, Go, Bash etc.), only instances under [Enterprise edition](/pricing) and cloud workspaces can use BigQuery, Snowflake, Oralce DB and MS SQL runtimes as a dedicated language.

## Create resource

Expand Down Expand Up @@ -70,8 +70,8 @@ You can pin a resource to an SQL query by adding a `-- database resource_path` l

To be able to connect to a [PostgreSQL](https://www.postgresql.org/) instance ([Supabase](../../../integrations/supabase.md), [Neon.tech](../../../integrations/neon.md), etc.), we'll need to define a Resource with the `PostgreSQL` Resource Type first.

Head to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a> page in the Windmill app, click on
"Add a resource/API" in the top right corner and select the `PostgreSQL` type.
Head to the [Resources](../../../core_concepts/3_resources_and_types/index.mdx) page, click on
"Add resource" in the top right corner and select the `PostgreSQL` type.

![Select PostgreSQL Resource Type](../../../assets/integrations/psql-1-resources.png.webp)

Expand Down Expand Up @@ -117,8 +117,8 @@ With [Sequin](https://sequin.io), developers can build on top of third-party ser

To be able to connect to a [MySQL](https://www.mysql.com/) instance, we'll need to define a Resource with the `MySQL` Resource Type first.

Head to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a> page in the Windmill app, click on
"Add a resource/API" in the top right corner and select the `MySQL` type.
Head to the [Resources](../../../core_concepts/3_resources_and_types/index.mdx) page, click on
"Add resource" in the top right corner and select the `MySQL` type.

![Select MySQL Resource Type](./select_mysql.png.webp)

Expand All @@ -138,8 +138,8 @@ Fill out the form with the information of your MySQL instance and "Test connecti

To be able to connect to a [Microsoft SQL Server](https://www.microsoft.com/sql-server) instance, we'll need to define a Resource with the `ms_sql_server` Resource Type first.

Head to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a> page in the Windmill app, click on
"Add a resource/API" in the top right corner and select the `ms_sql_server` type.
Head to the [Resources](../../../core_concepts/3_resources_and_types/index.mdx) page, click on
"Add resource" in the top right corner and select the `ms_sql_server` type.

![Select MySQL Resource Type](./select_mssql.png.webp)

Expand All @@ -161,8 +161,8 @@ To specify the application intent for read-only requests, add `-- ApplicationInt

To be able to connect to a [BigQuery](https://cloud.google.com/bigquery) instance, we'll need to define a Resource with the `BigQuery` Resource Type first.

Head to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a> page in the Windmill app, click on
"Add a resource/API" in the top right corner and select the `BigQuery` type.
Head to the [Resources](../../../core_concepts/3_resources_and_types/index.mdx) page, click on
"Add resource" in the top right corner and select the `BigQuery` type.

![Select BigQuery Resource Type](./select_bigquery.png.webp)

Expand All @@ -181,7 +181,7 @@ Head to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resource

Here's a step-by-step guide on where to find each detail.

1. **Service Account Creation**:
1. **Service account creation**:

- Go to the [Google Cloud Console](https://console.cloud.google.com/).
- Select the appropriate project from the top menu.
Expand All @@ -190,12 +190,12 @@ Here's a step-by-step guide on where to find each detail.
- Provide a name and optional description for the service account.
- Click "Create".

2. **Assign Roles**:
2. **Assign roles**:

- After creating the service account, you'll be prompted to grant roles to it. Select "BigQuery" roles such as "BigQuery Admin" or "BigQuery Data Editor" based on your needs.
- Click "Continue" and "Done" to create the service account.

3. **Generate Key**:
3. **Generate key**:

- In the "Service accounts" section, find the newly created service account in the list.
- Click on the three dots on the right and select "Manage keys", then "Add Key".
Expand All @@ -218,7 +218,7 @@ You can directly "Test connection" if needed.

To be able to connect to [Snowflake](https://www.snowflake.com/), you can choose to either setup [OAuth for Snowflake](/docs/misc/setup_oauth#oauth) or by defining a Snowflake Resource.

If a Snowflake OAuth connection is present, you can create a new Resource by heading to <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a>, clicking on "Add Resource" in the top right corner and selecting `snowflake_oauth`. Take a look at [this guide](/docs/misc/guides/snowflake_app_with_user_roles#sample-app-setup) to learn more about how to build an App with Snowflake OAuth integration.
If a Snowflake OAuth connection is present, you can create a new Resource by heading to [Resources](../../../core_concepts/3_resources_and_types/index.mdx), clicking on "Add Resource" in the top right corner and selecting `snowflake_oauth`. Take a look at [this guide](/docs/misc/guides/snowflake_app_with_user_roles#sample-app-setup) to learn more about how to build an App with Snowflake OAuth integration.

If you do not wish to use OAuth, click on "Add Resource" in the top right corner and select the `Snowflake` type instead.

Expand All @@ -237,7 +237,7 @@ If you do not wish to use OAuth, click on "Add Resource" in the top right corner

Here's a step-by-step guide on where to find each detail.

1. **Account Identifier**:
1. **Account identifier**:

The account identifier typically follows the format: `<orgname>-<account_name>`. You can find it in the Snowflake web interface:

Expand All @@ -254,7 +254,7 @@ Here's a step-by-step guide on where to find each detail.
- Select "Users" from the left navigation pane.
- Click the "+ CREATE USER" button to create a new user with a username and password.

3. **Public Key and Private Key**:
3. **Public key and private key**:

To create the public and private keys, you will need to generate them using a tool like OpenSSL:

Expand All @@ -266,7 +266,7 @@ Here's a step-by-step guide on where to find each detail.

[Snowflake Documentation on Key Pair Authentication & Key Pair Rotation](https://docs.snowflake.com/en/user-guide/key-pair-auth)

4. **Warehouse, Schema, Database, and Role**:
4. **Warehouse, schema, database, and role**:

These parameters are specific to your Snowflake environment and will depend on how your Snowflake instance is configured:

Expand Down Expand Up @@ -309,9 +309,37 @@ Now you can fill those values in Windmill, fill also the user and password for t

Once it's working press save and you have succesfully added your Redshift instance as a PostgreSQL resource!

### Oracle

To be able to connect to an [Oracle database](https://www.oracle.com/database/), you need to define an Oracle resource.

Head to the [Resources](../../../core_concepts/3_resources_and_types/index.mdx) page, click on
"Add resource" in the top right corner and select the `Oracle` type.

![Select Oracle Resource Type](./select_oracle.png)

| Property | Type | Description | Required |
| --------- | ------ | --------------- | -------- |
| database | string | Database name | true |
| user | string | Username | true |
| password | string | User's password | true |

Here's a step-by-step guide on where to find each detail.

1. **Database**: The name of the Oracle database you want to connect to. This can be found in your Oracle database configuration or by consulting your database administrator.

2. **Username**: The username for Oracle login. You will need to create a user if you don't have one:

- In the Oracle database interface, go to the "Users" section.
- Create a new user with a username and password.

3. **Password**: The password associated with the Oracle username.

You can directly "Test connection" if needed.

## Create script

Next, let's create a script that will use the newly created Resource. From the <a href="https://app.windmill.dev/" rel="nofollow">Home</a> page,
Next, let's create a script that will use the newly created Resource. From the Home page,
click on the "+Script" button. Name the Script, give it a summary, and select your preferred language, [PostgreSQL](#postgresql-1), [MySQL](#mysql-1), [MS SQL](#ms-sql-1), [BigQuery](#bigquery-1), [Snowflake](#snowflake-1).

![Script creation first step](../../../assets/integrations/sql_new_script.png.webp)
Expand Down Expand Up @@ -467,6 +495,32 @@ INSERT INTO demo VALUES ($1::TEXT, $2::INT)

Learn more about [the differences here](https://docs.aws.amazon.com/redshift/latest/dg/c_redshift-and-postgres-sql.html).

### Oracle

Arguments need to be passed in the given format:

```sql
-- database f/your/path
-- :name1 (text) = default arg
-- :name2 (int)
-- :name3 (int)
INSERT INTO demo VALUES (:name1, :name2);
UPDATE demo SET col2 = :name3 WHERE col2 = :name2;
```

"name1", "name2", "name3" being the names of the arguments, and "default arg" the optional default value.

Database resource can be specified from the UI or directly within the script with a line `-- database resource_path`.

<video
className="border-2 rounded-lg object-cover w-full h-full dark:border-gray-800"
controls
src="/videos/pin_database.mp4"
/>

<br/>
You can then write your prepared statement.

## Raw queries

A more convenient but less secure option is to execute raw queries with a TypeScript, Deno or Python client. This enables you more flexibility than SQL prepared statement. You can for instance do string interpolation to make the name of the table a parameter of your script: `SELECT * FROM ${table}`. However this is dangerous since the string is directly interpolated and this open the door for [SQL injections](https://en.wikipedia.org/wiki/SQL_injection). Use with care and only in trusted environment.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
13 changes: 10 additions & 3 deletions docs/getting_started/0_scripts_quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
SiDocker,
SiPhp,
SiAnsible,
SiRust
SiRust,
SiCplusplus
} from 'react-icons/si';

# Scripts quickstart
Expand Down Expand Up @@ -43,7 +44,7 @@ Windmill supports scripts in TypeScript, Python, Go, PHP, Bash, SQL and Rust.
/>
<DocCard
title="SQL & Query Languages"
description="Write your first Windmill script in PostgreSQL, MySQL, BigQuery or Snowflake SQL."
description="Write your first Windmill script in PostgreSQL, MySQL, MS SQL, BigQuery or Snowflake SQL."
href="/docs/getting_started/scripts_quickstart/sql"
Icon={SiPostgresql}
/>
Expand Down Expand Up @@ -77,4 +78,10 @@ Windmill supports scripts in TypeScript, Python, Go, PHP, Bash, SQL and Rust.
href="/docs/getting_started/scripts_quickstart/ansible"
Icon={SiAnsible}
/>
</div>
<DocCard
title="C#"
description="Write your first Windmill script in C#"
href="/docs/getting_started/scripts_quickstart/csharp"
Icon={SiCplusplus}
/>
</div>
4 changes: 2 additions & 2 deletions docs/integrations/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ You can find a list of all the officially supported Resource types on

:::

Head to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources</a> page in the Windmill app, click on
"Add a resource/API" in the top right corner and select the `mongodb_rest` type.
Head to the Resources page in the Windmill app, click on
"Add resource" in the top right corner and select the `mongodb_rest` type.

![Select Resource Type](../assets/integrations/1-resources.png.webp)

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ want an integration to be supported by Windmill directly, please submit a new
**Navigate to the <a href="https://app.windmill.dev/resources" rel="nofollow">Resources page</a> page**
![Resources page](../assets/integrations/sb-2-1-resources.png.webp)

**Click "Add a resource/API"** ![Resource selector](../assets/integrations/sb-2-2-drawer.png.webp)
**Click "Add resource"** ![Resource selector](../assets/integrations/sb-2-2-drawer.png.webp)

**Search for `Supabase` and select the resource type**
![Resource selector](../assets/integrations/sb-2-3-search.png.webp)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ const sections = [
link: '/docs/apps/public_apps'
},
{
name: 'BigQuery, Snowflake and MS SQL runtimes as languages',
name: 'BigQuery, Snowflake, Oracle DB and MS SQL runtimes as languages',
tiers: {
'tier-free-selfhost': false,
'tier-enterprise-selfhost': true,
Expand Down
Loading

0 comments on commit 5aa8743

Please sign in to comment.