# \[Resolved\] Multitable Metadata Import Issue

**URL:** <https://forum.datacebo.com/t/resolved-multitable-metadata-import-issue/261>\
**Category:** Synthetic Data Creation\
**Tags:** metadata\
**Created:** [October 18, 2024, 8:07am UTC](https://forum.datacebo.com/t/resolved-multitable-metadata-import-issue/261 "2024-10-18T08:07:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavya.kundra](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@bhavya.kundra](https://forum.datacebo.com/u/bhavya.kundra)\
**Post date:** [October 18, 2024, 8:07am UTC](https://forum.datacebo.com/t/resolved-multitable-metadata-import-issue/261/1 "2024-10-18T08:07:14Z")

</div>

So, I am working on a multi table SDV project. When I am importing **Metadata** from sdv multi table library, I am getting the following error as you can see the below screenshot:-

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/sdv/original/1X/bed5180de3460c9513a4a9f03151209fb095c1c5.png)  
I have tried with the previous versions but still getting the same error. And when I try to import **MultiTableMetadata** instead of **Metadata** then it is getting imported but while detecting the data from dataframes, I am getting the following error as you can see in the below screenshots:-  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/sdv/original/1X/709674c95d3465211445ae9bd805f9fcdd050f52.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/sdv/original/1X/2256027ce2f9603952ca1aad2a2eef32c0b0ce96.png)  
About **MultiTableMetadata** import, nothing is provided in the documentation. I have checked the github for these methods as well, they are available there but still not able to import or work with them. I guess either SDV documentation or SDV code issue is there.  
Thanks.

---

<div class="post-metadata">

**Author:** ![neha](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.datacebo.com/neha/32/15_2.png) [@neha](https://forum.datacebo.com/u/neha)\
**Post date:** [October 18, 2024, 3:39pm UTC](https://forum.datacebo.com/t/resolved-multitable-metadata-import-issue/261/2 "2024-10-18T15:39:30Z")

</div>

Hi @bhavya.kundra,

Tl;dr Your issue is probably due to using an SDV Enterprise version older than 0.18.0. Upgrading should fix the issue. More details below.

# Details

The recommended approach is to use the `Metadata` class, as mentioned in the docs. (The `MultiTableMetadata` method is for older versions of SDV. It is not recommended anymore, and it does not appear in our docs anymore either.)

```python
from sdv.metadata import Metadata
from sdv.io.local import CSVHandler

# read all CSVs from a folder into Python (dataframe)
connector = CSVHandler()
data = connector.read(folder_name='project/data/')

# automatically infer metadata from the dataframe
metadata = Metadata.detect_from_dataframes(data)

```

The `Metadata` object is new, available starting from SDV Enterprise version 0.18.0 and above. You can run the commands below to see which version you have.

```python
import sdv

print(sdv.version.enterprise)

```

If the version is less than 0.18.0, I would recommend upgrading. Or if you are unable to upgrade, let us know.

# Resources

- **[Installation Instructions](https://docs.sdv.dev/sdv-enterprise/sdv-enterprise/installation#basic-instructions)** this is the same for first-time installation as well as upgrading to a later version
- **[Release Notes](https://docs.sdv.dev/sdv-enterprise/resources/release-notes#version-0.18.0-october-3-2024)** for SDV 0.18.0

---

<div class="post-metadata">

**Author:** ![neha](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.datacebo.com/neha/32/15_2.png) [@neha](https://forum.datacebo.com/u/neha)\
**Post date:** [October 24, 2024, 2:46pm UTC](https://forum.datacebo.com/t/resolved-multitable-metadata-import-issue/261/3 "2024-10-24T14:46:20Z")

</div>

Hi @bhavya.kundra could you confirm if the above suggestions work for you?

If you are still having problems with this, please feel free to reply below and we’d be happy to help you troubleshoot.

---

<div class="post-metadata">

**Author:** ![neha](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.datacebo.com/neha/32/15_2.png) [@neha](https://forum.datacebo.com/u/neha)\
**Post date:** [November 12, 2024, 5:25pm UTC](https://forum.datacebo.com/t/resolved-multitable-metadata-import-issue/261/4 "2024-11-12T17:25:08Z")

</div>

Hello, I’m marking this as resolved since we have supplied a solution. If you are still continuing to experience this issue, feel free to reply below and we can always continue the investigation.
