Skip to content

Commit

Permalink
docs: rename ouptut schema to dataset schema (#1165)
Browse files Browse the repository at this point in the history
changes URLs
added redirects
changes to prose
  • Loading branch information
TC-MO authored Aug 23, 2024
1 parent 0ce094f commit 3ea1c66
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 21 deletions.
4 changes: 4 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ server {
rewrite ^/platform/actors/development/testing-and-maintenance$ /platform/actors/development/deployment/automated-tests redirect;
rewrite ^/platform/actors/development/source-code$ /platform/actors/development/deployment/source-types redirect;

# Rename output schema to dataset schema
rewrite ^/platform/actors/development/actors-definition/output-schema$ /platform/actors/development/actors-definition/dataset-schema permanent;
rewrite ^academy/deploying-your-code/output-schema$ /academy/deploying-your-code/dataset-schema permanent;

# Removed pages
# GPT plugins were discontinued April 9th, 2024 - https://help.openai.com/en/articles/8988022-winding-down-the-chatgpt-plugins-beta
rewrite ^/platform/integrations/chatgpt-plugin$ https://blog.apify.com/add-custom-actions-to-your-gpts/ redirect;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ It's not expected to memorize all of the fields that properties can take or the

## Next up {#next}

In the [next lesson](./output_schema.md), we'll learn how to generate an appealing Overview table to display our Actor's results in real time, so users can get immediate feedback about the data being extracted.
In the [next lesson](platform/actors/development/actor-definition/dataset-schema), we'll learn how to generate an appealing Overview table to display our Actor's results in real time, so users can get immediate feedback about the data being extracted.
18 changes: 9 additions & 9 deletions sources/academy/platform/deploying_your_code/output_schema.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
title: Output schema
title: Dataset schema
description: Learn how to generate an appealing Overview table interface to preview your Actor results in real time on the Apify platform.
sidebar_position: 3
slug: /deploying-your-code/output-schema
slug: /deploying-your-code/dataset-schema
---

# Output schema {#output-schema}
# Dataset schema

**Learn how to generate an appealing Overview table interface to preview your Actor results in real time on the Apify platform.**

---

The Output schema generates an interface that enables users to instantly preview their Actor results in real time.
The Dataset schema generates an interface that enables users to instantly preview their Actor results in real time.

![Output Schema](../../../platform/actors/development/actor_definition/images/output-schema-example.png)
![Dataset Schema](../../../platform/actors/development/actor_definition/images/output-schema-example.png)

In this quick tutorial, you will learn how to set up an output tab for your own Actor.

## Implementation {#implementation}
## Implementation

Firstly, create a `.actor` folder in the root of your Actor's source code. Then, create a `actor.json` file in this folder, after which you'll have .actor/actor.json.

Expand Down Expand Up @@ -69,7 +69,7 @@ Next, copy-paste the following template code into your `actor.json` file.
}
```

To configure the output schema, simply replace the fields in the template with the relevant fields to your Actor.
To configure the dataset schema, replace the fields in the template with the relevant fields to your Actor.

For reference, you can use the [Zappos Scraper source code](https://github.com/PerVillalva/zappos-scraper-actor/blob/main/.actor/actor.json) as an example of how the final implementation of the output tab should look in a live Actor.

Expand Down Expand Up @@ -139,7 +139,7 @@ For reference, you can use the [Zappos Scraper source code](https://github.com/P
}
```

Note that the fields specified in the output schema should match the object keys of your resulting dataset.
Note that the fields specified in the dataset schema should match the object keys of your resulting dataset.

Also, if your desired label has the same name as the defined object key, then you don't need to specify a label name. The schema will, by default, show a capitalized version of the key and even split camel case into separate words and capitalize all of them.

Expand All @@ -162,7 +162,7 @@ const results = {

Great! Now that everything is set up, it's time to run the Actor and admire your Actor's brand new output tab.

> Need some extra guidance? Visit the [output schema documentation](/platform/actors/development/actor-definition/output-schema) for more detailed information about how to implement this feature.
> Need some extra guidance? Visit the [dataset schema documentation](/platform/actors/development/actor-definition/dataset-schema) for more detailed information about how to implement this feature.
A few seconds after running the Actor, you should see its results displayed in the `Overview` table.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const data = await gotScraping('https://api.cheddar.com/graphql', {
});
```
The final step after making the query is to format the data to match the expected output schema.
The final step after making the query is to format the data to match the expected dataset schema.
## Final code {#final-code}
Expand Down
2 changes: 1 addition & 1 deletion sources/academy/webscraping/api_scraping/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ For complex APIs that require certain headers and/or payloads in order to make a

APIs come in all different shapes and sizes. That means every API will vary in not only the quality of the data that it returns, but also the format that it is in. The two most common formats are JSON and HTML.

JSON responses are the most ideal, as they are easily manipulated in JavaScript code. In general, no serious parsing is necessary, and the data can be easily filtered and formatted to fit a scraper's output schema.
JSON responses are the most ideal, as they are easily manipulated in JavaScript code. In general, no serious parsing is necessary, and the data can be easily filtered and formatted to fit a scraper's dataset schema.

APIs which output HTML generally return the raw HTML of a small component of the page which is already hydrated with data. In these cases, it is still worth using the API, as it is still more efficient than making a request to the entire page; even though the data does still need to be parsed from the HTML response.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Actor `name`, `version`, `buildTag`, and `environmentVariables` are currently on
| `readme` | Optional | The path to the README file to be used on the platform. If not specified, the system will look for README files in the `.actor/README.md` and `README.md` paths, in that order of preference. Check out [Apify Academy article on writing a quality README files](/academy/get-most-of-actors/actor-readme) guidance. |
| `input` | Optional | You can embed your [input schema](./input_schema/index.md) object directly in `actor.json` under the `input` field. You can also provide a path to a custom input schema. If not provided, the input schema at `.actor/INPUT_SCHEMA.json` or `INPUT_SCHEMA.json` is used, in this order of preference. |
| `changelog` | Optional | The path to the CHANGELOG file displayed in the Information tab of the Actor in Apify Console next to Readme. If not provided, the CHANGELOG at `.actor/CHANGELOG.md` or `CHANGELOG.md` is used, in this order of preference. Your Actor doesn't need to have a CHANGELOG but it is a good practice to keep it updated for published Actors. |
| `storages.dataset` | Optional | You can define the schema of the items in your dataset under the `storages.dataset` field. This can be either an embedded object or a path to a JSON schema file. [Read more](./output_schema.md#specification-version-1) about Actor output schemas. |
| `storages.dataset` | Optional | You can define the schema of the items in your dataset under the `storages.dataset` field. This can be either an embedded object or a path to a JSON schema file. [Read more](platform/actors/development/actor-definition/dataset-schema) about Actor dataset schemas. |
| `minMemoryMbytes` | Optional | Specifies the minimum amount of memory in megabytes required by the Actor to run. Requires an _integer_ value. If both `minMemoryMbytes` and `maxMemoryMbytes` are set, then `minMemoryMbytes` must be equal or lower than `maxMemoryMbytes`. Refer to the [Usage and resources](https://docs.apify.com/platform/actors/running/usage-and-resources#memory) for more details about memory allocation. |
| `maxMemoryMbytes` | Optional | Specifies the maximum amount of memory in megabytes required by the Actor to run. It can be used to control the costs of run, especially when developing pay per result Actors. Requires an _integer_ value. Refer to the [Usage and resources](https://docs.apify.com/platform/actors/running/usage-and-resources#memory) for more details about memory allocation. |
| `usesStandbyMode` | Optional | Boolean specifying whether the Actor will have [Standby mode](../programming_interface/actor_standby.md) enabled. |
4 changes: 2 additions & 2 deletions sources/platform/actors/development/actor_definition/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Actors have the following elements:
- The main **[actor.json](./actor_json.md)** file contains **metadata** such as the Actor name, description, author, version, and links pointing to the other definition files below.
- **[Dockerfile](./docker.md)** which specifies where is the Actor's source code, how to build it, and run it.
- **Documentation** in the form of a **README.md** file.
- **[Input](./input_schema/index.md)** and **[output schemas](./output_schema.md)** that describe what input the Actor requires and what results it produces.
- **[Input](./input_schema/index.md)** and **[dataset schemas](platform/actors/development/actor-definition/dataset-schema)** that describe what input the Actor requires and what results it produces.
- Access to an out-of-box **[storage](../../../storage/index.md)** system for Actor data, results, and files.

The documentation and the input/output schemas make it possible for people to easily understand what the Actor does, enter the required inputs both in the user interface or API, and integrate the Actor's results with their other workflows. Actors can easily call and interact with each other, enabling building more complex systems on top of simple ones.
The documentation and the input/dataset schemas make it possible for people to easily understand what the Actor does, enter the required inputs both in the user interface or API, and integrate the Actor's results with their other workflows. Actors can easily call and interact with each other, enabling building more complex systems on top of simple ones.

The Apify platform provides an open [API](/api/v2), cron-style [scheduler](../../schedules), [webhooks](../../../integrations/programming/webhooks/index.md), and [integrations](../../integrations) to services such as Zapier or Make, which make it easy for users to integrate Actors with their existing workflows. Anyone is welcome to [publish Actors](/platform/actors/publishing) in [Apify Store](https://apify.com/store), and you can even [monetize your Actors](/platform/actors/publishing/monetize).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: Output schema
title: Dataset schema
sidebar_position: 3
description: Learn how to define and present your output schema in an user-friendly output UI.
slug: /actors/development/actor-definition/output-schema
description: Learn how to define and present your dataset schema in an user-friendly output UI.
slug: /actors/development/actor-definition/dataset-schema
---

# Output Schema Specification
# Dataset Schema Specification

**Learn how to define and present your output schema in an user-friendly output UI.**
**Learn how to define and present your dataset schema in an user-friendly output UI.**

---

The output schema defines the structure and representation of data produced by an Actor, both in the API and the visual user interface.
The dataset schema defines the structure and representation of data produced by an Actor, both in the API and the visual user interface.

## Example

Expand Down

0 comments on commit 3ea1c66

Please sign in to comment.