Redivis Documentation
API DocumentationRedivis Home
  • Introduction
  • Redivis for open science
    • FAIR data practices
    • Open access
    • Data repository characteristics
    • Data retention policy
    • Citations
  • Guides
    • Getting started
    • Discover & access data
      • Discover datasets
      • Apply to access restricted data
      • Create a study
    • Analyze data in a workflow
      • Reshape data in transforms
      • Work with data in notebooks
      • Running ML workloads
      • Example workflows
        • Analyzing large tabular data
        • Create an image classification model
        • Fine tuning a Large Language Model (LLM)
        • No-code visualization
        • Continuous enrollment
        • Select first/last encounter
    • Export & publish your work
      • Export to other environments
      • Build your own site with Observable
    • Create & manage datasets
      • Create and populate a dataset
      • Upload tabular data as tables
      • Upload unstructured data as files
      • Cleaning tabular data
    • Administer an organization
      • Configure access systems
      • Grant access to data
      • Generate a report
      • Example tasks
        • Emailing subsets of members
    • Video guides
  • Reference
    • Your account
      • Creating an account
      • Managing logins
      • Single Sign-On (SSO)
      • Workspace
      • Studies
      • Compute credits and billing
    • Datasets
      • Documentation
      • Tables
      • Variables
      • Files
      • Creating & editing datasets
      • Uploading data
        • Tabular data
        • Geospatial data
        • Unstructured data
        • Metadata
        • Data sources
        • Programmatic uploads
      • Version control
      • Sampling
      • Exporting data
        • Download
        • Programmatic
        • Google Data Studio
        • Google Cloud Storage
        • Google BigQuery
        • Embedding tables
    • Workflows
      • Workflow concepts
      • Documentation
      • Data sources
      • Tables
      • Transforms
        • Transform concepts
        • Step: Aggregate
        • Step: Create variables
        • Step: Filter
        • Step: Join
        • Step: Limit
        • Step: Stack
        • Step: Order
        • Step: Pivot
        • Step: Rename
        • Step: Retype
        • Step: SQL query
        • Variable selection
        • Value lists
        • Optimization and errors
        • Variable creation methods
          • Common elements
          • Aggregate
          • Case (if/else)
          • Date
          • DateTime
          • Geography
          • JSON
          • Math
          • Navigation
          • Numbering
          • Other
          • Statistical
          • String
          • Time
      • Notebooks
        • Notebook concepts
        • Compute resources
        • Python notebooks
        • R notebooks
        • Stata notebooks
        • SAS notebooks
        • Using the Jupyter interface
      • Access and privacy
    • Data access
      • Access levels
      • Configuring access
      • Requesting access
      • Approving access
      • Usage rules
      • Data access in workflows
    • Organizations
      • Administrator panel
      • Members
      • Studies
      • Workflows
      • Datasets
      • Permission groups
      • Requirements
      • Reports
      • Logs
      • Billing
      • Settings and branding
        • Account
        • Public profile
        • Membership
        • Export environments
        • Advanced: DOI configuration
        • Advanced: Stata & SAS setup
        • Advanced: Data storage locations
        • Advanced: Data egress configuration
    • Institutions
      • Administrator panel
      • Organizations
      • Members
      • Datasets
      • Reports
      • Settings and branding
    • Quotas and limits
    • Glossary
  • Additional Resources
    • Events and press
    • API documentation
    • Redivis Labs
    • Office hours
    • Contact us
    • More information
      • Product updates
      • Roadmap
      • System status
      • Security
      • Feature requests
      • Report a bug
Powered by GitBook
On this page
  • Concat
  • Ends with
  • Format string
  • Length
  • Lower case
  • Pad left
  • Trim left
  • Normalize
  • Regexp contains
  • Regexp extract
  • Regexp replace
  • Repeat
  • Replace
  • Reverse
  • Pad right
  • Trim right
  • Starts with
  • String position
  • Substring
  • Trim
  • Upper case

Was this helpful?

Export as PDF
  1. Reference
  2. Workflows
  3. Transforms
  4. Variable creation methods

String

Last updated 1 year ago

Was this helpful?

Concat

