How to access secrets to copy them to another inst...
# ask-ai
m
How to access secrets to copy them to another instance?
k
To access and copy secrets to another instance in Airbyte, you can follow these steps based on the provided knowledge sources: 1. Identify the Secret in Airbyte Database: - First, you need to identify the secret in the Airbyte database. You can do this by querying the
secrets
table in the Airbyte database. For example:
Copy code
sql      SELECT * FROM secrets WHERE coordinate = 'your_secret_coordinate';
- Replace
'your_secret_coordinate'
with the actual coordinate of the secret you are looking for. 2. Fetch the Secret Value: - The query will return the secret value stored in the
payload
column. This is the value you need to copy. 3. Create a Secret in AWS Secrets Manager: - If you are using AWS Secrets Manager, you can create a new secret with the fetched value. Ensure you use the same KMS key that Airbyte is configured to use for secrets manager to ensure it can access it. - Here is an example of how to create a secret in AWS Secrets Manager:
Copy code
bash      aws secretsmanager create-secret --name your_secret_name --secret-string 'your_secret_value' --kms-key-id your_kms_key_id
- Replace
your_secret_name
,
your_secret_value
, and
your_kms_key_id
with the appropriate values. 4. Configure Airbyte to Use the New Secret: - Ensure that your Airbyte instance is configured to use AWS Secrets Manager and the correct KMS key. Here is an example configuration:
Copy code
yaml      global:        storage:          type: s3          bucket:            log: ${s3_logs_bucket}            state: ${state_bucket}          s3:            authenticationType: instanceProfile            region: ${aws_region}        secretsManager:          type: awsSecretManager          awsSecretManager:            authenticationType: instanceProfile            region: ${aws_region}            kms: ${kms_key_arn}
- Replace the placeholders with your actual values. By following these steps, you can access and copy secrets to another instance in Airbyte. For more detailed information, you can refer to the [GitHub Issue](https://github.com/airbytehq/airbyte/issues/36754) and the [Forum Post](https://discuss.airbyte.io/t/3514). If you need further assistance, please refer to the [Airbyte documentation](https://docs.airbyte.com/) or reach out to the Airbyte community for support.
m
@kapa.ai I'm looking for my sources' secrets. How can I access them ?
k
To access your sources' secrets in Airbyte, you can follow these steps based on the provided knowledge sources: 1. Google Secret Manager (GSM): - If you are using Google Secret Manager to store your secrets, you can access them by following the instructions in the [Github Issue #28367](https://github.com/airbytehq/airbyte/issues/28367). This issue discusses how to set Airbyte to read a secret from an existing secret store, specifically Google Secret Manager. 2. Connector Development: - For accessing CI secrets on GSM, the process is limited to Airbyte employees. You can follow the steps outlined in the [Connector Development documentation](https://docs.airbyte.com/connector-development#access-ci-secrets-on-gsm) to give an employee permissions to the project: 1. Go to the permissions' [page](https://console.cloud.google.com/iam-admin/iam?project=dataline-integration-testing). 2. Add a new principal to `dataline-integration-testing`: - Input their login email. - Select the role
Development_CI_Secrets
. 3. Save. 3. Specific Source Integrations: - For specific source integrations, you can follow the setup guides to obtain and configure your API keys and secrets: - Shortio: Follow the steps in the [Shortio Getting Started guide](https://docs.airbyte.com/integrations/sources/shortio#getting-started) to create and use a secret key. - SearchMetrics: Refer to the [SearchMetrics Setup guide](https://docs.airbyte.com/integrations/sources/search-metrics#setup-guide) to get your API Key and Client Secret. - TPL/3PL Central: Follow the [TPL/3PL Central Setup guide](https://docs.airbyte.com/integrations/sources/tplcentral#setup-guide) to get your API credentials. - AWS CloudTrail: Follow the [AWS CloudTrail Setup guide](https://docs.airbyte.com/integrations/sources/aws-cloudtrail#setup-guide) to get your AWS access key and secret. - New York Times: Follow the [New York Times guide](https://docs.airbyte.com/integrations/sources/nytimes#connect-using-api-key) to create an API key and write it into the
secrets/config.json
file. - Visma e-conomic: Follow the [Visma e-conomic Setup guide](https://docs.airbyte.com/integrations/sources/visma-economic#set-up-the-visma-e-conomic-source-connector) to enter your Agreement Grant Token and Secret Key. If you need more detailed instructions or run into any issues, please refer to the specific documentation links provided above.
m
@kapa.ai what's the db table in which sources are stored ?
k
A message from kapa.ai
The database table in which sources are stored in Airbyte is the
actor_oauth_parameter
table. This table contains parameters used for any instance of an
actor_definition
within a given workspace. Each record represents information such as client ID and client secret for third-party tools that are getting access. Here are some key points about the
actor_oauth_parameter
table: - Scope: Parameters can be scoped by workspace. If
workspace_id
is not present, the scope of the parameters is to the whole deployment of the platform (e.g., all workspaces). - Columns: - `actor_type`: Indicates whether the record represents a Source or a Destination. - `configuration`: A JSON blob containing the schema specified in the
spec
column in the
advanced_auth
field of the JSON blob. This schema is specific to each connector. For more detailed information, you can refer to the [Airbyte Databases Data Catalog documentation](https://docs.airbyte.com/understanding-airbyte/database-data-catalog#config-database). If you need to access secrets specifically, the
secrets
table is used to store secrets in open-source versions of the platform that have not set some other secrets store. This table allows the use of the same code path for secrets handling regardless of whether an external secrets store is set or not. For further details, you can refer to the [Airbyte Databases Data Catalog documentation](https://docs.airbyte.com/understanding-airbyte/database-data-catalog#config-database).
m
@kapa.ai what is destination table name ?
k
A message from kapa.ai
The destination table name in Airbyte depends on the configuration and the version of the destination you are using. Here are the details based on the provided knowledge sources: ### Destinations V2 In Destinations V2, the destination table name follows a specific pattern and is designed to improve data syncing and error handling. The raw tables are written to an
airbyte_internal
schema, and the final table names are more structured. #### Example: - Raw Destination Table Name:
airbyte_internal.raw_public__users
(
airbyte_internal.raw_{namespace}__{stream}
) - Final Destination Table Name:
public.users
Here is an example of the final destination table structure:
Copy code
markdown | *(note, not in actual table)* | _airbyte_raw_id | _airbyte_extracted_at | _airbyte_meta | id | first_name | age | address | | --- | --- | --- | --- | --- | --- | --- | --- | | Successful typing and de-duping ⟶ | xxx-xxx-xxx | 2022-01-01 12:00:00 | `{}` | 1 | sarah | 39 | `{ city: “San Francisco”, zip: “94131” }` | | Failed typing that didn’t break other rows ⟶ | yyy-yyy-yyy | 2022-01-01 12:00:00 | `{ changes: {"field": "age", "change": "NULLED", "reason": "DESTINATION_TYPECAST_ERROR"}}` | 2 | evan | NULL | `{ city: “Menlo Park”, zip: “94002” }` | | Not-yet-typed ⟶ |  |  |  |  |  |  |  |
For more details, you can refer to the [Destinations V2 Example](https://docs.airbyte.com/using-airbyte/core-concepts/typing-deduping#destinations-v2-example). ### Legacy Normalization In legacy normalization, the raw tables were written directly to the configured namespace, and the table names could include sub-tables for nested data structures. #### Example: - Raw Table Name:
_airbyte_raw_table_two
- Normalized Table Names:
table_two
,
table_two_scd
Here is an example of viewing the raw table:
Copy code
sql SELECT * FROM _airbyte_raw_table_two;
And the normalized table:
Copy code
sql SELECT * FROM table_two_scd;
For more details, you can refer to the [Incremental Data Synchronization Tutorial](https://airbyte.com/tutorials/incremental-data-synchronization#step-7). ### Schema and Table Naming Logic In the new world of Destinations V2, raw tables will always be written to an
airbyte_internal
schema, and the raw table name template should be
{configured namespace}_{stream name}
. For more details, you can refer to the [Github Issue #27581](https://github.com/airbytehq/airbyte/issues/27581). ### Summary - Destinations V2: Raw tables in
airbyte_internal
schema, final tables in the configured namespace. - Legacy Normalization: Raw tables directly in the configured namespace, with potential sub-tables for nested data. For more information on upgrading to Destinations V2, you can refer to the [Upgrading to Destinations V2 documentation](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2#what-is-destinations-v2).
m
@kapa.ai what's the db table in which destinations are stored ?
k
A message from kapa.ai
The database table in which destinations are stored in Airbyte is the
actor
table. This table contains records for both sources and destinations, identified by the
actor_type
column. Here are some key points about the
actor
table: - Columns: - `actor_type`: Indicates whether the record represents a Source or a Destination. - `configuration`: A JSON blob containing the configuration details for the source or destination. - `workspace_id`: The ID of the workspace to which the source or destination belongs. - `name`: The name of the source or destination. For more detailed information, you can refer to the [Airbyte Databases Data Catalog documentation](https://docs.airbyte.com/understanding-airbyte/database-data-catalog#config-database). If you need to access or manage destinations, you can query the
actor
table to retrieve the relevant records. Example query to retrieve all destinations:
Copy code
sql SELECT * FROM actor WHERE actor_type = 'destination';
For further details, you can refer to the [Airbyte Databases Data Catalog documentation](https://docs.airbyte.com/understanding-airbyte/database-data-catalog#config-database).