### Start Datagrok on Linux/Other Source: https://datagrok.ai/help/develop/admin/docker-compose Commands to make the installation script executable and run it on standard Linux environments. ```bash chmod +x datagrok-install-local.sh bash datagrok-install-local.sh ``` -------------------------------- ### Start Datagrok on macOS Silicon Source: https://datagrok.ai/help/develop/admin/docker-compose Commands to make the installation script executable and run it on macOS Silicon systems. ```bash chmod +x datagrok-install-local-macos-silicon.sh bash datagrok-install-local-macos-silicon.sh ``` -------------------------------- ### Initialize and Install Packages with Renv Source: https://datagrok.ai/help/compute/scripting/advanced-scripting/share-envs Initialize an Renv project and install specific packages. It is recommended to install specific package versions to avoid delays caused by Renv checking for updates. ```r renv::init() renv::install("hunspell@3.0.1") ``` -------------------------------- ### Datagrok Tutorial Full Code Example Source: https://datagrok.ai/help/develop/how-to/apps/routing The complete code for a Datagrok application, including imports, type definitions, and routing logic. Handles fresh app starts and routing based on URL segments. ```typescript /* Do not change these import lines to match external modules in webpack configuration */ import * as DG from 'datagrok-api/dg'; import * as grok from 'datagrok-api/grok'; type testData = "wells" | "demog" | "biosensor" | "random walk" | "geo" | "molecules" | "dose-response"; //name: Test //input: string path {meta.url: true} //input: string filter //meta.role: app export function test(path: string, filter: string) { const pathSegments = url.split('/').filter((s) => s != ''); if (pathSegments.length == 0) { //Fresh app start //Adding demog table view const demog = grok.data.testData('demog'); const demogView = grok.shell.addTableView(demog); demogView.scatterPlot(); demogView.path = '/demog/All'; grok.shell.v = demogView; //Adding random walk table view const wells = grok.data.testData('wells'); const wellsView = grok.shell.addTableView(wells); wellsView.scatterPlot(); wellsView.path = '/wells/All'; grok.shell.v = wellsView; } else { //Handle routing const tableName = pathSegments[0]; const selectionLabel = pathSegments[1] ?? 'All'; const table = grok.data.testData(tableName as testData); const tableView = grok.shell.addTableView(table); setSelection(tableView, tableName, selectionLabel, filter); grok.shell.v = tableView; } } function setSelection(tableView: DG.TableView, name: string, label: string, filter: string) { tableView.path = `/${name}/${label}`; if (label === 'All') { tableView.dataFrame.selection.init(_ => true); return; } const [colName, category] = filter.split('='); if (!colName || !category) throw new Error(`PathError: wrong filter format '${label}'. Should be 'colName=value'.`) tableView.dataFrame.rows.match(`${colName} = ${category}`).select(); } ``` -------------------------------- ### Commit Header Examples Source: https://datagrok.ai/help/develop/dev-process/git-policy Specific examples for the commit header line. ```text GROK-321: Grok Connect: Fix vulnerability in Postgres provider (WIP) ``` ```text closes #321: Grok Connect | Postgres: Fix vulnerability in provider ``` -------------------------------- ### Install markdownlint-cli2 (Global) Source: https://datagrok.ai/help/develop/help-pages/github-workflow Install markdownlint-cli2 globally for command-line linting of markdown files. ```bash npm install --global markdownlint-cli2 ``` -------------------------------- ### Deploy Datagrok with Docker Compose Source: https://datagrok.ai/help/deploy/bare-metal/deploy-regular Starts the Datagrok services using Docker Compose. Use the 'datagrok' profile for a standard installation or 'datagrok,demo' to include demo databases. ```bash COMPOSE_PROFILES=datagrok docker-compose --project-name datagrok up -d ``` ```bash COMPOSE_PROFILES=datagrok,demo docker-compose --project-name datagrok up -d ``` -------------------------------- ### Python API Installation Source: https://datagrok.ai/help/develop/python-api Install the datagrok-api Python library using pip. ```APIDOC ## Python API Installation ### Description Install the datagrok-api Python library using pip. ### Command ```bash pip install datagrok-api ``` ``` -------------------------------- ### Install datagrok-tools globally Source: https://datagrok.ai/help/develop/how-to/faq Use these commands to remove a local installation and install the package globally to ensure the grok command is available in your path. ```bash # First, remove the locally installed package... npm uninstall datagrok-tools # And then install datagrok-tools globally using the -g flag npm install -g datagrok-tools ``` -------------------------------- ### Install JS API dependencies (Windows) Source: https://datagrok.ai/help/develop/help-pages/github-workflow Navigate to the 'js-api' directory and install its package dependencies using npm on Windows. ```bash cd ..\js-api npm install ``` -------------------------------- ### Start a DemoScript Source: https://datagrok.ai/help/develop/how-to/misc/write-demo-scripts Asynchronously start the execution of a demo script after all steps have been added. ```typescript await demoScript.start(); ``` -------------------------------- ### Run Datagrok with all features enabled Source: https://datagrok.ai/help/deploy/docker-compose/docker-compose-advanced Starts all available service profiles simultaneously. ```bash docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^ --profile datagrok ^ --profile db ^ --profile chem ^ --profile scripting ^ --profile jupyter_notebook ^ --profile modeling ^ up -d ``` ```bash docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \ --profile datagrok \ --profile db \ --profile chem \ --profile scripting \ --profile jupyter_notebook \ --profile modeling \ up -d ``` -------------------------------- ### Commit Body Example Source: https://datagrok.ai/help/develop/dev-process/git-policy Example of a detailed commit body for describing changes. ```text Fix the Uncontrolled Resource Consumption vulnerability in log4j dependency for Grok Connect (CVE-2021-44228) ``` -------------------------------- ### Install datagrok-api Python Library Source: https://datagrok.ai/help/develop/python-api Install the datagrok-api library using pip. This is the first step to integrate with the Datagrok platform. ```bash pip install datagrok-api ``` -------------------------------- ### Install Datagrok Compute API Source: https://datagrok.ai/help/compute/workflows/examples Install the Datagrok Compute API package for your workflow. ```bash npm i @datagrok-libraries/compute-api ``` -------------------------------- ### S3 Bucket Structure Example Source: https://datagrok.ai/help/access/databases/connectors/athena Example directory layout for organizing CSV files within an S3 bucket for Athena access. ```text Bucket s3://athena-northwind/ orders/ orders.csv products/ products.csv ``` -------------------------------- ### Changelog Version Entry Example Source: https://datagrok.ai/help/develop/dev-process/changelog-policy An example of a single version entry in a changelog file, including the version number, release date, a brief description of changes, and API dependency. ```markdown ## 97.89.83 (2023-06-31) This release focuses on improving data access speed and convenience, new visualization and usability features, and ensuring platform stability. *Dependency: datagrok-api >= Y.Y.Y* ``` -------------------------------- ### Install DB-Explorer Library Source: https://datagrok.ai/help/develop/how-to/db/register-identifiers Install the DB-explorer library into your Datagrok plugin project using npm. This command should be run from within your plugin's directory. ```bash npm install @datagrok-libraries/db-explorer ``` -------------------------------- ### Install Datagrok Tools Source: https://datagrok.ai/help/develop/onboarding/getting-started Install the `datagrok-tools` npm package globally to scaffold, build, and publish Datagrok packages, applications, or projects. ```bash npm install --global datagrok-tools ``` -------------------------------- ### Changelog Grouped Changes Example Source: https://datagrok.ai/help/develop/dev-process/changelog-policy Demonstrates how to group changes within a changelog entry by type, such as Features, Bug Fixes, and Breaking Changes, with examples of specific updates and issue references. ```markdown ### Features * Added [logger for packages](https://datagrok.ai/help/develop/advanced/debugging#logger) to report debug records to the server * [#1988](https://github.com/datagrok-ai/public/issues/1988): Improved the ability to resize a legend on [Trellis Plot](https://datagrok.ai/help/visualize/viewers/trellis-plot) ### Bug Fixes * [#1984](https://github.com/datagrok-ai/public/issues/1984): Filter's missing values settings are not properly synced between different tabs/views ### Breaking change * Removed Grok Connect from Datagrok image. The host in connectors host should be changed to grok_connect instead of localhost. ``` -------------------------------- ### Setup test directory Source: https://datagrok.ai/help/develop/how-to/tests/add-package-tests Commands to navigate to the source directory and create a dedicated folder for test files. ```bash cd /src mkdir tests ``` -------------------------------- ### Initialize package and add viewer via CLI Source: https://datagrok.ai/help/develop/how-to/viewers/develop-custom-viewer Use datagrok-tools to scaffold a new package and add a viewer template. ```bash grok create AwesomePackage --js grok add viewer AwesomeViewer ``` -------------------------------- ### Get Week Number Source: https://datagrok.ai/help/transform/functions/datetime-functions Returns the week number of the year for the given date `dt`. Weeks are typically numbered starting from 1. ```javascript Weeknum(Date(2021, 2, 3)) // 5 ``` -------------------------------- ### Clone Datagrok Public Repository Source: https://datagrok.ai/help/access/databases/create-custom-connectors Clone the Datagrok public repository from GitHub to get started with developing custom connectors. This is the first step in setting up your development environment. ```bash git clone https://github.com/datagrok-ai/public.git ``` -------------------------------- ### Define autostart function Source: https://datagrok.ai/help/develop/function-roles Example of an autostart function that triggers a view at platform startup. ```javascript //name: welcomeView //meta.role: autostart //meta.autostartImmediate: true export function _welcomeView(): void { if (_properties['showWelcomeView']) welcomeView(); } ``` -------------------------------- ### Initialize a new package Source: https://datagrok.ai/help/develop/how-to/packages/create-package Creates a new package directory with the default structure and test files. ```bash grok create TextStats --test ``` -------------------------------- ### Define a String Parameter for a SQL Query Source: https://datagrok.ai/help/access/databases Use SQL comments starting with '--' to define input parameters. This example shows how to define a 'productName' string parameter for a SQL query. ```sql --input: string productName select * from products where productname = @productName ``` -------------------------------- ### Using the 'grok' Entry Point Source: https://datagrok.ai/help/develop/packages/js-api Demonstrates how to use the 'grok' namespace for discovering and executing API functions, such as parsing CSV files. ```APIDOC ## Grok `grok` is the main entry point for the JS API. It helps you discover the functionality using IntelliSense. For example, to import a dataframe from a CSV file: 1. Type `grok.`. 2. Select `grok.data`. 3. Select `grok.data.parseCsv` and press **Enter**. Use IntelliSense to provide the parameters. **Note**: When you need more control, use the DG namespace. ``` -------------------------------- ### Register Folder Viewer Function Source: https://datagrok.ai/help/develop/how-to/files/folder-content-preview Register a function with the 'folderViewer' role to enable custom folder previews. The function receives the folder and its files, returning a widget for preview or null if not applicable. This example adds a 'START' button if 'demog.csv' is present. ```typescript //meta.role: folderViewer //input: file folder //input: list files //output: widget export function clinicalCaseFolderLauncher(folder: DG.FileInfo, files: DG.FileInfo[]): DG.Widget | undefined { if (files.some((f) => f.fileName.toLowerCase() == 'demog.csv')) return DG.Widget.fromRoot(ui.div([ui.button('START', () => grok.shell.info('Foo'))])); } ``` -------------------------------- ### Execute Startup Commands Source: https://datagrok.ai/help/develop/advanced/url-parameters The cmd parameter executes one or more commands at startup, separated by semicolons. ```text ?cmd=OpenHelp ?cmd=OpenHelp;TogglePresentationMode ``` -------------------------------- ### Regexp Example Accessor Source: https://datagrok.ai/help/deploy/releases/compatibility?breakingchanges=true&from=1.26.0&to=1.25.4 Accessor for regexp example. ```typescript get regexpExample(): ``` -------------------------------- ### Startup Parameters Source: https://datagrok.ai/help/develop/advanced/url-parameters Parameters that control how Datagrok initializes and loads packages. ```APIDOC ## Startup Parameters ### Description Control Datagrok's initial state, package loading, and command execution upon startup. ### Parameters #### Query Parameters - **mode** (string) - Optional - Hides menus, sidebars, and toolbars for iframe embeds. Possible values: `embed`. - **initPackageFunctions** (boolean) - Optional - `true` to load and register package functions. Default: `false`. - **includePackages** (string) - Optional - Comma-separated list of package names to load. Takes precedence over `excludePackages`. - **excludePackages** (string) - Optional - Comma-separated list of package names to exclude. If value is empty, all packages are excluded. - **cmd** (string) - Optional - Semicolon-separated list of commands to execute after startup. Commands can be parameterized using `command(param)` syntax. ### Package Filtering Examples ``` ?includePackages=Chem ?includePackages=Chem,Bio ?excludePackages=Bio Chem ?excludePackages ``` ### Command Execution Examples ``` ?cmd=OpenHelp ?cmd=OpenHelp;TogglePresentationMode ``` ``` -------------------------------- ### Build and publish package Source: https://datagrok.ai/help/compute/workflows/examples Command to install dependencies, build the project, and publish it locally. ```bash npm i && npm run build && grok publish local --release ``` -------------------------------- ### Clone the repository Source: https://datagrok.ai/help/develop/dev-process/git-policy Initial step to download the project repository to a local machine. ```bash # git clone git clone https://github.com/datagrok-ai/public.git ``` -------------------------------- ### Build and Check Documentation Links (Windows) Source: https://datagrok.ai/help/develop/help-pages/github-workflow On Windows, navigate to the Docusaurus directory, build the documentation, and then check internal links and anchors using the hyperlink tool. ```bash cd docusaurus npm run build hyper link --check-anchors build --sources ..\help ``` -------------------------------- ### Configure a Viewer with setOptions Source: https://datagrok.ai/help/develop/how-to/viewers/manipulate-viewers Shows how to add a custom viewer and configure its properties using the setOptions method. ```javascript view.addViewer('Leaflet').setOptions({ latitudeColumnName: 'lat', longitudeColumnName: 'lng', renderType: 'heat map' }); ``` -------------------------------- ### Install Demo Databases Source: https://datagrok.ai/help/deploy/docker-compose/docker-compose-advanced Deploy Datagrok with demo databases enabled using Docker Compose profiles. ```batch docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok_2 ^ --profile all --profile demo up -d ``` ```bash docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok_2 \ --profile all --profile demo up -d ``` -------------------------------- ### Example Python Docker App Folder Structure Source: https://datagrok.ai/help/develop/how-to/packages/python-functions Illustrates the recommended directory layout for a Python Docker application within a Datagrok plugin. ```text plugin-root/ └── python/ └── my_app/ ├── logic.py ├── requirements.in └── container.json ``` -------------------------------- ### Check npm Version Source: https://datagrok.ai/help/develop/help-pages/github-workflow Verify that the installed npm version is at least v9.x.x after installing Node.js. ```bash npm --version ``` -------------------------------- ### Run CmdNewNotebook() from Console Source: https://datagrok.ai/help/compute/jupyter-notebook Use this command in the console to create a new notebook. ```javascript CmdNewNotebook() ``` -------------------------------- ### Install Docusaurus package dependencies Source: https://datagrok.ai/help/develop/help-pages/github-workflow Install all the necessary package dependencies for the Docusaurus project using npm. ```bash npm install ``` -------------------------------- ### Install Hyperlink Checker Source: https://datagrok.ai/help/develop/help-pages/github-workflow Install the hyperlink checker globally to detect incorrect hyperlinks in markdown files. ```bash npm install --global @untitaker/hyperlink ``` -------------------------------- ### Initialize a DemoScript Source: https://datagrok.ai/help/develop/how-to/misc/write-demo-scripts Initialize a DemoScript with a name, description, and an isAutomatic flag. Optional parameters like autoStartFirstStep and path can be provided. ```typescript export function demo() { const demoScript = new DemoScript('Demo', 'Demo description', true, {autoStartFirstStep: true, path: 'Curves/Demo'}); // ... } ``` -------------------------------- ### Filter Packages via URL Source: https://datagrok.ai/help/develop/advanced/url-parameters Use includePackages and excludePackages to control which packages are loaded at startup. Package names are delimited by spaces, commas, or hyphens. ```text ?includePackages=Chem // only load Chem ?includePackages=Chem,Bio // only load Chem and Bio ?excludePackages=Bio Chem // load everything except Bio and Chem ?excludePackages // exclude all packages ``` -------------------------------- ### Install and Configure source-map-loader Source: https://datagrok.ai/help/develop/advanced/debugging Install the source-map-loader and add it to your webpack.config.js to handle source maps from third-party libraries. ```bash npm install source-map-loader --save-dev ``` ```javascript module.exports = { module: { rules: [ { test: /\.js$/, enforce: "pre", use: ["source-map-loader"], }, ], }, }; ``` -------------------------------- ### Filter Formula Examples Source: https://datagrok.ai/help/visualize/viewers/tree-map Examples of formulas used in the Filter property to restrict the rows displayed in the treemap. ```text ${AGE} > 20 or ${WEIGHT / 2)} > 100, ${SEVERITY} == 'Medium', ${RACE}.endsWith('sian') ``` -------------------------------- ### Commit Message Examples Source: https://datagrok.ai/help/develop/dev-process/git-policy Various examples of valid commit messages following the project's convention. ```text GROK-123: JS API: Update rxjs dependency version Fix the CVE-0000-99999 vulnerability of old version rxjs in JS API package.json https://community.datagrok.ai/t/topic-for-dependency/000 ``` ```text closes #123: Chem | Descriptors: New super incredible feature release BREAKING CHANGE: deleted the method superCool in chem.ts ``` ```text GROK-456: GitHub Actions: Change in the release notes generation flow ``` ```text #456: Library Bio: Create documentation for package usage (WIP) ``` -------------------------------- ### Build and Publish Plugin Source: https://datagrok.ai/help/develop/how-to/db/register-identifiers Commands to compile and upload the plugin to the Datagrok instance. ```bash npm run build ``` ```bash grok publish ``` -------------------------------- ### Configure Datagrok Environment Source: https://datagrok.ai/help/develop/dev-process/set-up-environment Initializes the local development environment by setting the developer key and default server. ```bash grok config ``` -------------------------------- ### Install Commit Linting Tools Source: https://datagrok.ai/help/develop/dev-process/git-policy Commands to install commitlint and pre-commit hooks for enforcing commit message rules. ```bash npm install --location=global @commitlint/config-conventional @commitlint/cli pip install pre-commit pre-commit install --install-hooks --hook-type pre-commit --hook-type commit-msg ``` -------------------------------- ### Initialize package tests Source: https://datagrok.ai/help/develop/how-to/tests/add-package-tests Commands to create a new package with test support or add testing capabilities to an existing package. ```bash grok create --test ``` ```bash cd grok add tests ``` -------------------------------- ### Install JS API dependencies (Linux/MacOS) Source: https://datagrok.ai/help/develop/help-pages/github-workflow Navigate to the 'js-api' directory and install its package dependencies using npm on Linux/MacOS. ```bash cd ../js-api npm install ``` -------------------------------- ### Building User Interfaces with 'ui' Source: https://datagrok.ai/help/develop/packages/js-api Example of creating a simple dialog window using the 'ui' namespace. ```APIDOC ## UI Building a UI is a special form of programming. The `ui` namespace provides tools for creating user interfaces. ```javascript ui.dialog('Windows') .add(ui.span(['People of Earth, your attention, please… '])) .onOK(() => { grok.shell.info('OK!'); }) .show(); ``` ``` -------------------------------- ### Install Datagrok Dependencies in GitHub Actions Source: https://datagrok.ai/help/develop Add `@datagrok/chem` to `devDependencies` in `package.json` to install dependent grok packages in your CI workflow. ```json { "devDependencies": { "@datagrok/chem": "latest" } } ``` -------------------------------- ### Implement file opening methods Source: https://datagrok.ai/help/develop/onboarding/exercises Three different approaches to opening tables using demo methods, file system paths, or server function evaluation. ```typescript //input: string filepath //output: dataframe df export async function openTable1(filepath: string): Promise { const df = await grok.data.getDemoTable(filepath); grok.shell.addTableView(df); return df; } //input: string filepath //output: dataframe df export async function openTable2(filepath: string): Promise { const df = await grok.data.files.openTable(`System:/${filepath}`); grok.shell.addTableView(df); return df; } //input: string filepath //output: dataframe df export async function openTable3(filepath: string): Promise { const df = (await (grok.functions.eval(`OpenServerFile("System:DemoFiles/${filepath}")`)))[0]; grok.shell.addTableView(df); return df; } ``` -------------------------------- ### Publish the package Source: https://datagrok.ai/help/develop/how-to/packages/create-package Deploys the package to the development server. ```bash grok publish dev ``` -------------------------------- ### Blob Usage Example (Python) Source: https://datagrok.ai/help/compute/scripting/scripting-features/complex-input-output Demonstrates the usage of the 'blob' input parameter to receive binary data. Outputs the type of the received blob. ```python #name: BlobTest #description: Example of Blob usage #language: python #input: blob array_blob #output: string typeofblob typeofblob = type(array_blob) ``` -------------------------------- ### Run Basic Datagrok Stand Source: https://datagrok.ai/help/deploy/docker-compose/docker-compose-advanced Starts a local Datagrok instance using Docker Compose. For Windows users encountering 'WriteFile' errors, run the command prompt as an administrator. ```bash docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok \ --profile all up -d ``` ```bash docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \ --profile all up -d ``` -------------------------------- ### Complex Annotation Example Source: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation An example demonstrating complex annotation inputs for data analysis, including numerical columns, dates, and configuration options for PCA. ```typescript #input: dataframe t1 {columns:numerical} [first input data table] #input: dataframe t2 {columns:numerical} [second input data table] #input: column x {type:numerical; table:t1} [x axis column name] #input: column y {type:numerical} [y axis column name] #input: column date {type:datetime; format:mm/dd/yyyy} [date column name] #input: column_list numdata {type:numerical; table:t1} [numerical columns names] #input: int numcomp = 2 {range:2-7} [number of components] #input: bool center = true [number of components] #input: string type = high {choices: ["high", "low"]} [type of filter] #output: dataframe result {action:join(t1)} [pca components] #output: graphics scatter [scatter plot] ``` -------------------------------- ### Filter Rows Example Source: https://datagrok.ai/help/visualize/viewers/map This property allows filtering rows based on specified conditions. Examples include numerical comparisons, string checks, and regular expressions. ```javascript ${AGE} > 20 or ${WEIGHT / 2)} > 100, ${SEVERITY} == ''Medium'', ${RACE}.endsWith(''sian'') ``` -------------------------------- ### Create a Datagrok Plugin Source: https://datagrok.ai/help/develop/how-to/db/register-identifiers Use this command to create a new Datagrok plugin package. Follow the prompts to set up the plugin structure. Refer to Datagrok documentation for detailed instructions on plugin creation and publishing. ```bash grok create ``` -------------------------------- ### Python API Usage Example Source: https://datagrok.ai/help/develop/python-api Demonstrates basic usage of the DatagrokClient for authentication and interacting with the API. ```APIDOC ## Python API Usage Example ### Description Initialize the DatagrokClient with your server URL and API token to authenticate and interact with the Datagrok platform. ### Code ```python from datagrok_api import DatagrokClient # Initialize with your server URL and API token with DatagrokClient("https://public.datagrok.ai/api", "Bearer ") as grok: me = grok.users.current() print(f"Logged in as: {me.first_name} {me.last_name}") ``` ``` -------------------------------- ### Initialize Package with Autostart Viewer Source: https://datagrok.ai/help/develop/how-to/viewers/develop-custom-viewer Register a viewer dynamically within a package using `grok.shell.registerViewer` inside an `autostart` function. This ensures the viewer can be obtained synchronously upon package initialization. ```javascript import {AwesomeViewer} from './awesome-viewer.js' //meta.role: autostart export function initFunctionPackage() { grok.shell.registerViewer('AwesomeViewer', 'Creates an awesome viewer', () => new AwesomeViewer()); } ``` -------------------------------- ### Run only CVM application containers Source: https://datagrok.ai/help/deploy/docker-compose/docker-compose-advanced Starts only the CVM-specific containers. ```bash docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^ --profile cvm up -d ``` ```bash docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \ --profile cvm up -d ``` -------------------------------- ### Add Template Application Source: https://datagrok.ai/help/develop/onboarding/learning-plan Use the command line interface to initialize a new application template within a package. ```bash grok add ``` -------------------------------- ### Get SMILES Source: https://datagrok.ai/help/deploy/releases/compatibility?breakingchanges=true&from=1.27.0&to=1.26.8 Retrieves the SMILES representation of the current molecule. ```typescript getSmiles(): string ``` -------------------------------- ### Changelog File Structure Example Source: https://datagrok.ai/help/develop/dev-process/changelog-policy A basic template for the root of a changelog file, indicating where the package name and the changelog content should be placed. ```markdown # changelog ``` -------------------------------- ### Get Molfile Source: https://datagrok.ai/help/deploy/releases/compatibility?breakingchanges=true&from=1.27.0&to=1.26.8 Retrieves the molfile representation of the current molecule. ```typescript getMolFile(): string ``` -------------------------------- ### Build and Check Documentation Links (Linux/macOS) Source: https://datagrok.ai/help/develop/help-pages/github-workflow On Linux or macOS, navigate to the Docusaurus directory, build the documentation, and then check internal links and anchors using the hyperlink tool. ```bash cd docusaurus npm run build hyper link --check-anchors build/ --sources ../help/ ``` -------------------------------- ### Compile and Publish Package Source: https://datagrok.ai/help/compute/scripting/advanced-scripting/convert-script-to-package-function Compile your package using `npm run build` and then publish it to your environment. Use the `--release` flag for public availability. ```bash npm run build && grok publish your_environment ``` ```bash npm run build && grok publish your_environment --release ``` -------------------------------- ### Get DataFrame ID Source: https://datagrok.ai/help/deploy/releases/compatibility?breakingchanges=true&from=1.27.0&to=1.26.8 Returns the unique identifier of the DataFrame. ```typescript get id(): string ``` -------------------------------- ### Create EC2 Instance for CVM Components Source: https://datagrok.ai/help/deploy/bare-metal/deploy-regular Launches an EC2 instance for Compute VM (CVM) components with specified requirements (4 vCPU, 8 GB RAM). Verify AMI, security group, subnet, and key pair settings. ```bash aws ec2 run-instances --image-id ami-092cce4a19b438926 --block-device-mappings 'Ebs={VolumeSize=100}' --network-interfaces 'AssociatePublicIpAddress=true' --count 1 --instance-type c5.xlarge --key-name datagrok-deploy --security-group-ids --subnet-id ``` -------------------------------- ### Get Authentication Token Source: https://datagrok.ai/help/deploy/releases/compatibility?breakingchanges=true&from=1.27.0&to=1.26.8 Retrieves the current authentication token. ```typescript get token(): string ``` -------------------------------- ### Get Column Version Source: https://datagrok.ai/help/deploy/releases/compatibility?breakingchanges=true&from=1.27.0&to=1.26.8 Returns the version number of the column. ```typescript get version(): number ``` -------------------------------- ### Run Grok Connect Locally for Testing Source: https://datagrok.ai/help/access/databases/create-custom-connectors Start a local instance of Grok Connect by running its JAR file. This allows you to add and test your new connector through the Datagrok platform's Database Manager. ```bash java -jar ./target/.jar grok_connect.GrokConnect ```