Concatenates multiple strings into a single string. Treats NULL values as an empty string. –>

CONCAT(@expression)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

Ends with

Determines whether a string is a suffix of another string –>

ENDS_WITH(@expression, @expression_2)

Return type

boolean

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@expression_2

true

-

Format string

FORMAT(@format_string, @expression)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@format_string

true

-

Length

LENGTH(@variable)

Return type

integer

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Lower case

LOWER(@variable)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Pad left

LPAD(@variable, @return_length[, @pattern])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@pattern

false

-

@return_length

true

-

Trim left

LTRIM(@expression[, @pattern])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@pattern

false

-

Normalize

NORMALIZE(@variable[, @normalization_mode])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@normalization_mode

any of: NFC, NFKC, NFD, NFKD

false

(NFC (default))

Regexp contains

REGEXP_CONTAINS(@variable, @regex)

Return type

boolean

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@regex

true

-

Regexp extract

REGEXP_EXTRACT(@variable, @regex)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@regex

true

-

Regexp replace

REGEXP_REPLACE(@variable, @regex, @expression_2)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@regex

true

-

@expression_2

false

-

Repeat

REPEAT(@expression, @literal)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@literal

true

-

Replace

REPLACE(@expression, @match, @expression_2)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@match

true

-

@expression_2

false

-

Reverse

REVERSE(@expression)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

Pad right

RPAD(@variable, @return_length[, @pattern])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@pattern

false

-

@return_length

true

-

Trim right

RTRIM(@expression[, @pattern])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@pattern

false

-

Starts with

STARTS_WITH(@expression, @expression_2)

Return type

boolean

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@expression_2

true

-

String position

STRPOS(@expression, @match)

Return type

integer

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@match

true

-

Substring

SUBSTR(@expression, @position[, @length])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@position

true

-

@length

false

-

Trim

TRIM(@expression[, @pattern])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@expression

true

-

@pattern

false

-

Upper case

UPPER(@variable)

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

s or s

any

or

any

or

any

Creates a formatted string from input variables. Similar to the C printf function. –>

s or s

any , , , , ,

any

Returns the number of characters in a string variable –>

any

Return string value to lowercase –>

any

Pad a string to the left with characters up to a certain total length –>

any

or

any

or

any

Removes all leading characters that match the provided pattern –>

or

any

or

any

Normalization is used to ensure that two strings are equivalent. Normalization is often used in situations in which two strings render the same on the screen but have different Unicode code points. –>

any

Match a variable's values against a regular expression –>

any

any

Returns the first substring that matches a regular expression –>

any

any

Replaces all substrings that match a given regular expression with a new string –>

any

any

or

any

Return a string of a provided value repeated a set number of times –>

or

any

any

Replaces all substrings that match a given string with a replacement string –>

or

any

or

any

or

any

Reverses a string –>

or

any

Pad a string to the right with characters up to a certain total length –>

any

or

any

or

any

Removes all trailing characters that match the provided pattern –>

or

any

or

any

Determines whether a string is a prefix of another string –>

or

any

or

any

Returns the 1-based index of the first occurrence of a substring within a string. Returns 0 if not found. –>

or

any

or

any

Return the substring of a specified string –>

or

any

or

any

or

any

Removes all leading and trailing characters that match the provided pattern –>

or

any

or

any

Return string value to uppercase –>

any

learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
variable
literal
string
variable
literal
string
variable
literal
string
variable
literal
string
integer
float
date
dateTime
time
literal
string
variable
string
variable
string
variable
string
variable
literal
string
variable
literal
integer
variable
literal
string
variable
literal
Redivis type
variable
string
enum
variable
string
literal
Redivis type
variable
string
literal
Redivis type
variable
string
literal
Redivis type
variable
literal
string
variable
literal
string
literal
integer
variable
literal
string
variable
literal
string
variable
literal
string
variable
literal
string
variable
string
variable
literal
string
variable
literal
integer
variable
literal
string
variable
literal
Redivis type
variable
literal
string
variable
literal
string
variable
literal
string
variable
literal
string
variable
literal
string
variable
literal
integer
variable
literal
integer
variable
literal
string
variable
literal
Redivis type
variable
string