Skip to content

Commit

Permalink
pipelines: fix example supabase pipelines
Browse files Browse the repository at this point in the history
Fixes errors in supabase example pipelines.

Signed-off-by: Daniel Mangum <[email protected]>
  • Loading branch information
hasheddan committed Jan 6, 2025
1 parent aafed41 commit 8f4c696
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/data-routing/5-examples/24-supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ managed through a single interface. Supabase provides multiple ways to consume
data from Golioth.

The following examples will need credentials from Supabase. Create two
[secrets](/data-routing/secrets) based on the
[Service Role Key](https://supabase.com/docs/guides/api/api-keys#the-servicerole-key).
`$SUPABASE_KEY` should be the the Server Role Key while `$SUPABASE_SERVICE_KEY`
should take the form of 'Bearer
$Service_Role_Key'. For example, if the `Service Role Key` is `12345` than the `$SUPABASE_SERVICE_KEY`should be set to`Bearer
12345`.

The first example is the simplest and uses the
[REST API](https://supabase.com/docs/guides/api). Assuming a database named
[secrets](/data-routing/secrets) based on the [Service Role
Key](https://supabase.com/docs/guides/api/api-keys#the-servicerole-key).
`$SUPABASE_API_KEY` should be the the Server Role Key while
`$SUPABASE_AUTH_HEADER` should take the form of 'Bearer $Service_Role_Key'. For
example, if the `Service Role Key` is `12345` than the
`$SUPABASE_AUTH_HEADER` should be set to`Bearer 12345`.

The first example is the simplest and uses the [REST
API](https://supabase.com/docs/guides/api). Assuming a table named
`golioth_pipeline_basic` with the following columns:

| id | created_at | temp | lat | long |
| -- | ---------- | ---- | --- | ---- |

Create the following Pipeline:

<Pipeline link='https://console.golioth.io/pipeline?name=Supabase%20REST%20API%20Example&pipeline=c3RlcHM6CiAgLSBuYW1lOiBzdGVwMAogICAgZGVzdGluYXRpb246CiAgICAgIHR5cGU6IHdlYmhvb2sKICAgICAgdmVyc2lvbjogdjEKICAgICAgcGFyYW1ldGVyczoKICAgICAgICB1cmw6IGh0dHBzOi8vcmdnY3Fvc2x0cW9wY3d0d3doa2Muc3VwYWJhc2UuY28vZnVuY3Rpb25zL3YxL2dvbGlvdGgtcGlwZWxpbmUKICAgICAgICBoZWFkZXJzOgogICAgICAgICAgQXV0aG9yaXphdGlvbjogJFNVUEFCQVNFX0FVVEhfSEVBREVSCiAgICAgICAgICBhcGlrZXk6ICRTVVBBQkFTRV9BUElfS0VZCg=='/>
<Pipeline link='https://console.golioth.io/pipeline?name=Supabase%20REST%20API%20Example&pipeline=ZmlsdGVyOgogIHBhdGg6ICIqIgogIGNvbnRlbnRfdHlwZTogYXBwbGljYXRpb24vanNvbgpzdGVwczoKICAtIG5hbWU6IHN0ZXAwCiAgICBkZXN0aW5hdGlvbjoKICAgICAgdHlwZTogd2ViaG9vawogICAgICB2ZXJzaW9uOiB2MQogICAgICBwYXJhbWV0ZXJzOgogICAgICAgIHVybDogaHR0cHM6Ly9yZ2djcW9zbHRxb3Bjd3R3d2hrYy5zdXBhYmFzZS5jby9yZXN0L3YxL2dvbGlvdGhfcGlwZWxpbmVfYmFzaWMKICAgICAgICBoZWFkZXJzOgogICAgICAgICAgQXV0aG9yaXphdGlvbjogJFNVUEFCQVNFX0FVVEhfSEVBREVSCiAgICAgICAgICBhcGlrZXk6ICRTVVBBQkFTRV9BUElfS0VZ'/>

The second example uses
[Edge Functions](https://supabase.com/docs/guides/functions). While
Expand All @@ -43,7 +43,7 @@ columns:

Create the following Pipeline:

<Pipeline link='https://console.golioth.io/pipeline?name=Supabase%20Edge%20Function%20Example&pipeline=c3RlcHM6CiAgLSBuYW1lOiBzdGVwMAogICAgZGVzdGluYXRpb246CiAgICAgIHR5cGU6IHdlYmhvb2sKICAgICAgdmVyc2lvbjogdjEKICAgICAgcGFyYW1ldGVyczoKICAgICAgICB1cmw6IGh0dHBzOi8vcmdnY3Fvc2x0cW9wY3d0d3doa2Muc3VwYWJhc2UuY28vZnVuY3Rpb25zL3YxL2dvbGlvdGgtcGlwZWxpbmUKICAgICAgICBoZWFkZXJzOgogICAgICAgICAgQXV0aG9yaXphdGlvbjogJFNVUEFCQVNFX0FVVEhfSEVBREVSCiAgICAgICAgICBhcGlrZXk6ICRTVVBBQkFTRV9BUElfS0VZCg=='/>
<Pipeline link='https://console.golioth.io/pipeline?name=Supabase%20Edge%20Function%20Example&pipeline=ZmlsdGVyOgogIHBhdGg6ICIqIgogIGNvbnRlbnRfdHlwZTogYXBwbGljYXRpb24vanNvbgpzdGVwczoKICAtIG5hbWU6IHN0ZXAwCiAgICBkZXN0aW5hdGlvbjoKICAgICAgdHlwZTogd2ViaG9vawogICAgICB2ZXJzaW9uOiB2MQogICAgICBwYXJhbWV0ZXJzOgogICAgICAgIHVybDogaHR0cHM6Ly9yZ2djcW9zbHRxb3Bjd3R3d2hrYy5zdXBhYmFzZS5jby9mdW5jdGlvbnMvdjEvZ29saW90aC1waXBlbGluZQogICAgICAgIGhlYWRlcnM6CiAgICAgICAgICBBdXRob3JpemF0aW9uOiAkU1VQQUJBU0VfQVVUSF9IRUFERVIKICAgICAgICAgIGFwaWtleTogJFNVUEFCQVNFX0FQSV9LRVkK'/>

Create a new Edge Function called `golioth-pipelines` with the following code:

Expand Down

0 comments on commit 8f4c696

Please sign in to comment.