type
stringclasses 5
values | name
stringlengths 1
55
| qualified_name
stringlengths 5
143
| docstring
stringlengths 0
3.59k
⌀ | filepath
stringclasses 180
values | is_public
bool 2
classes | is_private
bool 2
classes | line_start
float64 0
1.54k
⌀ | line_end
float64 0
1.56k
⌀ | annotation
stringclasses 8
values | returns
stringclasses 236
values | parameters
listlengths 0
74
⌀ | parent_class
stringclasses 298
values | value
stringclasses 112
values | bases
listlengths 0
3
⌀ | api_element_summary
stringlengths 199
23k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
method
|
__init__
|
fenic._gen.protos.logical_plan.v1.plans_pb2.SemanticCluster.__init__
| null |
site-packages/fenic/_gen/protos/logical_plan/v1/plans_pb2.py
| true | false | 277 | 277 | null |
None
|
[
"self",
"input",
"by_expr",
"num_clusters",
"max_iter",
"num_init",
"label_column",
"centroid_column"
] |
SemanticCluster
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic._gen.protos.logical_plan.v1.plans_pb2.SemanticCluster.__init__
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "input", "by_expr", "num_clusters", "max_iter", "num_init", "label_column", "centroid_column"]
Returns: None
Parent Class: SemanticCluster
|
class
|
FileSink
|
fenic._gen.protos.logical_plan.v1.plans_pb2.FileSink
| null |
site-packages/fenic/_gen/protos/logical_plan/v1/plans_pb2.py
| true | false | 279 | 289 | null | null | null | null | null |
[
"_message.Message"
] |
Type: class
Member Name: FileSink
Qualified Name: fenic._gen.protos.logical_plan.v1.plans_pb2.FileSink
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
method
|
__init__
|
fenic._gen.protos.logical_plan.v1.plans_pb2.FileSink.__init__
| null |
site-packages/fenic/_gen/protos/logical_plan/v1/plans_pb2.py
| true | false | 289 | 289 | null |
None
|
[
"self",
"child",
"sink_type",
"path",
"mode"
] |
FileSink
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic._gen.protos.logical_plan.v1.plans_pb2.FileSink.__init__
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "child", "sink_type", "path", "mode"]
Returns: None
Parent Class: FileSink
|
class
|
TableSink
|
fenic._gen.protos.logical_plan.v1.plans_pb2.TableSink
| null |
site-packages/fenic/_gen/protos/logical_plan/v1/plans_pb2.py
| true | false | 291 | 299 | null | null | null | null | null |
[
"_message.Message"
] |
Type: class
Member Name: TableSink
Qualified Name: fenic._gen.protos.logical_plan.v1.plans_pb2.TableSink
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
method
|
__init__
|
fenic._gen.protos.logical_plan.v1.plans_pb2.TableSink.__init__
| null |
site-packages/fenic/_gen/protos/logical_plan/v1/plans_pb2.py
| true | false | 299 | 299 | null |
None
|
[
"self",
"child",
"table_name",
"mode"
] |
TableSink
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic._gen.protos.logical_plan.v1.plans_pb2.TableSink.__init__
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "child", "table_name", "mode"]
Returns: None
Parent Class: TableSink
|
module
|
api
|
fenic.api
|
Query module for semantic operations on DataFrames.
|
site-packages/fenic/api/__init__.py
| true | false | null | null | null | null | null | null | null | null |
Type: module
Member Name: api
Qualified Name: fenic.api
Docstring: Query module for semantic operations on DataFrames.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
attribute
|
__all__
|
fenic.api.__all__
| null |
site-packages/fenic/api/__init__.py
| false | false | 67 | 137 | null | null | null | null |
['Session', 'SessionConfig', 'OpenAILanguageModel', 'OpenAIEmbeddingModel', 'AnthropicLanguageModel', 'CohereEmbeddingModel', 'GoogleDeveloperEmbeddingModel', 'GoogleDeveloperLanguageModel', 'GoogleVertexEmbeddingModel', 'GoogleVertexLanguageModel', 'SemanticConfig', 'CloudConfig', 'DataFrameReader', 'DataFrameWriter', 'DataFrame', 'GroupedData', 'SemanticExtensions', 'Column', 'ColumnOrName', 'Catalog', 'semantic', 'text', 'json', 'markdown', 'embedding', 'array', 'array_agg', 'array_contains', 'array_size', 'asc', 'asc_nulls_first', 'asc_nulls_last', 'async_udf', 'avg', 'coalesce', 'collect_list', 'count', 'desc', 'desc_nulls_first', 'desc_nulls_last', 'first', 'max', 'mean', 'min', 'struct', 'sum', 'stddev', 'udf', 'when', 'col', 'lit', 'empty', 'null', 'greatest', 'least', 'tool_param', 'Lineage', 'create_mcp_server', 'run_mcp_server_sync', 'run_mcp_server_async', 'run_mcp_server_asgi']
| null |
Type: attribute
Member Name: __all__
Qualified Name: fenic.api.__all__
Docstring: none
Value: ['Session', 'SessionConfig', 'OpenAILanguageModel', 'OpenAIEmbeddingModel', 'AnthropicLanguageModel', 'CohereEmbeddingModel', 'GoogleDeveloperEmbeddingModel', 'GoogleDeveloperLanguageModel', 'GoogleVertexEmbeddingModel', 'GoogleVertexLanguageModel', 'SemanticConfig', 'CloudConfig', 'DataFrameReader', 'DataFrameWriter', 'DataFrame', 'GroupedData', 'SemanticExtensions', 'Column', 'ColumnOrName', 'Catalog', 'semantic', 'text', 'json', 'markdown', 'embedding', 'array', 'array_agg', 'array_contains', 'array_size', 'asc', 'asc_nulls_first', 'asc_nulls_last', 'async_udf', 'avg', 'coalesce', 'collect_list', 'count', 'desc', 'desc_nulls_first', 'desc_nulls_last', 'first', 'max', 'mean', 'min', 'struct', 'sum', 'stddev', 'udf', 'when', 'col', 'lit', 'empty', 'null', 'greatest', 'least', 'tool_param', 'Lineage', 'create_mcp_server', 'run_mcp_server_sync', 'run_mcp_server_async', 'run_mcp_server_asgi']
Annotation: none
is Public? : false
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
module
|
catalog
|
fenic.api.catalog
|
Catalog API for managing database objects in Fenic.
|
site-packages/fenic/api/catalog.py
| true | false | null | null | null | null | null | null | null | null |
Type: module
Member Name: catalog
Qualified Name: fenic.api.catalog
Docstring: Catalog API for managing database objects in Fenic.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
class
|
Catalog
|
fenic.api.catalog.Catalog
|
Entry point for catalog operations.
Provides methods to manage catalogs, databases, and tables, as well as
read-only access to system tables such as `fenic_system.query_metrics`.
### Catalog and Database Management
Example:
```python
# Create a catalog
session.catalog.create_catalog("my_catalog") # → True
# Set active catalog
session.catalog.set_current_catalog("my_catalog")
# Create a database
session.catalog.create_database("my_database") # → True
# Set active database
session.catalog.set_current_database("my_database")
# Create a table
session.catalog.create_table(
"my_table",
Schema([ColumnField("id", IntegerType)])
) # → True
```
### Metrics Table (Local Sessions Only)
Query metrics are recorded for each session and stored locally
in `fenic_system.query_metrics`. Metrics can be loaded into a DataFrame
for analysis.
Example:
```python
# Load all metrics for the current application
metrics_df = session.table("fenic_system.query_metrics")
# Show the 10 most recent queries in the application
recent_queries = session.sql("""
SELECT *
FROM {df}
ORDER BY CAST(end_ts AS TIMESTAMP) DESC
LIMIT 10
""", df=metrics_df)
recent_queries.show()
# Find query metrics for a specific session with non-zero LM costs
specific_session_queries = session.sql("""
SELECT *
FROM {df}
WHERE session_id = '9e7e256f-fad9-4cd9-844e-399d795aaea0'
AND total_lm_cost > 0
ORDER BY CAST(end_ts AS TIMESTAMP) ASC
""", df=metrics_df)
specific_session_queries.show()
# Aggregate total LM costs and requests between a specific time window
metrics_window = session.sql("""
SELECT
CAST(SUM(total_lm_cost) AS DOUBLE) AS total_lm_cost_in_window,
CAST(SUM(total_lm_requests) AS DOUBLE) AS total_lm_requests_in_window
FROM {df}
WHERE CAST(end_ts AS TIMESTAMP) BETWEEN
CAST('2025-08-29 10:00:00' AS TIMESTAMP)
AND CAST('2025-08-29 12:00:00' AS TIMESTAMP)
""", df=metrics_df)
metrics_window.show()
```
|
site-packages/fenic/api/catalog.py
| true | false | 13 | 776 | null | null | null | null | null |
[] |
Type: class
Member Name: Catalog
Qualified Name: fenic.api.catalog.Catalog
Docstring: Entry point for catalog operations.
Provides methods to manage catalogs, databases, and tables, as well as
read-only access to system tables such as `fenic_system.query_metrics`.
### Catalog and Database Management
Example:
```python
# Create a catalog
session.catalog.create_catalog("my_catalog") # → True
# Set active catalog
session.catalog.set_current_catalog("my_catalog")
# Create a database
session.catalog.create_database("my_database") # → True
# Set active database
session.catalog.set_current_database("my_database")
# Create a table
session.catalog.create_table(
"my_table",
Schema([ColumnField("id", IntegerType)])
) # → True
```
### Metrics Table (Local Sessions Only)
Query metrics are recorded for each session and stored locally
in `fenic_system.query_metrics`. Metrics can be loaded into a DataFrame
for analysis.
Example:
```python
# Load all metrics for the current application
metrics_df = session.table("fenic_system.query_metrics")
# Show the 10 most recent queries in the application
recent_queries = session.sql("""
SELECT *
FROM {df}
ORDER BY CAST(end_ts AS TIMESTAMP) DESC
LIMIT 10
""", df=metrics_df)
recent_queries.show()
# Find query metrics for a specific session with non-zero LM costs
specific_session_queries = session.sql("""
SELECT *
FROM {df}
WHERE session_id = '9e7e256f-fad9-4cd9-844e-399d795aaea0'
AND total_lm_cost > 0
ORDER BY CAST(end_ts AS TIMESTAMP) ASC
""", df=metrics_df)
specific_session_queries.show()
# Aggregate total LM costs and requests between a specific time window
metrics_window = session.sql("""
SELECT
CAST(SUM(total_lm_cost) AS DOUBLE) AS total_lm_cost_in_window,
CAST(SUM(total_lm_requests) AS DOUBLE) AS total_lm_requests_in_window
FROM {df}
WHERE CAST(end_ts AS TIMESTAMP) BETWEEN
CAST('2025-08-29 10:00:00' AS TIMESTAMP)
AND CAST('2025-08-29 12:00:00' AS TIMESTAMP)
""", df=metrics_df)
metrics_window.show()
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
method
|
__init__
|
fenic.api.catalog.Catalog.__init__
|
Initialize a Catalog instance.
Args:
catalog: The underlying catalog implementation.
|
site-packages/fenic/api/catalog.py
| true | false | 86 | 92 | null | null |
[
"self",
"catalog"
] |
Catalog
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic.api.catalog.Catalog.__init__
Docstring: Initialize a Catalog instance.
Args:
catalog: The underlying catalog implementation.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "catalog"]
Returns: none
Parent Class: Catalog
|
method
|
does_catalog_exist
|
fenic.api.catalog.Catalog.does_catalog_exist
|
Checks if a catalog with the specified name exists.
Args:
catalog_name (str): Name of the catalog to check.
Returns:
bool: True if the catalog exists, False otherwise.
Example: Check if a catalog exists
```python
# Check if 'my_catalog' exists
session.catalog.does_catalog_exist('my_catalog')
# Returns: True
```
|
site-packages/fenic/api/catalog.py
| true | false | 95 | 112 | null |
bool
|
[
"self",
"catalog_name"
] |
Catalog
| null | null |
Type: method
Member Name: does_catalog_exist
Qualified Name: fenic.api.catalog.Catalog.does_catalog_exist
Docstring: Checks if a catalog with the specified name exists.
Args:
catalog_name (str): Name of the catalog to check.
Returns:
bool: True if the catalog exists, False otherwise.
Example: Check if a catalog exists
```python
# Check if 'my_catalog' exists
session.catalog.does_catalog_exist('my_catalog')
# Returns: True
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "catalog_name"]
Returns: bool
Parent Class: Catalog
|
method
|
get_current_catalog
|
fenic.api.catalog.Catalog.get_current_catalog
|
Returns the name of the current catalog.
Returns:
str: The name of the current catalog.
Example: Get current catalog name
```python
# Get the name of the current catalog
session.catalog.get_current_catalog()
# Returns: 'default'
```
|
site-packages/fenic/api/catalog.py
| true | false | 114 | 127 | null |
str
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: get_current_catalog
Qualified Name: fenic.api.catalog.Catalog.get_current_catalog
Docstring: Returns the name of the current catalog.
Returns:
str: The name of the current catalog.
Example: Get current catalog name
```python
# Get the name of the current catalog
session.catalog.get_current_catalog()
# Returns: 'default'
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: str
Parent Class: Catalog
|
method
|
set_current_catalog
|
fenic.api.catalog.Catalog.set_current_catalog
|
Sets the current catalog.
Args:
catalog_name (str): Name of the catalog to set as current.
Raises:
ValueError: If the specified catalog doesn't exist.
Example: Set current catalog
```python
# Set 'my_catalog' as the current catalog
session.catalog.set_current_catalog('my_catalog')
```
|
site-packages/fenic/api/catalog.py
| true | false | 129 | 145 | null |
None
|
[
"self",
"catalog_name"
] |
Catalog
| null | null |
Type: method
Member Name: set_current_catalog
Qualified Name: fenic.api.catalog.Catalog.set_current_catalog
Docstring: Sets the current catalog.
Args:
catalog_name (str): Name of the catalog to set as current.
Raises:
ValueError: If the specified catalog doesn't exist.
Example: Set current catalog
```python
# Set 'my_catalog' as the current catalog
session.catalog.set_current_catalog('my_catalog')
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "catalog_name"]
Returns: None
Parent Class: Catalog
|
method
|
list_catalogs
|
fenic.api.catalog.Catalog.list_catalogs
|
Returns a list of available catalogs.
Returns:
List[str]: A list of catalog names available in the system.
Returns an empty list if no catalogs are found.
Example: List all catalogs
```python
# Get all available catalogs
session.catalog.list_catalogs()
# Returns: ['default', 'my_catalog', 'other_catalog']
```
|
site-packages/fenic/api/catalog.py
| true | false | 147 | 161 | null |
List[str]
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: list_catalogs
Qualified Name: fenic.api.catalog.Catalog.list_catalogs
Docstring: Returns a list of available catalogs.
Returns:
List[str]: A list of catalog names available in the system.
Returns an empty list if no catalogs are found.
Example: List all catalogs
```python
# Get all available catalogs
session.catalog.list_catalogs()
# Returns: ['default', 'my_catalog', 'other_catalog']
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: List[str]
Parent Class: Catalog
|
method
|
create_catalog
|
fenic.api.catalog.Catalog.create_catalog
|
Creates a new catalog.
Args:
catalog_name (str): Name of the catalog to create.
ignore_if_exists (bool): If True, return False when the catalog already exists.
If False, raise an error when the catalog already exists.
Defaults to True.
Raises:
CatalogAlreadyExistsError: If the catalog already exists and ignore_if_exists is False.
Returns:
bool: True if the catalog was created successfully, False if the catalog
already exists and ignore_if_exists is True.
Example: Create a new catalog
```python
# Create a new catalog named 'my_catalog'
session.catalog.create_catalog('my_catalog')
# Returns: True
```
Example: Create an existing catalog with ignore_if_exists
```python
# Try to create an existing catalog with ignore_if_exists=True
session.catalog.create_catalog('my_catalog', ignore_if_exists=True)
# Returns: False
```
Example: Create an existing catalog without ignore_if_exists
```python
# Try to create an existing catalog with ignore_if_exists=False
session.catalog.create_catalog('my_catalog', ignore_if_exists=False)
# Raises: CatalogAlreadyExistsError
```
|
site-packages/fenic/api/catalog.py
| true | false | 163 | 201 | null |
bool
|
[
"self",
"catalog_name",
"ignore_if_exists"
] |
Catalog
| null | null |
Type: method
Member Name: create_catalog
Qualified Name: fenic.api.catalog.Catalog.create_catalog
Docstring: Creates a new catalog.
Args:
catalog_name (str): Name of the catalog to create.
ignore_if_exists (bool): If True, return False when the catalog already exists.
If False, raise an error when the catalog already exists.
Defaults to True.
Raises:
CatalogAlreadyExistsError: If the catalog already exists and ignore_if_exists is False.
Returns:
bool: True if the catalog was created successfully, False if the catalog
already exists and ignore_if_exists is True.
Example: Create a new catalog
```python
# Create a new catalog named 'my_catalog'
session.catalog.create_catalog('my_catalog')
# Returns: True
```
Example: Create an existing catalog with ignore_if_exists
```python
# Try to create an existing catalog with ignore_if_exists=True
session.catalog.create_catalog('my_catalog', ignore_if_exists=True)
# Returns: False
```
Example: Create an existing catalog without ignore_if_exists
```python
# Try to create an existing catalog with ignore_if_exists=False
session.catalog.create_catalog('my_catalog', ignore_if_exists=False)
# Raises: CatalogAlreadyExistsError
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "catalog_name", "ignore_if_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
drop_catalog
|
fenic.api.catalog.Catalog.drop_catalog
|
Drops a catalog.
Args:
catalog_name (str): Name of the catalog to drop.
ignore_if_not_exists (bool): If True, silently return if the catalog doesn't exist.
If False, raise an error if the catalog doesn't exist.
Defaults to True.
Raises:
CatalogNotFoundError: If the catalog does not exist and ignore_if_not_exists is False
Returns:
bool: True if the catalog was dropped successfully, False if the catalog
didn't exist and ignore_if_not_exists is True.
Example: Drop a non-existent catalog
```python
# Try to drop a non-existent catalog
session.catalog.drop_catalog('my_catalog')
# Returns: False
```
Example: Drop a non-existent catalog without ignore_if_not_exists
```python
# Try to drop a non-existent catalog with ignore_if_not_exists=False
session.catalog.drop_catalog('my_catalog', ignore_if_not_exists=False)
# Raises: CatalogNotFoundError
```
|
site-packages/fenic/api/catalog.py
| true | false | 203 | 236 | null |
bool
|
[
"self",
"catalog_name",
"ignore_if_not_exists"
] |
Catalog
| null | null |
Type: method
Member Name: drop_catalog
Qualified Name: fenic.api.catalog.Catalog.drop_catalog
Docstring: Drops a catalog.
Args:
catalog_name (str): Name of the catalog to drop.
ignore_if_not_exists (bool): If True, silently return if the catalog doesn't exist.
If False, raise an error if the catalog doesn't exist.
Defaults to True.
Raises:
CatalogNotFoundError: If the catalog does not exist and ignore_if_not_exists is False
Returns:
bool: True if the catalog was dropped successfully, False if the catalog
didn't exist and ignore_if_not_exists is True.
Example: Drop a non-existent catalog
```python
# Try to drop a non-existent catalog
session.catalog.drop_catalog('my_catalog')
# Returns: False
```
Example: Drop a non-existent catalog without ignore_if_not_exists
```python
# Try to drop a non-existent catalog with ignore_if_not_exists=False
session.catalog.drop_catalog('my_catalog', ignore_if_not_exists=False)
# Raises: CatalogNotFoundError
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "catalog_name", "ignore_if_not_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
does_database_exist
|
fenic.api.catalog.Catalog.does_database_exist
|
Checks if a database with the specified name exists.
Args:
database_name (str): Fully qualified or relative database name to check.
Returns:
bool: True if the database exists, False otherwise.
Example: Check if a database exists
```python
# Check if 'my_database' exists
session.catalog.does_database_exist('my_database')
# Returns: True
```
|
site-packages/fenic/api/catalog.py
| true | false | 238 | 255 | null |
bool
|
[
"self",
"database_name"
] |
Catalog
| null | null |
Type: method
Member Name: does_database_exist
Qualified Name: fenic.api.catalog.Catalog.does_database_exist
Docstring: Checks if a database with the specified name exists.
Args:
database_name (str): Fully qualified or relative database name to check.
Returns:
bool: True if the database exists, False otherwise.
Example: Check if a database exists
```python
# Check if 'my_database' exists
session.catalog.does_database_exist('my_database')
# Returns: True
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "database_name"]
Returns: bool
Parent Class: Catalog
|
method
|
get_current_database
|
fenic.api.catalog.Catalog.get_current_database
|
Returns the name of the current database in the current catalog.
Returns:
str: The name of the current database.
Example: Get current database name
```python
# Get the name of the current database
session.catalog.get_current_database()
# Returns: 'default'
```
|
site-packages/fenic/api/catalog.py
| true | false | 257 | 270 | null |
str
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: get_current_database
Qualified Name: fenic.api.catalog.Catalog.get_current_database
Docstring: Returns the name of the current database in the current catalog.
Returns:
str: The name of the current database.
Example: Get current database name
```python
# Get the name of the current database
session.catalog.get_current_database()
# Returns: 'default'
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: str
Parent Class: Catalog
|
method
|
set_current_database
|
fenic.api.catalog.Catalog.set_current_database
|
Sets the current database.
Args:
database_name (str): Fully qualified or relative database name to set as current.
Raises:
DatabaseNotFoundError: If the specified database doesn't exist.
Example: Set current database
```python
# Set 'my_database' as the current database
session.catalog.set_current_database('my_database')
```
|
site-packages/fenic/api/catalog.py
| true | false | 272 | 288 | null |
None
|
[
"self",
"database_name"
] |
Catalog
| null | null |
Type: method
Member Name: set_current_database
Qualified Name: fenic.api.catalog.Catalog.set_current_database
Docstring: Sets the current database.
Args:
database_name (str): Fully qualified or relative database name to set as current.
Raises:
DatabaseNotFoundError: If the specified database doesn't exist.
Example: Set current database
```python
# Set 'my_database' as the current database
session.catalog.set_current_database('my_database')
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "database_name"]
Returns: None
Parent Class: Catalog
|
method
|
list_databases
|
fenic.api.catalog.Catalog.list_databases
|
Returns a list of databases in the current catalog.
Returns:
List[str]: A list of database names in the current catalog.
Returns an empty list if no databases are found.
Example: List all databases
```python
# Get all databases in the current catalog
session.catalog.list_databases()
# Returns: ['default', 'my_database', 'other_database']
```
|
site-packages/fenic/api/catalog.py
| true | false | 290 | 304 | null |
List[str]
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: list_databases
Qualified Name: fenic.api.catalog.Catalog.list_databases
Docstring: Returns a list of databases in the current catalog.
Returns:
List[str]: A list of database names in the current catalog.
Returns an empty list if no databases are found.
Example: List all databases
```python
# Get all databases in the current catalog
session.catalog.list_databases()
# Returns: ['default', 'my_database', 'other_database']
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: List[str]
Parent Class: Catalog
|
method
|
create_database
|
fenic.api.catalog.Catalog.create_database
|
Creates a new database.
Args:
database_name (str): Fully qualified or relative database name to create.
ignore_if_exists (bool): If True, return False when the database already exists.
If False, raise an error when the database already exists.
Defaults to True.
Raises:
DatabaseAlreadyExistsError: If the database already exists and ignore_if_exists is False.
Returns:
bool: True if the database was created successfully, False if the database
already exists and ignore_if_exists is True.
Example: Create a new database
```python
# Create a new database named 'my_database'
session.catalog.create_database('my_database')
# Returns: True
```
Example: Create an existing database with ignore_if_exists
```python
# Try to create an existing database with ignore_if_exists=True
session.catalog.create_database('my_database', ignore_if_exists=True)
# Returns: False
```
Example: Create an existing database without ignore_if_exists
```python
# Try to create an existing database with ignore_if_exists=False
session.catalog.create_database('my_database', ignore_if_exists=False)
# Raises: DatabaseAlreadyExistsError
```
|
site-packages/fenic/api/catalog.py
| true | false | 306 | 346 | null |
bool
|
[
"self",
"database_name",
"ignore_if_exists"
] |
Catalog
| null | null |
Type: method
Member Name: create_database
Qualified Name: fenic.api.catalog.Catalog.create_database
Docstring: Creates a new database.
Args:
database_name (str): Fully qualified or relative database name to create.
ignore_if_exists (bool): If True, return False when the database already exists.
If False, raise an error when the database already exists.
Defaults to True.
Raises:
DatabaseAlreadyExistsError: If the database already exists and ignore_if_exists is False.
Returns:
bool: True if the database was created successfully, False if the database
already exists and ignore_if_exists is True.
Example: Create a new database
```python
# Create a new database named 'my_database'
session.catalog.create_database('my_database')
# Returns: True
```
Example: Create an existing database with ignore_if_exists
```python
# Try to create an existing database with ignore_if_exists=True
session.catalog.create_database('my_database', ignore_if_exists=True)
# Returns: False
```
Example: Create an existing database without ignore_if_exists
```python
# Try to create an existing database with ignore_if_exists=False
session.catalog.create_database('my_database', ignore_if_exists=False)
# Raises: DatabaseAlreadyExistsError
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "database_name", "ignore_if_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
drop_database
|
fenic.api.catalog.Catalog.drop_database
|
Drops a database.
Args:
database_name (str): Fully qualified or relative database name to drop.
cascade (bool): If True, drop all tables in the database.
Defaults to False.
ignore_if_not_exists (bool): If True, silently return if the database doesn't exist.
If False, raise an error if the database doesn't exist.
Defaults to True.
Raises:
DatabaseNotFoundError: If the database does not exist and ignore_if_not_exists is False
CatalogError: If the current database is being dropped, if the database is not empty and cascade is False
Returns:
bool: True if the database was dropped successfully, False if the database
didn't exist and ignore_if_not_exists is True.
Example: Drop a non-existent database
```python
# Try to drop a non-existent database
session.catalog.drop_database('my_database')
# Returns: False
```
Example: Drop a non-existent database without ignore_if_not_exists
```python
# Try to drop a non-existent database with ignore_if_not_exists=False
session.catalog.drop_database('my_database', ignore_if_not_exists=False)
# Raises: DatabaseNotFoundError
```
|
site-packages/fenic/api/catalog.py
| true | false | 348 | 387 | null |
bool
|
[
"self",
"database_name",
"cascade",
"ignore_if_not_exists"
] |
Catalog
| null | null |
Type: method
Member Name: drop_database
Qualified Name: fenic.api.catalog.Catalog.drop_database
Docstring: Drops a database.
Args:
database_name (str): Fully qualified or relative database name to drop.
cascade (bool): If True, drop all tables in the database.
Defaults to False.
ignore_if_not_exists (bool): If True, silently return if the database doesn't exist.
If False, raise an error if the database doesn't exist.
Defaults to True.
Raises:
DatabaseNotFoundError: If the database does not exist and ignore_if_not_exists is False
CatalogError: If the current database is being dropped, if the database is not empty and cascade is False
Returns:
bool: True if the database was dropped successfully, False if the database
didn't exist and ignore_if_not_exists is True.
Example: Drop a non-existent database
```python
# Try to drop a non-existent database
session.catalog.drop_database('my_database')
# Returns: False
```
Example: Drop a non-existent database without ignore_if_not_exists
```python
# Try to drop a non-existent database with ignore_if_not_exists=False
session.catalog.drop_database('my_database', ignore_if_not_exists=False)
# Raises: DatabaseNotFoundError
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "database_name", "cascade", "ignore_if_not_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
does_table_exist
|
fenic.api.catalog.Catalog.does_table_exist
|
Checks if a table with the specified name exists.
Args:
table_name (str): Fully qualified or relative table name to check.
Returns:
bool: True if the table exists, False otherwise.
Example: Check if a table exists
```python
# Check if 'my_table' exists
session.catalog.does_table_exist('my_table')
# Returns: True
```
|
site-packages/fenic/api/catalog.py
| true | false | 389 | 406 | null |
bool
|
[
"self",
"table_name"
] |
Catalog
| null | null |
Type: method
Member Name: does_table_exist
Qualified Name: fenic.api.catalog.Catalog.does_table_exist
Docstring: Checks if a table with the specified name exists.
Args:
table_name (str): Fully qualified or relative table name to check.
Returns:
bool: True if the table exists, False otherwise.
Example: Check if a table exists
```python
# Check if 'my_table' exists
session.catalog.does_table_exist('my_table')
# Returns: True
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "table_name"]
Returns: bool
Parent Class: Catalog
|
method
|
list_tables
|
fenic.api.catalog.Catalog.list_tables
|
Returns a list of tables stored in the current database.
This method queries the current database to retrieve all available table names.
Returns:
List[str]: A list of table names stored in the database.
Returns an empty list if no tables are found.
Example: List all tables
```python
# Get all tables in the current database
session.catalog.list_tables()
# Returns: ['table1', 'table2', 'table3']
```
|
site-packages/fenic/api/catalog.py
| true | false | 408 | 424 | null |
List[str]
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: list_tables
Qualified Name: fenic.api.catalog.Catalog.list_tables
Docstring: Returns a list of tables stored in the current database.
This method queries the current database to retrieve all available table names.
Returns:
List[str]: A list of table names stored in the database.
Returns an empty list if no tables are found.
Example: List all tables
```python
# Get all tables in the current database
session.catalog.list_tables()
# Returns: ['table1', 'table2', 'table3']
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: List[str]
Parent Class: Catalog
|
method
|
describe_table
|
fenic.api.catalog.Catalog.describe_table
|
Returns the schema of the specified table.
Args:
table_name (str): Fully qualified or relative table name to describe.
Returns:
DatasetMetadata: An object containing:
schema: A schema object describing the table's structure with field names and types.
description: A natural language description of the table's contents and uses.
Raises:
TableNotFoundError: If the table doesn't exist.
Example: Describe a table's schema
```python
# For a table created with: create_table('t1', Schema([ColumnField('id', IntegerType)]), description='My table description')
session.catalog.describe_table('t1')
# Returns: DatasetMetadata(schema=Schema([
# ColumnField('id', IntegerType),
# ]), description="My table description")
```
|
site-packages/fenic/api/catalog.py
| true | false | 426 | 450 | null |
DatasetMetadata
|
[
"self",
"table_name"
] |
Catalog
| null | null |
Type: method
Member Name: describe_table
Qualified Name: fenic.api.catalog.Catalog.describe_table
Docstring: Returns the schema of the specified table.
Args:
table_name (str): Fully qualified or relative table name to describe.
Returns:
DatasetMetadata: An object containing:
schema: A schema object describing the table's structure with field names and types.
description: A natural language description of the table's contents and uses.
Raises:
TableNotFoundError: If the table doesn't exist.
Example: Describe a table's schema
```python
# For a table created with: create_table('t1', Schema([ColumnField('id', IntegerType)]), description='My table description')
session.catalog.describe_table('t1')
# Returns: DatasetMetadata(schema=Schema([
# ColumnField('id', IntegerType),
# ]), description="My table description")
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "table_name"]
Returns: DatasetMetadata
Parent Class: Catalog
|
method
|
set_table_description
|
fenic.api.catalog.Catalog.set_table_description
|
Set or unset the description for a table.
Args:
table_name: Fully qualified or relative table name to set the description for.
description: The description to set for the table.
Raises:
TableNotFoundError: If the table doesn't exist.
|
site-packages/fenic/api/catalog.py
| true | false | 452 | 463 | null |
None
|
[
"self",
"table_name",
"description"
] |
Catalog
| null | null |
Type: method
Member Name: set_table_description
Qualified Name: fenic.api.catalog.Catalog.set_table_description
Docstring: Set or unset the description for a table.
Args:
table_name: Fully qualified or relative table name to set the description for.
description: The description to set for the table.
Raises:
TableNotFoundError: If the table doesn't exist.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "table_name", "description"]
Returns: None
Parent Class: Catalog
|
method
|
drop_table
|
fenic.api.catalog.Catalog.drop_table
|
Drops the specified table.
By default this method will return False if the table doesn't exist.
Args:
table_name (str): Fully qualified or relative table name to drop.
ignore_if_not_exists (bool): If True, return False when the table doesn't exist.
If False, raise an error when the table doesn't exist.
Defaults to True.
Returns:
bool: True if the table was dropped successfully, False if the table
didn't exist and ignore_if_not_exist is True.
Raises:
TableNotFoundError: If the table doesn't exist and ignore_if_not_exists is False
Example: Drop an existing table
```python
# Drop an existing table 't1'
session.catalog.drop_table('t1')
# Returns: True
```
Example: Drop a non-existent table with ignore_if_not_exists
```python
# Try to drop a non-existent table with ignore_if_not_exists=True
session.catalog.drop_table('t2', ignore_if_not_exists=True)
# Returns: False
```
Example: Drop a non-existent table without ignore_if_not_exists
```python
# Try to drop a non-existent table with ignore_if_not_exists=False
session.catalog.drop_table('t2', ignore_if_not_exists=False)
# Raises: TableNotFoundError
```
|
site-packages/fenic/api/catalog.py
| true | false | 465 | 505 | null |
bool
|
[
"self",
"table_name",
"ignore_if_not_exists"
] |
Catalog
| null | null |
Type: method
Member Name: drop_table
Qualified Name: fenic.api.catalog.Catalog.drop_table
Docstring: Drops the specified table.
By default this method will return False if the table doesn't exist.
Args:
table_name (str): Fully qualified or relative table name to drop.
ignore_if_not_exists (bool): If True, return False when the table doesn't exist.
If False, raise an error when the table doesn't exist.
Defaults to True.
Returns:
bool: True if the table was dropped successfully, False if the table
didn't exist and ignore_if_not_exist is True.
Raises:
TableNotFoundError: If the table doesn't exist and ignore_if_not_exists is False
Example: Drop an existing table
```python
# Drop an existing table 't1'
session.catalog.drop_table('t1')
# Returns: True
```
Example: Drop a non-existent table with ignore_if_not_exists
```python
# Try to drop a non-existent table with ignore_if_not_exists=True
session.catalog.drop_table('t2', ignore_if_not_exists=True)
# Returns: False
```
Example: Drop a non-existent table without ignore_if_not_exists
```python
# Try to drop a non-existent table with ignore_if_not_exists=False
session.catalog.drop_table('t2', ignore_if_not_exists=False)
# Raises: TableNotFoundError
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "table_name", "ignore_if_not_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
create_table
|
fenic.api.catalog.Catalog.create_table
|
Creates a new table.
Args:
table_name (str): Fully qualified or relative table name to create.
schema (Schema): Schema of the table to create.
ignore_if_exists (bool): If True, return False when the table already exists.
If False, raise an error when the table already exists.
Defaults to True.
description (Optional[str]): Description of the table to create.
Defaults to None.
Returns:
bool: True if the table was created successfully, False if the table
already exists and ignore_if_exists is True.
Raises:
TableAlreadyExistsError: If the table already exists and ignore_if_exists is False
Example: Create a new table
```python
# Create a new table with an integer column
session.catalog.create_table('my_table', Schema([
ColumnField('id', IntegerType),
]), description='My table description')
# Returns: True
```
Example: Create an existing table with ignore_if_exists
```python
# Try to create an existing table with ignore_if_exists=True
session.catalog.create_table('my_table', Schema([
ColumnField('id', IntegerType),
]), ignore_if_exists=True, description='My table description')
# Returns: False
```
Example: Create an existing table without ignore_if_exists
```python
# Try to create an existing table with ignore_if_exists=False
session.catalog.create_table('my_table', Schema([
ColumnField('id', IntegerType),
]), ignore_if_exists=False, description='My table description')
# Raises: TableAlreadyExistsError
```
|
site-packages/fenic/api/catalog.py
| true | false | 507 | 556 | null |
bool
|
[
"self",
"table_name",
"schema",
"ignore_if_exists",
"description"
] |
Catalog
| null | null |
Type: method
Member Name: create_table
Qualified Name: fenic.api.catalog.Catalog.create_table
Docstring: Creates a new table.
Args:
table_name (str): Fully qualified or relative table name to create.
schema (Schema): Schema of the table to create.
ignore_if_exists (bool): If True, return False when the table already exists.
If False, raise an error when the table already exists.
Defaults to True.
description (Optional[str]): Description of the table to create.
Defaults to None.
Returns:
bool: True if the table was created successfully, False if the table
already exists and ignore_if_exists is True.
Raises:
TableAlreadyExistsError: If the table already exists and ignore_if_exists is False
Example: Create a new table
```python
# Create a new table with an integer column
session.catalog.create_table('my_table', Schema([
ColumnField('id', IntegerType),
]), description='My table description')
# Returns: True
```
Example: Create an existing table with ignore_if_exists
```python
# Try to create an existing table with ignore_if_exists=True
session.catalog.create_table('my_table', Schema([
ColumnField('id', IntegerType),
]), ignore_if_exists=True, description='My table description')
# Returns: False
```
Example: Create an existing table without ignore_if_exists
```python
# Try to create an existing table with ignore_if_exists=False
session.catalog.create_table('my_table', Schema([
ColumnField('id', IntegerType),
]), ignore_if_exists=False, description='My table description')
# Raises: TableAlreadyExistsError
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "table_name", "schema", "ignore_if_exists", "description"]
Returns: bool
Parent Class: Catalog
|
method
|
list_views
|
fenic.api.catalog.Catalog.list_views
|
Returns a list of views stored in the current database.
This method queries the current database to retrieve all available view names.
Returns:
List[str]: A list of view names stored in the database.
Returns an empty list if no views are found.
Example:
>>> session.catalog.list_views()
['view1', 'view2', 'view3'].
|
site-packages/fenic/api/catalog.py
| true | false | 558 | 571 | null |
List[str]
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: list_views
Qualified Name: fenic.api.catalog.Catalog.list_views
Docstring: Returns a list of views stored in the current database.
This method queries the current database to retrieve all available view names.
Returns:
List[str]: A list of view names stored in the database.
Returns an empty list if no views are found.
Example:
>>> session.catalog.list_views()
['view1', 'view2', 'view3'].
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: List[str]
Parent Class: Catalog
|
method
|
describe_view
|
fenic.api.catalog.Catalog.describe_view
|
Returns the schema and description of the specified view.
Args:
view_name (str): Fully qualified or relative view name to describe.
Returns:
DatasetMetadata: An object containing:
schema: A schema object describing the view's structure with field names and types.
description: A natural language description of the view's contents and uses.
Raises:
TableNotFoundError: If the view doesn't exist.
|
site-packages/fenic/api/catalog.py
| true | false | 573 | 589 | null |
DatasetMetadata
|
[
"self",
"view_name"
] |
Catalog
| null | null |
Type: method
Member Name: describe_view
Qualified Name: fenic.api.catalog.Catalog.describe_view
Docstring: Returns the schema and description of the specified view.
Args:
view_name (str): Fully qualified or relative view name to describe.
Returns:
DatasetMetadata: An object containing:
schema: A schema object describing the view's structure with field names and types.
description: A natural language description of the view's contents and uses.
Raises:
TableNotFoundError: If the view doesn't exist.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "view_name"]
Returns: DatasetMetadata
Parent Class: Catalog
|
method
|
set_view_description
|
fenic.api.catalog.Catalog.set_view_description
|
Set the description for a view.
Args:
view_name (str): Fully qualified or relative view name to set the description for.
description (str): The description to set for the view.
Raises:
TableNotFoundError: If the view doesn't exist.
ValidationError: If the description is empty.
Example: Set a description for a view
```python
# Set a description for a view 'v1'
session.catalog.set_view_description('v1', 'My view description')
|
site-packages/fenic/api/catalog.py
| true | false | 591 | 608 | null |
None
|
[
"self",
"view_name",
"description"
] |
Catalog
| null | null |
Type: method
Member Name: set_view_description
Qualified Name: fenic.api.catalog.Catalog.set_view_description
Docstring: Set the description for a view.
Args:
view_name (str): Fully qualified or relative view name to set the description for.
description (str): The description to set for the view.
Raises:
TableNotFoundError: If the view doesn't exist.
ValidationError: If the description is empty.
Example: Set a description for a view
```python
# Set a description for a view 'v1'
session.catalog.set_view_description('v1', 'My view description')
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "view_name", "description"]
Returns: None
Parent Class: Catalog
|
method
|
does_view_exist
|
fenic.api.catalog.Catalog.does_view_exist
|
Checks if a view with the specified name exists.
Args:
view_name (str): Fully qualified or relative view name to check.
Returns:
bool: True if the view exists, False otherwise.
Example:
>>> session.catalog.does_view_exist('my_view')
True.
|
site-packages/fenic/api/catalog.py
| true | false | 610 | 624 | null |
bool
|
[
"self",
"view_name"
] |
Catalog
| null | null |
Type: method
Member Name: does_view_exist
Qualified Name: fenic.api.catalog.Catalog.does_view_exist
Docstring: Checks if a view with the specified name exists.
Args:
view_name (str): Fully qualified or relative view name to check.
Returns:
bool: True if the view exists, False otherwise.
Example:
>>> session.catalog.does_view_exist('my_view')
True.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "view_name"]
Returns: bool
Parent Class: Catalog
|
method
|
drop_view
|
fenic.api.catalog.Catalog.drop_view
|
Drops the specified view.
By default this method will return False if the view doesn't exist.
Args:
view_name (str): Fully qualified or relative view name to drop.
ignore_if_not_exists (bool, optional): If True, return False when the view
doesn't exist. If False, raise an error when the view doesn't exist.
Defaults to True.
Returns:
bool: True if the view was dropped successfully, False if the view
didn't exist and ignore_if_not_exist is True.
Raises:
TableNotFoundError: If the view doesn't exist and ignore_if_not_exists is False
Example:
>>> # For an existing view 'v1'
>>> session.catalog.drop_table('v1')
True
>>> # For a non-existent table 'v2'
>>> session.catalog.drop_table('v2', ignore_if_not_exists=True)
False
>>> session.catalog.drop_table('v2', ignore_if_not_exists=False)
# Raises TableNotFoundError.
|
site-packages/fenic/api/catalog.py
| true | false | 626 | 654 | null |
bool
|
[
"self",
"view_name",
"ignore_if_not_exists"
] |
Catalog
| null | null |
Type: method
Member Name: drop_view
Qualified Name: fenic.api.catalog.Catalog.drop_view
Docstring: Drops the specified view.
By default this method will return False if the view doesn't exist.
Args:
view_name (str): Fully qualified or relative view name to drop.
ignore_if_not_exists (bool, optional): If True, return False when the view
doesn't exist. If False, raise an error when the view doesn't exist.
Defaults to True.
Returns:
bool: True if the view was dropped successfully, False if the view
didn't exist and ignore_if_not_exist is True.
Raises:
TableNotFoundError: If the view doesn't exist and ignore_if_not_exists is False
Example:
>>> # For an existing view 'v1'
>>> session.catalog.drop_table('v1')
True
>>> # For a non-existent table 'v2'
>>> session.catalog.drop_table('v2', ignore_if_not_exists=True)
False
>>> session.catalog.drop_table('v2', ignore_if_not_exists=False)
# Raises TableNotFoundError.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "view_name", "ignore_if_not_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
get_tool
|
fenic.api.catalog.Catalog.get_tool
|
Returns the tool with the specified name from the current catalog.
Args:
tool_name (str): The name of the tool to get.
ignore_if_not_exists (bool): If True, return None when the tool doesn't exist.
If False, raise an error when the tool doesn't exist.
Defaults to True.
Raises:
ToolNotFoundError: If the tool doesn't exist and ignore_if_not_exists is False
Returns:
Tool: The tool with the specified name.
|
site-packages/fenic/api/catalog.py
| true | false | 656 | 672 | null |
ParameterizedToolDefinition
|
[
"self",
"tool_name",
"ignore_if_not_exists"
] |
Catalog
| null | null |
Type: method
Member Name: get_tool
Qualified Name: fenic.api.catalog.Catalog.get_tool
Docstring: Returns the tool with the specified name from the current catalog.
Args:
tool_name (str): The name of the tool to get.
ignore_if_not_exists (bool): If True, return None when the tool doesn't exist.
If False, raise an error when the tool doesn't exist.
Defaults to True.
Raises:
ToolNotFoundError: If the tool doesn't exist and ignore_if_not_exists is False
Returns:
Tool: The tool with the specified name.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "tool_name", "ignore_if_not_exists"]
Returns: ParameterizedToolDefinition
Parent Class: Catalog
|
method
|
create_tool
|
fenic.api.catalog.Catalog.create_tool
|
Creates a new tool in the current catalog.
Args:
tool_name (str): The name of the tool.
tool_description (str): The description of the tool.
tool_query (DataFrame): The query to execute when the tool is called.
tool_params (Sequence[ToolParam]): The parameters of the tool.
result_limit (int): The maximum number of rows to return from the tool.
ignore_if_exists (bool): If True, return False when the tool already exists.
If False, raise an error when the tool already exists.
Defaults to True.
Returns:
bool: True if the tool was created successfully, False otherwise.
Raises:
ToolAlreadyExistsError: If the tool already exists.
Examples:
```python
# Create a new tool with a single parameter
df = session.create_dataframe(...)
session.catalog.create_tool(
tool_name="my_tool",
tool_description="A tool that does something",
tool_query=df,
result_limit=100,
tool_params=[ToolParam(name="param1", description="A parameter", allowed_values=["value1", "value2"])],
)
# Returns: True
```
|
site-packages/fenic/api/catalog.py
| true | false | 674 | 724 | null |
bool
|
[
"self",
"tool_name",
"tool_description",
"tool_query",
"tool_params",
"result_limit",
"ignore_if_exists"
] |
Catalog
| null | null |
Type: method
Member Name: create_tool
Qualified Name: fenic.api.catalog.Catalog.create_tool
Docstring: Creates a new tool in the current catalog.
Args:
tool_name (str): The name of the tool.
tool_description (str): The description of the tool.
tool_query (DataFrame): The query to execute when the tool is called.
tool_params (Sequence[ToolParam]): The parameters of the tool.
result_limit (int): The maximum number of rows to return from the tool.
ignore_if_exists (bool): If True, return False when the tool already exists.
If False, raise an error when the tool already exists.
Defaults to True.
Returns:
bool: True if the tool was created successfully, False otherwise.
Raises:
ToolAlreadyExistsError: If the tool already exists.
Examples:
```python
# Create a new tool with a single parameter
df = session.create_dataframe(...)
session.catalog.create_tool(
tool_name="my_tool",
tool_description="A tool that does something",
tool_query=df,
result_limit=100,
tool_params=[ToolParam(name="param1", description="A parameter", allowed_values=["value1", "value2"])],
)
# Returns: True
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "tool_name", "tool_description", "tool_query", "tool_params", "result_limit", "ignore_if_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
drop_tool
|
fenic.api.catalog.Catalog.drop_tool
|
Drops the specified tool from the current catalog.
Args:
tool_name (str): The name of the tool to drop.
ignore_if_not_exists (bool): If True, return False when the tool doesn't exist.
If False, raise an error when the tool doesn't exist.
Defaults to True.
Returns:
bool: True if the tool was dropped successfully, False if the tool
didn't exist and ignore_if_not_exists is True.
Raises:
ToolNotFoundError: If the tool doesn't exist and ignore_if_not_exists is False
Example:
>>> session.catalog.drop_tool('my_tool')
True
>>> session.catalog.drop_tool('my_tool', ignore_if_not_exists=True)
False
>>> session.catalog.drop_tool('my_tool', ignore_if_not_exists=False)
# Raises ToolNotFoundError.
|
site-packages/fenic/api/catalog.py
| true | false | 726 | 751 | null |
bool
|
[
"self",
"tool_name",
"ignore_if_not_exists"
] |
Catalog
| null | null |
Type: method
Member Name: drop_tool
Qualified Name: fenic.api.catalog.Catalog.drop_tool
Docstring: Drops the specified tool from the current catalog.
Args:
tool_name (str): The name of the tool to drop.
ignore_if_not_exists (bool): If True, return False when the tool doesn't exist.
If False, raise an error when the tool doesn't exist.
Defaults to True.
Returns:
bool: True if the tool was dropped successfully, False if the tool
didn't exist and ignore_if_not_exists is True.
Raises:
ToolNotFoundError: If the tool doesn't exist and ignore_if_not_exists is False
Example:
>>> session.catalog.drop_tool('my_tool')
True
>>> session.catalog.drop_tool('my_tool', ignore_if_not_exists=True)
False
>>> session.catalog.drop_tool('my_tool', ignore_if_not_exists=False)
# Raises ToolNotFoundError.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "tool_name", "ignore_if_not_exists"]
Returns: bool
Parent Class: Catalog
|
method
|
list_tools
|
fenic.api.catalog.Catalog.list_tools
|
Lists the tools available in the current catalog.
|
site-packages/fenic/api/catalog.py
| true | false | 753 | 755 | null |
List[ParameterizedToolDefinition]
|
[
"self"
] |
Catalog
| null | null |
Type: method
Member Name: list_tools
Qualified Name: fenic.api.catalog.Catalog.list_tools
Docstring: Lists the tools available in the current catalog.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: List[ParameterizedToolDefinition]
Parent Class: Catalog
|
module
|
window
|
fenic.api.window
|
Window functions for DataFrame operations.
|
site-packages/fenic/api/window.py
| true | false | null | null | null | null | null | null | null | null |
Type: module
Member Name: window
Qualified Name: fenic.api.window
Docstring: Window functions for DataFrame operations.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
class
|
WindowFrameBoundary
|
fenic.api.window.WindowFrameBoundary
|
Enumeration of special boundary types for window frames.
These define the limits of a window frame relative to the current row.
|
site-packages/fenic/api/window.py
| true | false | 13 | 20 | null | null | null | null | null |
[
"Enum"
] |
Type: class
Member Name: WindowFrameBoundary
Qualified Name: fenic.api.window.WindowFrameBoundary
Docstring: Enumeration of special boundary types for window frames.
These define the limits of a window frame relative to the current row.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
attribute
|
FrameBound
|
fenic.api.window.FrameBound
|
Type alias for window frame boundaries.
Can be either:
- An integer offset (positive for following rows, negative for preceding rows)
- A WindowFrameBoundary enum value for special boundaries
|
site-packages/fenic/api/window.py
| true | false | 23 | 23 | null | null | null | null |
Union[int, WindowFrameBoundary]
| null |
Type: attribute
Member Name: FrameBound
Qualified Name: fenic.api.window.FrameBound
Docstring: Type alias for window frame boundaries.
Can be either:
- An integer offset (positive for following rows, negative for preceding rows)
- A WindowFrameBoundary enum value for special boundaries
Value: Union[int, WindowFrameBoundary]
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
class
|
Window
|
fenic.api.window.Window
|
Represents the specification for a window in window functions.
Including partitioning, ordering, and frame boundaries.
|
site-packages/fenic/api/window.py
| true | false | 32 | 119 | null | null | null | null | null |
[] |
Type: class
Member Name: Window
Qualified Name: fenic.api.window.Window
Docstring: Represents the specification for a window in window functions.
Including partitioning, ordering, and frame boundaries.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
method
|
__init__
|
fenic.api.window.Window.__init__
|
Creates a new Window.
|
site-packages/fenic/api/window.py
| true | false | 38 | 42 | null | null |
[
"self"
] |
Window
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic.api.window.Window.__init__
Docstring: Creates a new Window.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: none
Parent Class: Window
|
method
|
partition_by
|
fenic.api.window.Window.partition_by
|
Returns this Window with the given partitioning columns.
Args:
*cols: Column names or Column expressions to partition by.
Returns:
This Window with updated partitioning (for chaining).
|
site-packages/fenic/api/window.py
| true | false | 44 | 54 | null |
Window
|
[
"self",
"cols"
] |
Window
| null | null |
Type: method
Member Name: partition_by
Qualified Name: fenic.api.window.Window.partition_by
Docstring: Returns this Window with the given partitioning columns.
Args:
*cols: Column names or Column expressions to partition by.
Returns:
This Window with updated partitioning (for chaining).
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "cols"]
Returns: Window
Parent Class: Window
|
method
|
order_by
|
fenic.api.window.Window.order_by
|
Returns this Window with the given ordering columns.
Args:
*cols: Column names or Column expressions to order by.
Returns:
This Window with updated ordering (for chaining).
|
site-packages/fenic/api/window.py
| true | false | 56 | 66 | null |
Window
|
[
"self",
"cols"
] |
Window
| null | null |
Type: method
Member Name: order_by
Qualified Name: fenic.api.window.Window.order_by
Docstring: Returns this Window with the given ordering columns.
Args:
*cols: Column names or Column expressions to order by.
Returns:
This Window with updated ordering (for chaining).
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "cols"]
Returns: Window
Parent Class: Window
|
method
|
rows_between
|
fenic.api.window.Window.rows_between
|
Specifies a row-based frame between start (inclusive) and end (exclusive) rows.
Args:
start: Start offset (can be negative).
end: End offset.
Returns:
This Window with row frame boundaries (for chaining).
|
site-packages/fenic/api/window.py
| true | false | 68 | 79 | null |
Window
|
[
"self",
"start",
"end"
] |
Window
| null | null |
Type: method
Member Name: rows_between
Qualified Name: fenic.api.window.Window.rows_between
Docstring: Specifies a row-based frame between start (inclusive) and end (exclusive) rows.
Args:
start: Start offset (can be negative).
end: End offset.
Returns:
This Window with row frame boundaries (for chaining).
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "start", "end"]
Returns: Window
Parent Class: Window
|
method
|
range_between
|
fenic.api.window.Window.range_between
|
Specifies a range-based frame between start (inclusive) and end (exclusive) values.
Args:
start: Start value.
end: End value.
Returns:
This Window with range frame boundaries (for chaining).
|
site-packages/fenic/api/window.py
| true | false | 81 | 92 | null |
Window
|
[
"self",
"start",
"end"
] |
Window
| null | null |
Type: method
Member Name: range_between
Qualified Name: fenic.api.window.Window.range_between
Docstring: Specifies a range-based frame between start (inclusive) and end (exclusive) values.
Args:
start: Start value.
end: End value.
Returns:
This Window with range frame boundaries (for chaining).
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "start", "end"]
Returns: Window
Parent Class: Window
|
method
|
_finalize
|
fenic.api.window.Window._finalize
|
Internal: Finalizes the window by assigning a default frame if none is set.
This is meant to be called during logical plan construction.
|
site-packages/fenic/api/window.py
| false | true | 94 | 113 | null |
None
|
[
"self"
] |
Window
| null | null |
Type: method
Member Name: _finalize
Qualified Name: fenic.api.window.Window._finalize
Docstring: Internal: Finalizes the window by assigning a default frame if none is set.
This is meant to be called during logical plan construction.
Value: none
Annotation: none
is Public? : false
is Private? : true
Parameters: ["self"]
Returns: None
Parent Class: Window
|
class
|
_WindowFrame
|
fenic.api.window._WindowFrame
| null |
site-packages/fenic/api/window.py
| false | true | 122 | 147 | null | null | null | null | null |
[] |
Type: class
Member Name: _WindowFrame
Qualified Name: fenic.api.window._WindowFrame
Docstring: none
Value: none
Annotation: none
is Public? : false
is Private? : true
Parameters: none
Returns: none
Parent Class: none
|
method
|
__post_init__
|
fenic.api.window._WindowFrame.__post_init__
| null |
site-packages/fenic/api/window.py
| true | false | 128 | 147 | null | null |
[
"self"
] |
_WindowFrame
| null | null |
Type: method
Member Name: __post_init__
Qualified Name: fenic.api.window._WindowFrame.__post_init__
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: none
Parent Class: _WindowFrame
|
method
|
__init__
|
fenic.api.window._WindowFrame.__init__
| null |
site-packages/fenic/api/window.py
| true | false | 0 | 0 | null |
None
|
[
"self",
"start",
"end",
"frame_type"
] |
_WindowFrame
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic.api.window._WindowFrame.__init__
Docstring: none
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "start", "end", "frame_type"]
Returns: None
Parent Class: _WindowFrame
|
module
|
lineage
|
fenic.api.lineage
|
Query interface for tracing data lineage through a query plan.
|
site-packages/fenic/api/lineage.py
| true | false | null | null | null | null | null | null | null | null |
Type: module
Member Name: lineage
Qualified Name: fenic.api.lineage
Docstring: Query interface for tracing data lineage through a query plan.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
class
|
Lineage
|
fenic.api.lineage.Lineage
|
Query interface for tracing data lineage through a query plan.
This class allows you to navigate through the query plan both forwards and backwards,
tracing how specific rows are transformed through each operation.
Example:
```python
# Create a lineage query starting from the root
query = LineageQuery(lineage, session.execution)
# Or start from a specific source
query.start_from_source("my_table")
# Trace rows backwards through a transformation
result = query.backward(["uuid1", "uuid2"])
# Trace rows forward to see their outputs
result = query.forward(["uuid3", "uuid4"])
```
|
site-packages/fenic/api/lineage.py
| true | false | 12 | 157 | null | null | null | null | null |
[] |
Type: class
Member Name: Lineage
Qualified Name: fenic.api.lineage.Lineage
Docstring: Query interface for tracing data lineage through a query plan.
This class allows you to navigate through the query plan both forwards and backwards,
tracing how specific rows are transformed through each operation.
Example:
```python
# Create a lineage query starting from the root
query = LineageQuery(lineage, session.execution)
# Or start from a specific source
query.start_from_source("my_table")
# Trace rows backwards through a transformation
result = query.backward(["uuid1", "uuid2"])
# Trace rows forward to see their outputs
result = query.forward(["uuid3", "uuid4"])
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
method
|
__init__
|
fenic.api.lineage.Lineage.__init__
|
Initialize a Lineage instance.
Args:
lineage: The underlying lineage implementation.
|
site-packages/fenic/api/lineage.py
| true | false | 34 | 40 | null | null |
[
"self",
"lineage"
] |
Lineage
| null | null |
Type: method
Member Name: __init__
Qualified Name: fenic.api.lineage.Lineage.__init__
Docstring: Initialize a Lineage instance.
Args:
lineage: The underlying lineage implementation.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "lineage"]
Returns: none
Parent Class: Lineage
|
method
|
get_source_names
|
fenic.api.lineage.Lineage.get_source_names
|
Get the names of all sources in the query plan. Used to determine where to start the lineage traversal.
|
site-packages/fenic/api/lineage.py
| true | false | 42 | 45 | null |
List[str]
|
[
"self"
] |
Lineage
| null | null |
Type: method
Member Name: get_source_names
Qualified Name: fenic.api.lineage.Lineage.get_source_names
Docstring: Get the names of all sources in the query plan. Used to determine where to start the lineage traversal.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: List[str]
Parent Class: Lineage
|
method
|
show
|
fenic.api.lineage.Lineage.show
|
Print the operator tree of the query.
|
site-packages/fenic/api/lineage.py
| true | false | 47 | 49 | null |
None
|
[
"self"
] |
Lineage
| null | null |
Type: method
Member Name: show
Qualified Name: fenic.api.lineage.Lineage.show
Docstring: Print the operator tree of the query.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: None
Parent Class: Lineage
|
method
|
start_from_source
|
fenic.api.lineage.Lineage.start_from_source
|
Set the current position to a specific source in the query plan.
Args:
source_name: Name of the source table to start from
Example:
```python
query.start_from_source("customers")
# Now you can trace forward from the customers table
```
|
site-packages/fenic/api/lineage.py
| true | false | 51 | 64 | null |
None
|
[
"self",
"source_name"
] |
Lineage
| null | null |
Type: method
Member Name: start_from_source
Qualified Name: fenic.api.lineage.Lineage.start_from_source
Docstring: Set the current position to a specific source in the query plan.
Args:
source_name: Name of the source table to start from
Example:
```python
query.start_from_source("customers")
# Now you can trace forward from the customers table
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "source_name"]
Returns: None
Parent Class: Lineage
|
method
|
forwards
|
fenic.api.lineage.Lineage.forwards
|
Trace rows forward to see how they are transformed by the next operation.
Args:
row_ids: List of UUIDs identifying the rows to trace
Returns:
DataFrame containing the transformed rows in the next operation
Raises:
ValueError: If at root node or if row_ids format is invalid
Example:
```python
# Trace how specific customer rows are transformed
transformed = query.forward(["customer_uuid1", "customer_uuid2"])
```
|
site-packages/fenic/api/lineage.py
| true | false | 66 | 85 | null |
pl.DataFrame
|
[
"self",
"row_ids"
] |
Lineage
| null | null |
Type: method
Member Name: forwards
Qualified Name: fenic.api.lineage.Lineage.forwards
Docstring: Trace rows forward to see how they are transformed by the next operation.
Args:
row_ids: List of UUIDs identifying the rows to trace
Returns:
DataFrame containing the transformed rows in the next operation
Raises:
ValueError: If at root node or if row_ids format is invalid
Example:
```python
# Trace how specific customer rows are transformed
transformed = query.forward(["customer_uuid1", "customer_uuid2"])
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "row_ids"]
Returns: pl.DataFrame
Parent Class: Lineage
|
method
|
backwards
|
fenic.api.lineage.Lineage.backwards
|
Trace rows backwards to see which input rows produced them.
Args:
ids: List of UUIDs identifying the rows to trace back
branch_side: For operators with multiple inputs (like joins), specify which
input to trace ("left" or "right"). Not needed for single-input operations.
Returns:
DataFrame containing the source rows that produced the specified outputs
Raises:
ValueError: If invalid ids format or incorrect branch_side specification
Example:
```python
# Simple backward trace
source_rows = query.backward(["result_uuid1"])
# Trace back through a join
left_rows = query.backward(["join_uuid1"], branch_side="left")
right_rows = query.backward(["join_uuid1"], branch_side="right")
```
|
site-packages/fenic/api/lineage.py
| true | false | 87 | 114 | null |
pl.DataFrame
|
[
"self",
"ids",
"branch_side"
] |
Lineage
| null | null |
Type: method
Member Name: backwards
Qualified Name: fenic.api.lineage.Lineage.backwards
Docstring: Trace rows backwards to see which input rows produced them.
Args:
ids: List of UUIDs identifying the rows to trace back
branch_side: For operators with multiple inputs (like joins), specify which
input to trace ("left" or "right"). Not needed for single-input operations.
Returns:
DataFrame containing the source rows that produced the specified outputs
Raises:
ValueError: If invalid ids format or incorrect branch_side specification
Example:
```python
# Simple backward trace
source_rows = query.backward(["result_uuid1"])
# Trace back through a join
left_rows = query.backward(["join_uuid1"], branch_side="left")
right_rows = query.backward(["join_uuid1"], branch_side="right")
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "ids", "branch_side"]
Returns: pl.DataFrame
Parent Class: Lineage
|
method
|
skip_forwards
|
fenic.api.lineage.Lineage.skip_forwards
|
[Not Implemented] Trace rows forward through multiple operations at once.
This method will allow efficient tracing through multiple operations without
intermediate results.
Args:
row_ids: List of UUIDs identifying the rows to trace
Returns:
DataFrame containing the final transformed rows
Raises:
NotImplementedError: This method is not yet implemented
|
site-packages/fenic/api/lineage.py
| true | false | 116 | 131 | null |
pl.DataFrame
|
[
"self",
"row_ids"
] |
Lineage
| null | null |
Type: method
Member Name: skip_forwards
Qualified Name: fenic.api.lineage.Lineage.skip_forwards
Docstring: [Not Implemented] Trace rows forward through multiple operations at once.
This method will allow efficient tracing through multiple operations without
intermediate results.
Args:
row_ids: List of UUIDs identifying the rows to trace
Returns:
DataFrame containing the final transformed rows
Raises:
NotImplementedError: This method is not yet implemented
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "row_ids"]
Returns: pl.DataFrame
Parent Class: Lineage
|
method
|
skip_backwards
|
fenic.api.lineage.Lineage.skip_backwards
|
[Not Implemented] Trace rows backwards through multiple operations at once.
This method will allow efficient tracing through multiple operations without
intermediate results.
Args:
ids: List of UUIDs identifying the rows to trace back
Returns:
Dictionary mapping operation names to their source DataFrames
Raises:
NotImplementedError: This method is not yet implemented
|
site-packages/fenic/api/lineage.py
| true | false | 133 | 148 | null |
Dict[str, pl.DataFrame]
|
[
"self",
"ids"
] |
Lineage
| null | null |
Type: method
Member Name: skip_backwards
Qualified Name: fenic.api.lineage.Lineage.skip_backwards
Docstring: [Not Implemented] Trace rows backwards through multiple operations at once.
This method will allow efficient tracing through multiple operations without
intermediate results.
Args:
ids: List of UUIDs identifying the rows to trace back
Returns:
Dictionary mapping operation names to their source DataFrames
Raises:
NotImplementedError: This method is not yet implemented
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "ids"]
Returns: Dict[str, pl.DataFrame]
Parent Class: Lineage
|
method
|
get_result_df
|
fenic.api.lineage.Lineage.get_result_df
|
Get the result of the query as a Polars DataFrame.
|
site-packages/fenic/api/lineage.py
| true | false | 150 | 152 | null |
pl.DataFrame
|
[
"self"
] |
Lineage
| null | null |
Type: method
Member Name: get_result_df
Qualified Name: fenic.api.lineage.Lineage.get_result_df
Docstring: Get the result of the query as a Polars DataFrame.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: pl.DataFrame
Parent Class: Lineage
|
method
|
get_source_df
|
fenic.api.lineage.Lineage.get_source_df
|
Get a query source by name as a Polars DataFrame.
|
site-packages/fenic/api/lineage.py
| true | false | 154 | 157 | null |
pl.DataFrame
|
[
"self",
"source_name"
] |
Lineage
| null | null |
Type: method
Member Name: get_source_df
Qualified Name: fenic.api.lineage.Lineage.get_source_df
Docstring: Get a query source by name as a Polars DataFrame.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "source_name"]
Returns: pl.DataFrame
Parent Class: Lineage
|
module
|
column
|
fenic.api.column
|
Column API for Fenic DataFrames - represents column expressions and operations.
|
site-packages/fenic/api/column.py
| true | false | null | null | null | null | null | null | null | null |
Type: module
Member Name: column
Qualified Name: fenic.api.column
Docstring: Column API for Fenic DataFrames - represents column expressions and operations.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
class
|
Column
|
fenic.api.column.Column
|
A column expression in a DataFrame.
This class represents a column expression that can be used in DataFrame operations.
It provides methods for accessing, transforming, and combining column data.
Example: Create a column reference
```python
# Reference a column by name using col() function
col("column_name")
```
Example: Use column in operations
```python
# Perform arithmetic operations
df.select(col("price") * col("quantity"))
```
Example: Chain column operations
```python
# Chain multiple operations
df.select(col("name").upper().contains("John"))
```
|
site-packages/fenic/api/column.py
| true | false | 50 | 861 | null | null | null | null | null |
[] |
Type: class
Member Name: Column
Qualified Name: fenic.api.column.Column
Docstring: A column expression in a DataFrame.
This class represents a column expression that can be used in DataFrame operations.
It provides methods for accessing, transforming, and combining column data.
Example: Create a column reference
```python
# Reference a column by name using col() function
col("column_name")
```
Example: Use column in operations
```python
# Perform arithmetic operations
df.select(col("price") * col("quantity"))
```
Example: Chain column operations
```python
# Chain multiple operations
df.select(col("name").upper().contains("John"))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: none
Returns: none
Parent Class: none
|
method
|
__new__
|
fenic.api.column.Column.__new__
|
Prevent direct Column construction.
|
site-packages/fenic/api/column.py
| true | false | 77 | 81 | null | null |
[
"cls"
] |
Column
| null | null |
Type: method
Member Name: __new__
Qualified Name: fenic.api.column.Column.__new__
Docstring: Prevent direct Column construction.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["cls"]
Returns: none
Parent Class: Column
|
method
|
get_item
|
fenic.api.column.Column.get_item
|
Access an item in a struct or array column.
This method allows accessing elements in complex data types:
- For array columns, the key should be an integer index or a column expression that evaluates to an integer
- For struct columns, the key should be a literal field name
Args:
key (Union[str, int]): The index (for arrays) or field name (for structs) to access
Returns:
Column: A Column representing the accessed item
Example: Access an array element
```python
# Get the first element from an array column
df.select(col("array_column").get_item(0))
```
Example: Access a struct field
```python
# Get a field from a struct column
df.select(col("struct_column").get_item("field_name"))
```
|
site-packages/fenic/api/column.py
| true | false | 83 | 114 | null |
Column
|
[
"self",
"key"
] |
Column
| null | null |
Type: method
Member Name: get_item
Qualified Name: fenic.api.column.Column.get_item
Docstring: Access an item in a struct or array column.
This method allows accessing elements in complex data types:
- For array columns, the key should be an integer index or a column expression that evaluates to an integer
- For struct columns, the key should be a literal field name
Args:
key (Union[str, int]): The index (for arrays) or field name (for structs) to access
Returns:
Column: A Column representing the accessed item
Example: Access an array element
```python
# Get the first element from an array column
df.select(col("array_column").get_item(0))
```
Example: Access a struct field
```python
# Get a field from a struct column
df.select(col("struct_column").get_item("field_name"))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "key"]
Returns: Column
Parent Class: Column
|
method
|
__getitem__
|
fenic.api.column.Column.__getitem__
|
Access an item in a struct or array column using [] syntax.
This method provides a convenient syntax for accessing elements in complex data types:
- For array columns: col("array_column")[0]
- For struct columns: col("struct_column")["field_name"]
Args:
key (Union[str, int]): The index (for arrays) or field name (for structs) to access
Returns:
Column: A Column representing the accessed item
Example: Access an array element
```python
# Get the first element from an array column using [] syntax
df.select(col("array_column")[0])
```
Example: Access a struct field
```python
# Get a field from a struct column using [] syntax
df.select(col("struct_column")["field_name"])
```
|
site-packages/fenic/api/column.py
| true | false | 116 | 146 | null |
Column
|
[
"self",
"key"
] |
Column
| null | null |
Type: method
Member Name: __getitem__
Qualified Name: fenic.api.column.Column.__getitem__
Docstring: Access an item in a struct or array column using [] syntax.
This method provides a convenient syntax for accessing elements in complex data types:
- For array columns: col("array_column")[0]
- For struct columns: col("struct_column")["field_name"]
Args:
key (Union[str, int]): The index (for arrays) or field name (for structs) to access
Returns:
Column: A Column representing the accessed item
Example: Access an array element
```python
# Get the first element from an array column using [] syntax
df.select(col("array_column")[0])
```
Example: Access a struct field
```python
# Get a field from a struct column using [] syntax
df.select(col("struct_column")["field_name"])
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "key"]
Returns: Column
Parent Class: Column
|
method
|
__getattr__
|
fenic.api.column.Column.__getattr__
|
Access an attribute of a struct column.
This method allows accessing fields in struct columns using dot notation.
Args:
name (str): The name of the field to access
Returns:
Column: A Column representing the accessed field
Example: Access a struct field using dot notation
```python
# Get a field from a struct column using dot notation
df.select(col("struct_column").field_name)
```
|
site-packages/fenic/api/column.py
| true | false | 148 | 169 | null |
Column
|
[
"self",
"name"
] |
Column
| null | null |
Type: method
Member Name: __getattr__
Qualified Name: fenic.api.column.Column.__getattr__
Docstring: Access an attribute of a struct column.
This method allows accessing fields in struct columns using dot notation.
Args:
name (str): The name of the field to access
Returns:
Column: A Column representing the accessed field
Example: Access a struct field using dot notation
```python
# Get a field from a struct column using dot notation
df.select(col("struct_column").field_name)
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "name"]
Returns: Column
Parent Class: Column
|
method
|
alias
|
fenic.api.column.Column.alias
|
Create an alias for this column.
This method assigns a new name to the column expression, which is useful
for renaming columns or providing names for complex expressions.
Args:
name (str): The alias name to assign
Returns:
Column: Column with the specified alias
Example: Rename a column
```python
# Rename a column to a new name
df.select(col("original_name").alias("new_name"))
```
Example: Name a complex expression
```python
# Give a name to a calculated column
df.select((col("price") * col("quantity")).alias("total_value"))
```
|
site-packages/fenic/api/column.py
| true | false | 171 | 195 | null |
Column
|
[
"self",
"name"
] |
Column
| null | null |
Type: method
Member Name: alias
Qualified Name: fenic.api.column.Column.alias
Docstring: Create an alias for this column.
This method assigns a new name to the column expression, which is useful
for renaming columns or providing names for complex expressions.
Args:
name (str): The alias name to assign
Returns:
Column: Column with the specified alias
Example: Rename a column
```python
# Rename a column to a new name
df.select(col("original_name").alias("new_name"))
```
Example: Name a complex expression
```python
# Give a name to a calculated column
df.select((col("price") * col("quantity")).alias("total_value"))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "name"]
Returns: Column
Parent Class: Column
|
method
|
cast
|
fenic.api.column.Column.cast
|
Cast the column to a new data type.
This method creates an expression that casts the column to a specified data type.
The casting behavior depends on the source and target types:
Primitive type casting:
- Numeric types (IntegerType, FloatType, DoubleType) can be cast between each other
- Numeric types can be cast to/from StringType
- BooleanType can be cast to/from numeric types and StringType
- StringType cannot be directly cast to BooleanType (will raise TypeError)
Complex type casting:
- ArrayType can only be cast to another ArrayType (with castable element types)
- StructType can only be cast to another StructType (with matching/castable fields)
- Primitive types cannot be cast to/from complex types
Args:
data_type (DataType): The target DataType to cast the column to
Returns:
Column: A Column representing the casted expression
Example: Cast integer to string
```python
# Convert an integer column to string type
df.select(col("int_col").cast(StringType))
```
Example: Cast array of integers to array of strings
```python
# Convert an array of integers to an array of strings
df.select(col("int_array").cast(ArrayType(element_type=StringType)))
```
Example: Cast struct fields to different types
```python
# Convert struct fields to different types
new_type = StructType([
StructField("id", StringType),
StructField("value", FloatType)
])
df.select(col("data_struct").cast(new_type))
```
Raises:
TypeError: If the requested cast operation is not supported
|
site-packages/fenic/api/column.py
| true | false | 197 | 247 | null |
Column
|
[
"self",
"data_type"
] |
Column
| null | null |
Type: method
Member Name: cast
Qualified Name: fenic.api.column.Column.cast
Docstring: Cast the column to a new data type.
This method creates an expression that casts the column to a specified data type.
The casting behavior depends on the source and target types:
Primitive type casting:
- Numeric types (IntegerType, FloatType, DoubleType) can be cast between each other
- Numeric types can be cast to/from StringType
- BooleanType can be cast to/from numeric types and StringType
- StringType cannot be directly cast to BooleanType (will raise TypeError)
Complex type casting:
- ArrayType can only be cast to another ArrayType (with castable element types)
- StructType can only be cast to another StructType (with matching/castable fields)
- Primitive types cannot be cast to/from complex types
Args:
data_type (DataType): The target DataType to cast the column to
Returns:
Column: A Column representing the casted expression
Example: Cast integer to string
```python
# Convert an integer column to string type
df.select(col("int_col").cast(StringType))
```
Example: Cast array of integers to array of strings
```python
# Convert an array of integers to an array of strings
df.select(col("int_array").cast(ArrayType(element_type=StringType)))
```
Example: Cast struct fields to different types
```python
# Convert struct fields to different types
new_type = StructType([
StructField("id", StringType),
StructField("value", FloatType)
])
df.select(col("data_struct").cast(new_type))
```
Raises:
TypeError: If the requested cast operation is not supported
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "data_type"]
Returns: Column
Parent Class: Column
|
method
|
desc
|
fenic.api.column.Column.desc
|
Mark this column for descending sort order.
Returns:
Column: A sort expression with descending order.
Example: Sort by age in descending order
```python
# Sort a dataframe by age in descending order
df.sort(col("age").desc()).show()
```
|
site-packages/fenic/api/column.py
| true | false | 249 | 263 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: desc
Qualified Name: fenic.api.column.Column.desc
Docstring: Mark this column for descending sort order.
Returns:
Column: A sort expression with descending order.
Example: Sort by age in descending order
```python
# Sort a dataframe by age in descending order
df.sort(col("age").desc()).show()
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
desc_nulls_first
|
fenic.api.column.Column.desc_nulls_first
|
Alias for desc().
Returns:
Column: A sort expression with descending order and nulls first.
Example: Sort by age in descending order with nulls first
```python
df.sort(col("age").desc_nulls_first()).show()
```
|
site-packages/fenic/api/column.py
| true | false | 265 | 276 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: desc_nulls_first
Qualified Name: fenic.api.column.Column.desc_nulls_first
Docstring: Alias for desc().
Returns:
Column: A sort expression with descending order and nulls first.
Example: Sort by age in descending order with nulls first
```python
df.sort(col("age").desc_nulls_first()).show()
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
desc_nulls_last
|
fenic.api.column.Column.desc_nulls_last
|
Mark this column for descending sort order with nulls last.
Returns:
Column: A sort expression with descending order and nulls last.
Example: Sort by age in descending order with nulls last
```python
# Sort a dataframe by age in descending order, with nulls appearing last
df.sort(col("age").desc_nulls_last()).show()
```
|
site-packages/fenic/api/column.py
| true | false | 278 | 292 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: desc_nulls_last
Qualified Name: fenic.api.column.Column.desc_nulls_last
Docstring: Mark this column for descending sort order with nulls last.
Returns:
Column: A sort expression with descending order and nulls last.
Example: Sort by age in descending order with nulls last
```python
# Sort a dataframe by age in descending order, with nulls appearing last
df.sort(col("age").desc_nulls_last()).show()
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
asc
|
fenic.api.column.Column.asc
|
Mark this column for ascending sort order.
Returns:
Column: A sort expression with ascending order and nulls first.
Example: Sort by age in ascending order
```python
# Sort a dataframe by age in ascending order
df.sort(col("age").asc()).show()
```
|
site-packages/fenic/api/column.py
| true | false | 294 | 306 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: asc
Qualified Name: fenic.api.column.Column.asc
Docstring: Mark this column for ascending sort order.
Returns:
Column: A sort expression with ascending order and nulls first.
Example: Sort by age in ascending order
```python
# Sort a dataframe by age in ascending order
df.sort(col("age").asc()).show()
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
asc_nulls_first
|
fenic.api.column.Column.asc_nulls_first
|
Alias for asc().
Returns:
Column: A Column expression that provides a column and sort order to the sort function
|
site-packages/fenic/api/column.py
| true | false | 308 | 314 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: asc_nulls_first
Qualified Name: fenic.api.column.Column.asc_nulls_first
Docstring: Alias for asc().
Returns:
Column: A Column expression that provides a column and sort order to the sort function
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
asc_nulls_last
|
fenic.api.column.Column.asc_nulls_last
|
Mark this column for ascending sort order with nulls last.
Returns:
Column: A sort expression with ascending order and nulls last.
Example: Sort by age in ascending order with nulls last
```python
# Sort a dataframe by age in ascending order, with nulls appearing last
df.sort(col("age").asc_nulls_last()).show()
```
|
site-packages/fenic/api/column.py
| true | false | 316 | 330 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: asc_nulls_last
Qualified Name: fenic.api.column.Column.asc_nulls_last
Docstring: Mark this column for ascending sort order with nulls last.
Returns:
Column: A sort expression with ascending order and nulls last.
Example: Sort by age in ascending order with nulls last
```python
# Sort a dataframe by age in ascending order, with nulls appearing last
df.sort(col("age").asc_nulls_last()).show()
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
contains
|
fenic.api.column.Column.contains
|
Check if the column contains a substring.
This method creates a boolean expression that checks if each value in the column
contains the specified substring. The substring can be either a literal string
or a column expression.
Args:
other (Union[str, Column]): The substring to search for (can be a string or column expression)
Returns:
Column: A boolean column indicating whether each value contains the substring
Example: Find rows where name contains "john"
```python
# Filter rows where the name column contains "john"
df.filter(col("name").contains("john"))
```
Example: Find rows where text contains a dynamic pattern
```python
# Filter rows where text contains a value from another column
df.filter(col("text").contains(col("pattern")))
```
|
site-packages/fenic/api/column.py
| true | false | 332 | 361 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: contains
Qualified Name: fenic.api.column.Column.contains
Docstring: Check if the column contains a substring.
This method creates a boolean expression that checks if each value in the column
contains the specified substring. The substring can be either a literal string
or a column expression.
Args:
other (Union[str, Column]): The substring to search for (can be a string or column expression)
Returns:
Column: A boolean column indicating whether each value contains the substring
Example: Find rows where name contains "john"
```python
# Filter rows where the name column contains "john"
df.filter(col("name").contains("john"))
```
Example: Find rows where text contains a dynamic pattern
```python
# Filter rows where text contains a value from another column
df.filter(col("text").contains(col("pattern")))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
contains_any
|
fenic.api.column.Column.contains_any
|
Check if the column contains any of the specified substrings.
This method creates a boolean expression that checks if each value in the column
contains any of the specified substrings. The matching can be case-sensitive or
case-insensitive.
Args:
others (List[str]): List of substrings to search for
case_insensitive (bool): Whether to perform case-insensitive matching (default: True)
Returns:
Column: A boolean column indicating whether each value contains any substring
Example: Find rows where name contains "john" or "jane" (case-insensitive)
```python
# Filter rows where name contains either "john" or "jane"
df.filter(col("name").contains_any(["john", "jane"]))
```
Example: Case-sensitive matching
```python
# Filter rows with case-sensitive matching
df.filter(col("name").contains_any(["John", "Jane"], case_insensitive=False))
```
|
site-packages/fenic/api/column.py
| true | false | 363 | 391 | null |
Column
|
[
"self",
"others",
"case_insensitive"
] |
Column
| null | null |
Type: method
Member Name: contains_any
Qualified Name: fenic.api.column.Column.contains_any
Docstring: Check if the column contains any of the specified substrings.
This method creates a boolean expression that checks if each value in the column
contains any of the specified substrings. The matching can be case-sensitive or
case-insensitive.
Args:
others (List[str]): List of substrings to search for
case_insensitive (bool): Whether to perform case-insensitive matching (default: True)
Returns:
Column: A boolean column indicating whether each value contains any substring
Example: Find rows where name contains "john" or "jane" (case-insensitive)
```python
# Filter rows where name contains either "john" or "jane"
df.filter(col("name").contains_any(["john", "jane"]))
```
Example: Case-sensitive matching
```python
# Filter rows with case-sensitive matching
df.filter(col("name").contains_any(["John", "Jane"], case_insensitive=False))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "others", "case_insensitive"]
Returns: Column
Parent Class: Column
|
method
|
starts_with
|
fenic.api.column.Column.starts_with
|
Check if the column starts with a substring.
This method creates a boolean expression that checks if each value in the column
starts with the specified substring. The substring can be either a literal string
or a column expression.
Args:
other (Union[str, Column]): The substring to check for at the start (can be a string or column expression)
Returns:
Column: A boolean column indicating whether each value starts with the substring
Example: Find rows where name starts with "Mr"
```python
# Filter rows where name starts with "Mr"
df.filter(col("name").starts_with("Mr"))
```
Example: Find rows where text starts with a dynamic pattern
```python
# Filter rows where text starts with a value from another column
df.filter(col("text").starts_with(col("prefix")))
```
Raises:
ValueError: If the substring starts with a regular expression anchor (^)
|
site-packages/fenic/api/column.py
| true | false | 393 | 427 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: starts_with
Qualified Name: fenic.api.column.Column.starts_with
Docstring: Check if the column starts with a substring.
This method creates a boolean expression that checks if each value in the column
starts with the specified substring. The substring can be either a literal string
or a column expression.
Args:
other (Union[str, Column]): The substring to check for at the start (can be a string or column expression)
Returns:
Column: A boolean column indicating whether each value starts with the substring
Example: Find rows where name starts with "Mr"
```python
# Filter rows where name starts with "Mr"
df.filter(col("name").starts_with("Mr"))
```
Example: Find rows where text starts with a dynamic pattern
```python
# Filter rows where text starts with a value from another column
df.filter(col("text").starts_with(col("prefix")))
```
Raises:
ValueError: If the substring starts with a regular expression anchor (^)
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
ends_with
|
fenic.api.column.Column.ends_with
|
Check if the column ends with a substring.
This method creates a boolean expression that checks if each value in the column
ends with the specified substring. The substring can be either a literal string
or a column expression.
Args:
other (Union[str, Column]): The substring to check for at the end (can be a string or column expression)
Returns:
Column: A boolean column indicating whether each value ends with the substring
Example: Find rows where email ends with "@gmail.com"
```python
df.filter(col("email").ends_with("@gmail.com"))
```
Example: Find rows where text ends with a dynamic pattern
```python
df.filter(col("text").ends_with(col("suffix")))
```
Raises:
ValueError: If the substring ends with a regular expression anchor ($)
|
site-packages/fenic/api/column.py
| true | false | 429 | 461 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: ends_with
Qualified Name: fenic.api.column.Column.ends_with
Docstring: Check if the column ends with a substring.
This method creates a boolean expression that checks if each value in the column
ends with the specified substring. The substring can be either a literal string
or a column expression.
Args:
other (Union[str, Column]): The substring to check for at the end (can be a string or column expression)
Returns:
Column: A boolean column indicating whether each value ends with the substring
Example: Find rows where email ends with "@gmail.com"
```python
df.filter(col("email").ends_with("@gmail.com"))
```
Example: Find rows where text ends with a dynamic pattern
```python
df.filter(col("text").ends_with(col("suffix")))
```
Raises:
ValueError: If the substring ends with a regular expression anchor ($)
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
rlike
|
fenic.api.column.Column.rlike
|
Check if the column matches a regular expression pattern.
This method creates a boolean expression that checks if each value in the column
matches the specified regular expression pattern.
Args:
other (Union[str, Column]): The regular expression pattern to match against.
Can be a string or a a column expression that resolves to a string.
Returns:
Column: A boolean column indicating whether each value matches the pattern
Example: Find rows where phone number matches pattern
```python
# Filter rows where phone number matches a specific pattern
df.filter(col("phone").rlike(r"^\d{3}-\d{3}-\d{4}$"))
```
Example: Find rows where text contains word boundaries
```python
# Filter rows where text contains a word with boundaries
df.filter(col("text").rlike(r"\bhello\b"))
```
|
site-packages/fenic/api/column.py
| true | false | 463 | 492 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: rlike
Qualified Name: fenic.api.column.Column.rlike
Docstring: Check if the column matches a regular expression pattern.
This method creates a boolean expression that checks if each value in the column
matches the specified regular expression pattern.
Args:
other (Union[str, Column]): The regular expression pattern to match against.
Can be a string or a a column expression that resolves to a string.
Returns:
Column: A boolean column indicating whether each value matches the pattern
Example: Find rows where phone number matches pattern
```python
# Filter rows where phone number matches a specific pattern
df.filter(col("phone").rlike(r"^\d{3}-\d{3}-\d{4}$"))
```
Example: Find rows where text contains word boundaries
```python
# Filter rows where text contains a word with boundaries
df.filter(col("text").rlike(r"\bhello\b"))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
like
|
fenic.api.column.Column.like
|
Check if the column matches a SQL LIKE pattern.
This method creates a boolean expression that checks if each value in the column
matches the specified SQL LIKE pattern.
The pattern can be a string or a a column expression that resolves to a string.
SQL LIKE pattern syntax:
- % matches any sequence of characters
- _ matches any single character
Args:
other (str): The SQL LIKE pattern to match against
Returns:
Column: A boolean column indicating whether each value matches the pattern
Example: Find rows where name starts with "J" and ends with "n"
```python
# Filter rows where name matches the pattern "J%n"
df.filter(col("name").like("J%n"))
```
Example: Find rows where code matches specific pattern
```python
# Filter rows where code matches the pattern "A_B%"
df.filter(col("code").like("A_B%"))
```
|
site-packages/fenic/api/column.py
| true | false | 494 | 528 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: like
Qualified Name: fenic.api.column.Column.like
Docstring: Check if the column matches a SQL LIKE pattern.
This method creates a boolean expression that checks if each value in the column
matches the specified SQL LIKE pattern.
The pattern can be a string or a a column expression that resolves to a string.
SQL LIKE pattern syntax:
- % matches any sequence of characters
- _ matches any single character
Args:
other (str): The SQL LIKE pattern to match against
Returns:
Column: A boolean column indicating whether each value matches the pattern
Example: Find rows where name starts with "J" and ends with "n"
```python
# Filter rows where name matches the pattern "J%n"
df.filter(col("name").like("J%n"))
```
Example: Find rows where code matches specific pattern
```python
# Filter rows where code matches the pattern "A_B%"
df.filter(col("code").like("A_B%"))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
ilike
|
fenic.api.column.Column.ilike
|
Check if the column matches a SQL LIKE pattern (case-insensitive).
This method creates a boolean expression that checks if each value in the column
matches the specified SQL LIKE pattern, ignoring case.
The pattern can be a string or a a column expression that resolves to a string.
SQL LIKE pattern syntax:
- % matches any sequence of characters
- _ matches any single character
Args:
other (str): The SQL LIKE pattern to match against
Returns:
Column: A boolean column indicating whether each value matches the pattern
Example: Find rows where name starts with "j" and ends with "n" (case-insensitive)
```python
# Filter rows where name matches the pattern "j%n" (case-insensitive)
df.filter(col("name").ilike("j%n"))
```
Example: Find rows where code matches pattern (case-insensitive)
```python
# Filter rows where code matches the pattern "a_b%" (case-insensitive)
df.filter(col("code").ilike("a_b%"))
```
|
site-packages/fenic/api/column.py
| true | false | 530 | 564 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: ilike
Qualified Name: fenic.api.column.Column.ilike
Docstring: Check if the column matches a SQL LIKE pattern (case-insensitive).
This method creates a boolean expression that checks if each value in the column
matches the specified SQL LIKE pattern, ignoring case.
The pattern can be a string or a a column expression that resolves to a string.
SQL LIKE pattern syntax:
- % matches any sequence of characters
- _ matches any single character
Args:
other (str): The SQL LIKE pattern to match against
Returns:
Column: A boolean column indicating whether each value matches the pattern
Example: Find rows where name starts with "j" and ends with "n" (case-insensitive)
```python
# Filter rows where name matches the pattern "j%n" (case-insensitive)
df.filter(col("name").ilike("j%n"))
```
Example: Find rows where code matches pattern (case-insensitive)
```python
# Filter rows where code matches the pattern "a_b%" (case-insensitive)
df.filter(col("code").ilike("a_b%"))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
is_null
|
fenic.api.column.Column.is_null
|
Check if the column contains NULL values.
This method creates an expression that evaluates to TRUE when the column value is NULL.
Returns:
Column: A Column representing a boolean expression that is TRUE when this column is NULL
Example: Filter rows where a column is NULL
```python
# Filter rows where some_column is NULL
df.filter(col("some_column").is_null())
```
Example: Use in a complex condition
```python
# Filter rows where col1 is NULL or col2 is greater than 100
df.filter(col("col1").is_null() | (col("col2") > 100))
```
|
site-packages/fenic/api/column.py
| true | false | 566 | 586 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: is_null
Qualified Name: fenic.api.column.Column.is_null
Docstring: Check if the column contains NULL values.
This method creates an expression that evaluates to TRUE when the column value is NULL.
Returns:
Column: A Column representing a boolean expression that is TRUE when this column is NULL
Example: Filter rows where a column is NULL
```python
# Filter rows where some_column is NULL
df.filter(col("some_column").is_null())
```
Example: Use in a complex condition
```python
# Filter rows where col1 is NULL or col2 is greater than 100
df.filter(col("col1").is_null() | (col("col2") > 100))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
is_not_null
|
fenic.api.column.Column.is_not_null
|
Check if the column contains non-NULL values.
This method creates an expression that evaluates to TRUE when the column value is not NULL.
Returns:
Column: A Column representing a boolean expression that is TRUE when this column is not NULL
Example: Filter rows where a column is not NULL
```python
df.filter(col("some_column").is_not_null())
```
Example: Use in a complex condition
```python
df.filter(col("col1").is_not_null() & (col("col2") <= 50))
```
|
site-packages/fenic/api/column.py
| true | false | 588 | 606 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: is_not_null
Qualified Name: fenic.api.column.Column.is_not_null
Docstring: Check if the column contains non-NULL values.
This method creates an expression that evaluates to TRUE when the column value is not NULL.
Returns:
Column: A Column representing a boolean expression that is TRUE when this column is not NULL
Example: Filter rows where a column is not NULL
```python
df.filter(col("some_column").is_not_null())
```
Example: Use in a complex condition
```python
df.filter(col("col1").is_not_null() & (col("col2") <= 50))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
when
|
fenic.api.column.Column.when
|
Evaluates a list of conditions and returns one of multiple possible result expressions.
If Column.otherwise() is not invoked, None is returned for unmatched conditions.
Otherwise() will return for rows with None inputs.
Args:
condition (Column): A boolean Column expression
value (Column): A literal value or Column expression to return if the condition is true
Returns:
Column: A Column expression representing whether each element of Column matches the condition
Raises:
TypeError: If the condition is not a boolean Column expression
Example: Use when/otherwise for conditional logic
```python
# Create a DataFrame with age and name columns
df = session.createDataFrame(
{"age": [2, 5]}, {"name": ["Alice", "Bob"]}
)
# Use when/otherwise to create a case result column
df.select(
col("name"),
when(col("age") > 3, 1).otherwise(0).alias("case_result")
).show()
# Output:
# +-----+-----------+
# | name|case_result|
# +-----+-----------+
# |Alice| 0|
# | Bob| 1|
# +-----+-----------+
```
|
site-packages/fenic/api/column.py
| true | false | 608 | 645 | null |
Column
|
[
"self",
"condition",
"value"
] |
Column
| null | null |
Type: method
Member Name: when
Qualified Name: fenic.api.column.Column.when
Docstring: Evaluates a list of conditions and returns one of multiple possible result expressions.
If Column.otherwise() is not invoked, None is returned for unmatched conditions.
Otherwise() will return for rows with None inputs.
Args:
condition (Column): A boolean Column expression
value (Column): A literal value or Column expression to return if the condition is true
Returns:
Column: A Column expression representing whether each element of Column matches the condition
Raises:
TypeError: If the condition is not a boolean Column expression
Example: Use when/otherwise for conditional logic
```python
# Create a DataFrame with age and name columns
df = session.createDataFrame(
{"age": [2, 5]}, {"name": ["Alice", "Bob"]}
)
# Use when/otherwise to create a case result column
df.select(
col("name"),
when(col("age") > 3, 1).otherwise(0).alias("case_result")
).show()
# Output:
# +-----+-----------+
# | name|case_result|
# +-----+-----------+
# |Alice| 0|
# | Bob| 1|
# +-----+-----------+
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "condition", "value"]
Returns: Column
Parent Class: Column
|
method
|
otherwise
|
fenic.api.column.Column.otherwise
|
Evaluates a list of conditions and returns one of multiple possible result expressions.
If Column.otherwise() is not invoked, None is returned for unmatched conditions.
Otherwise() will return for rows with None inputs.
Args:
value (Column): A literal value or Column expression to return
Returns:
Column: A Column expression representing whether each element of Column is not matched by any previous conditions
Example: Use when/otherwise for conditional logic
```python
# Create a DataFrame with age and name columns
df = session.createDataFrame(
{"age": [2, 5]}, {"name": ["Alice", "Bob"]}
)
# Use when/otherwise to create a case result column
df.select(
col("name"),
when(col("age") > 3, 1).otherwise(0).alias("case_result")
).show()
# Output:
# +-----+-----------+
# | name|case_result|
# +-----+-----------+
# |Alice| 0|
# | Bob| 1|
# +-----+-----------+
```
|
site-packages/fenic/api/column.py
| true | false | 647 | 680 | null |
Column
|
[
"self",
"value"
] |
Column
| null | null |
Type: method
Member Name: otherwise
Qualified Name: fenic.api.column.Column.otherwise
Docstring: Evaluates a list of conditions and returns one of multiple possible result expressions.
If Column.otherwise() is not invoked, None is returned for unmatched conditions.
Otherwise() will return for rows with None inputs.
Args:
value (Column): A literal value or Column expression to return
Returns:
Column: A Column expression representing whether each element of Column is not matched by any previous conditions
Example: Use when/otherwise for conditional logic
```python
# Create a DataFrame with age and name columns
df = session.createDataFrame(
{"age": [2, 5]}, {"name": ["Alice", "Bob"]}
)
# Use when/otherwise to create a case result column
df.select(
col("name"),
when(col("age") > 3, 1).otherwise(0).alias("case_result")
).show()
# Output:
# +-----+-----------+
# | name|case_result|
# +-----+-----------+
# |Alice| 0|
# | Bob| 1|
# +-----+-----------+
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "value"]
Returns: Column
Parent Class: Column
|
method
|
is_in
|
fenic.api.column.Column.is_in
|
Check if the column is in a list of values or a column expression.
Args:
other (Union[List[Any], ColumnOrName]): A list of values or a Column expression
Returns:
Column: A Column expression representing whether each element of Column is in the list
Example: Check if name is in a list of values
```python
# Filter rows where name is in a list of values
df.filter(col("name").is_in(["Alice", "Bob"]))
```
Example: Check if value is in another column
```python
# Filter rows where name is in another column
df.filter(col("name").is_in(col("other_column")))
```
|
site-packages/fenic/api/column.py
| true | false | 682 | 710 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: is_in
Qualified Name: fenic.api.column.Column.is_in
Docstring: Check if the column is in a list of values or a column expression.
Args:
other (Union[List[Any], ColumnOrName]): A list of values or a Column expression
Returns:
Column: A Column expression representing whether each element of Column is in the list
Example: Check if name is in a list of values
```python
# Filter rows where name is in a list of values
df.filter(col("name").is_in(["Alice", "Bob"]))
```
Example: Check if value is in another column
```python
# Filter rows where name is in another column
df.filter(col("name").is_in(col("other_column")))
```
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
_from_logical_expr
|
fenic.api.column.Column._from_logical_expr
|
Create a Column from a LogicalExpr.
Enforces that SortExpr and AggregateExpr do not appear nested inside
the expression by checking immediate children, ensuring these expressions
only appear at the root of the tree.
|
site-packages/fenic/api/column.py
| false | true | 712 | 742 | null |
Column
|
[
"cls",
"logical_expr"
] |
Column
| null | null |
Type: method
Member Name: _from_logical_expr
Qualified Name: fenic.api.column.Column._from_logical_expr
Docstring: Create a Column from a LogicalExpr.
Enforces that SortExpr and AggregateExpr do not appear nested inside
the expression by checking immediate children, ensuring these expressions
only appear at the root of the tree.
Value: none
Annotation: none
is Public? : false
is Private? : true
Parameters: ["cls", "logical_expr"]
Returns: Column
Parent Class: Column
|
method
|
_from_column_name
|
fenic.api.column.Column._from_column_name
| null |
site-packages/fenic/api/column.py
| false | true | 744 | 750 | null | null |
[
"cls",
"col_name"
] |
Column
| null | null |
Type: method
Member Name: _from_column_name
Qualified Name: fenic.api.column.Column._from_column_name
Docstring: none
Value: none
Annotation: none
is Public? : false
is Private? : true
Parameters: ["cls", "col_name"]
Returns: none
Parent Class: Column
|
method
|
_from_col_or_name
|
fenic.api.column.Column._from_col_or_name
| null |
site-packages/fenic/api/column.py
| false | true | 752 | 757 | null |
Column
|
[
"cls",
"col_or_name"
] |
Column
| null | null |
Type: method
Member Name: _from_col_or_name
Qualified Name: fenic.api.column.Column._from_col_or_name
Docstring: none
Value: none
Annotation: none
is Public? : false
is Private? : true
Parameters: ["cls", "col_or_name"]
Returns: Column
Parent Class: Column
|
method
|
_create_binary_expr
|
fenic.api.column.Column._create_binary_expr
| null |
site-packages/fenic/api/column.py
| false | true | 759 | 773 | null |
Column
|
[
"self",
"other",
"op",
"expr_class",
"reverse"
] |
Column
| null | null |
Type: method
Member Name: _create_binary_expr
Qualified Name: fenic.api.column.Column._create_binary_expr
Docstring: none
Value: none
Annotation: none
is Public? : false
is Private? : true
Parameters: ["self", "other", "op", "expr_class", "reverse"]
Returns: Column
Parent Class: Column
|
method
|
__invert__
|
fenic.api.column.Column.__invert__
|
Logical NOT operation.
|
site-packages/fenic/api/column.py
| true | false | 775 | 777 | null |
Column
|
[
"self"
] |
Column
| null | null |
Type: method
Member Name: __invert__
Qualified Name: fenic.api.column.Column.__invert__
Docstring: Logical NOT operation.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self"]
Returns: Column
Parent Class: Column
|
method
|
__gt__
|
fenic.api.column.Column.__gt__
|
Greater than comparison.
|
site-packages/fenic/api/column.py
| true | false | 779 | 781 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __gt__
Qualified Name: fenic.api.column.Column.__gt__
Docstring: Greater than comparison.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
__ge__
|
fenic.api.column.Column.__ge__
|
Greater than or equal comparison.
|
site-packages/fenic/api/column.py
| true | false | 783 | 785 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __ge__
Qualified Name: fenic.api.column.Column.__ge__
Docstring: Greater than or equal comparison.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
__lt__
|
fenic.api.column.Column.__lt__
|
Less than comparison.
|
site-packages/fenic/api/column.py
| true | false | 787 | 789 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __lt__
Qualified Name: fenic.api.column.Column.__lt__
Docstring: Less than comparison.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
__le__
|
fenic.api.column.Column.__le__
|
Less than or equal comparison.
|
site-packages/fenic/api/column.py
| true | false | 791 | 793 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __le__
Qualified Name: fenic.api.column.Column.__le__
Docstring: Less than or equal comparison.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
__eq__
|
fenic.api.column.Column.__eq__
|
Equality comparison.
|
site-packages/fenic/api/column.py
| true | false | 795 | 797 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __eq__
Qualified Name: fenic.api.column.Column.__eq__
Docstring: Equality comparison.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
__ne__
|
fenic.api.column.Column.__ne__
|
Not equal comparison.
|
site-packages/fenic/api/column.py
| true | false | 799 | 801 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __ne__
Qualified Name: fenic.api.column.Column.__ne__
Docstring: Not equal comparison.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
method
|
__and__
|
fenic.api.column.Column.__and__
|
Logical AND operation.
|
site-packages/fenic/api/column.py
| true | false | 803 | 805 | null |
Column
|
[
"self",
"other"
] |
Column
| null | null |
Type: method
Member Name: __and__
Qualified Name: fenic.api.column.Column.__and__
Docstring: Logical AND operation.
Value: none
Annotation: none
is Public? : true
is Private? : false
Parameters: ["self", "other"]
Returns: Column
Parent Class: Column
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.