Skip to content

DOCS-6899: Document sqlname field in the BI connector #2520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/includes/fact-mongodrdl-example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ database ``test``:
{
"_id": ObjectId("....")
"close": 7.45,
"detail": { "a": 2, "b":3}
"detail": { "a": 2, "b": 3 }
}

You can use :program:`mongodrdl` to generate a schema based on this collection
Expand Down
26 changes: 16 additions & 10 deletions source/products/bi-connector.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ You may edit DRDL files in the following ways:
- Add fields,
- Remove fields,
- Remove tables,
- Rename tables, so long as the ``collection`` field remains the same.
- Rename tables, so long as the ``collection`` field remains the same,
- Rename fields using the ``sqlname`` option

Note that you can *not* currently rename fields.
.. versionadded:: 1.1

Renaming fields is only supported since version 1.1 of the BI Connector.

.. _drdl:

Expand All @@ -87,24 +90,27 @@ view of a MongoDB schema.
as a guideline, and :program:`mongobischema` imports them into the Business
Intelligence Connector.

Using the `YAML <https://yaml.org/>`_ format, the file lists the databases,
tables, and columns to be "exported" for use in the Business Intelligence tools.

File Format
```````````

Using the `YAML <https://yaml.org/>`_ format, the ``DRDL`` file lists the
databases, tables, and columns to be "exported" for use in Business
Intelligence tools.

.. code-block:: yaml

schema:
- db: <database name>
tables:
- table: <table name>
collection: <mongo collection name>
- table: <SQL table name>
collection: <MongoDB collection name>
pipeline:
- <optional pipeline elements>
columns:
- name: <column name>
mongotype: <mongo field type>
sqltype: <mapped SQL type>
- name: <MongoDB field name>
sqlname: <mapped SQL column name>
mongotype: <MongoDB field type>
sqltype: <mapped SQL column type>

Example
```````
Expand Down