Scripts¶
Overview¶
The integrated scripting support in AP allows data analysts and data scientists to create data transformations and analytics. AP supports the R scripting language. Python support is coming soon.
In AP, data pipelines automates the ingestion of data from multiple sources into the central data store. Scripts have access to the entire catalog of datasets and tables, allowing for integrated and sophisticatd data transformations.
AP provides a web-based editor for scripting with syntax highlighting and code completion and a console area which displays script output. This makes it straight-forward to write scripts and get access to data.
Scripts can be included as jobs in workflows in combination with data pipelines, SQL transformations and destinations, allowing for flexible and orcestrated data movement and transformation.
This section covers scripting with the supported script languages.
R scripting¶
The R scripting editor provides a function for aquiring a connection to the AP data warehouse. The function name is connect_datawarehouse and provides a simple way of retrieving data. For an R script, a typical flow would be to start by retrieving data from the data warehouse using a SQL query. The SQL query can specify aggregation and filters to retrieve the relevant data, and ensure an appropriate set of data records is pulled into the R script.

Python scripting¶
Coming soon!
Manage scripts¶
The following section covers how to view, create, update and remove scripts.
View scripts¶
- Click Scripts in the left side menu to list all scripts.
- Click the name of a script to see more information.

Create script¶
- Click the Create new button from the top-right corner.
-
Enter the following information.
Field Description Name The name of the script Language The script language Refresh schedule The interval for when to run the script (required) Description A description of the script Tags Free text tags which categorizes the script Script The script code

Edit script¶
- Find and click the script to edit in the list.
- Open the context menu by clicking the icon in the top-right corner.
- Click Edit.
- Edit values in the relevant sections.
- Click Save at the bottom of the section.
- Close the dialog by clicking the close icon in the top-left corner.
Edit script code¶
- Find and click the view to edit in the list.
- Click the context menu in the top-right corner.
- Click Edit script.
- In the script editor, edit the script query.
- Click Save.
Remove script¶
- Find and click the script to remove in the list.
- Open the context menu by clicking the icon in the top-right corner.
- Click Remove.